From 7a622158d003dd072af67581bea4f34cbc263898 Mon Sep 17 00:00:00 2001 From: oci-dex-release-bot Date: Tue, 15 Feb 2022 18:28:50 +0000 Subject: [PATCH] Releasing version 2.57.0 --- CHANGELOG.rst | 19 + docs/api/ai_vision.rst | 99 + .../oci.ai_vision.AIServiceVisionClient.rst | 8 + ...ServiceVisionClientCompositeOperations.rst | 8 + ...i_vision.models.AnalyzeDocumentDetails.rst | 11 + ...ai_vision.models.AnalyzeDocumentResult.rst | 11 + ...i.ai_vision.models.AnalyzeImageDetails.rst | 11 + ...ci.ai_vision.models.AnalyzeImageResult.rst | 11 + .../oci.ai_vision.models.BoundingPolygon.rst | 11 + .../models/oci.ai_vision.models.Cell.rst | 11 + ...n.models.ChangeModelCompartmentDetails.rst | 11 + ...models.ChangeProjectCompartmentDetails.rst | 11 + ...vision.models.CreateDocumentJobDetails.rst | 11 + ...ai_vision.models.CreateImageJobDetails.rst | 11 + ...ci.ai_vision.models.CreateModelDetails.rst | 11 + ....ai_vision.models.CreateProjectDetails.rst | 11 + ...sion.models.DataScienceLabelingDataset.rst | 11 + .../models/oci.ai_vision.models.Dataset.rst | 11 + ....ai_vision.models.DetectedDocumentType.rst | 11 + .../oci.ai_vision.models.DetectedLanguage.rst | 11 + .../oci.ai_vision.models.Dimensions.rst | 11 + ...n.models.DocumentClassificationFeature.rst | 11 + .../oci.ai_vision.models.DocumentDetails.rst | 11 + .../oci.ai_vision.models.DocumentFeature.rst | 11 + .../oci.ai_vision.models.DocumentField.rst | 11 + .../oci.ai_vision.models.DocumentJob.rst | 11 + ...odels.DocumentKeyValueDetectionFeature.rst | 11 + ....DocumentLanguageClassificationFeature.rst | 11 + .../oci.ai_vision.models.DocumentMetadata.rst | 11 + ...n.models.DocumentTableDetectionFeature.rst | 11 + ...on.models.DocumentTextDetectionFeature.rst | 11 + .../oci.ai_vision.models.FieldLabel.rst | 11 + .../models/oci.ai_vision.models.FieldName.rst | 11 + .../oci.ai_vision.models.FieldValue.rst | 11 + ...sion.models.ImageClassificationFeature.rst | 11 + .../oci.ai_vision.models.ImageDetails.rst | 11 + .../oci.ai_vision.models.ImageFeature.rst | 11 + .../models/oci.ai_vision.models.ImageJob.rst | 11 + .../oci.ai_vision.models.ImageObject.rst | 11 + ...ion.models.ImageObjectDetectionFeature.rst | 11 + .../models/oci.ai_vision.models.ImageText.rst | 11 + ...ision.models.ImageTextDetectionFeature.rst | 11 + ...ai_vision.models.InlineDocumentDetails.rst | 11 + ...ci.ai_vision.models.InlineImageDetails.rst | 11 + .../oci.ai_vision.models.InputLocation.rst | 11 + .../models/oci.ai_vision.models.Label.rst | 11 + .../models/oci.ai_vision.models.Line.rst | 11 + .../models/oci.ai_vision.models.Model.rst | 11 + .../oci.ai_vision.models.ModelCollection.rst | 11 + .../oci.ai_vision.models.ModelSummary.rst | 11 + .../oci.ai_vision.models.NormalizedVertex.rst | 11 + ...n.models.ObjectListInlineInputLocation.rst | 11 + .../oci.ai_vision.models.ObjectLocation.rst | 11 + ....ai_vision.models.ObjectStorageDataset.rst | 11 + ...on.models.ObjectStorageDocumentDetails.rst | 11 + ...ision.models.ObjectStorageImageDetails.rst | 11 + .../oci.ai_vision.models.OntologyClass.rst | 11 + .../oci.ai_vision.models.OutputLocation.rst | 11 + .../models/oci.ai_vision.models.Page.rst | 11 + .../oci.ai_vision.models.ProcessingError.rst | 11 + .../models/oci.ai_vision.models.Project.rst | 11 + ...oci.ai_vision.models.ProjectCollection.rst | 11 + .../oci.ai_vision.models.ProjectSummary.rst | 11 + .../models/oci.ai_vision.models.Table.rst | 11 + .../models/oci.ai_vision.models.TableRow.rst | 11 + ...ci.ai_vision.models.UpdateModelDetails.rst | 11 + ....ai_vision.models.UpdateProjectDetails.rst | 11 + .../oci.ai_vision.models.ValueArray.rst | 11 + .../models/oci.ai_vision.models.ValueDate.rst | 11 + .../oci.ai_vision.models.ValueInteger.rst | 11 + .../oci.ai_vision.models.ValueNumber.rst | 11 + .../oci.ai_vision.models.ValuePhoneNumber.rst | 11 + .../oci.ai_vision.models.ValueString.rst | 11 + .../models/oci.ai_vision.models.ValueTime.rst | 11 + .../models/oci.ai_vision.models.Word.rst | 11 + .../oci.ai_vision.models.WorkRequest.rst | 11 + .../oci.ai_vision.models.WorkRequestError.rst | 11 + ...sion.models.WorkRequestErrorCollection.rst | 11 + ...i.ai_vision.models.WorkRequestLogEntry.rst | 11 + ...n.models.WorkRequestLogEntryCollection.rst | 11 + ...i.ai_vision.models.WorkRequestResource.rst | 11 + ...ci.ai_vision.models.WorkRequestSummary.rst | 11 + ...on.models.WorkRequestSummaryCollection.rst | 11 + docs/api/announcements_service.rst | 13 + ...service.AnnouncementSubscriptionClient.rst | 8 + ...tSubscriptionClientCompositeOperations.rst | 8 + ...ervice.models.AnnouncementSubscription.rst | 11 + ...els.AnnouncementSubscriptionCollection.rst | 11 + ...models.AnnouncementSubscriptionSummary.rst | 11 + ...uncementSubscriptionCompartmentDetails.rst | 11 + ....CreateAnnouncementSubscriptionDetails.rst | 11 + ...ervice.models.CreateFilterGroupDetails.rst | 11 + ...ci.announcements_service.models.Filter.rst | 11 + ...nouncements_service.models.FilterGroup.rst | 11 + ...ents_service.models.FilterGroupDetails.rst | 11 + ....UpdateAnnouncementSubscriptionDetails.rst | 11 + ...ervice.models.UpdateFilterGroupDetails.rst | 11 + docs/api/apm_traces.rst | 7 + ...i.apm_traces.models.AggregatedSnapshot.rst | 11 + ...apm_traces.models.AggregatedStackTrace.rst | 11 + .../oci.apm_traces.models.SnapshotDetail.rst | 11 + .../oci.apm_traces.models.SpanSnapshot.rst | 11 + ...ci.apm_traces.models.StackTraceElement.rst | 11 + .../oci.apm_traces.models.ThreadSnapshot.rst | 11 + .../oci.apm_traces.models.TraceSnapshot.rst | 11 + docs/api/data_safe.rst | 213 + .../models/oci.data_safe.models.Alert.rst | 11 + ...data_safe.models.AlertAggregationItems.rst | 11 + ...a_safe.models.AlertAnalyticsCollection.rst | 11 + .../oci.data_safe.models.AlertCollection.rst | 11 + .../oci.data_safe.models.AlertPolicy.rst | 11 + ...data_safe.models.AlertPolicyCollection.rst | 11 + .../oci.data_safe.models.AlertPolicyRule.rst | 11 + ..._safe.models.AlertPolicyRuleCollection.rst | 11 + ...ata_safe.models.AlertPolicyRuleSummary.rst | 11 + ...ci.data_safe.models.AlertPolicySummary.rst | 11 + .../oci.data_safe.models.AlertSummary.rst | 11 + ...safe.models.AlertsAggregationDimension.rst | 11 + ...models.ApplyDiscoveryJobResultsDetails.rst | 11 + ...data_safe.models.AuditArchiveRetrieval.rst | 11 + ...models.AuditArchiveRetrievalCollection.rst | 11 + ...fe.models.AuditArchiveRetrievalSummary.rst | 11 + .../oci.data_safe.models.AuditConditions.rst | 11 + ...models.AuditEventAggregationDimensions.rst | 11 + ...safe.models.AuditEventAggregationItems.rst | 11 + ...e.models.AuditEventAnalyticsCollection.rst | 11 + ....data_safe.models.AuditEventCollection.rst | 11 + ...oci.data_safe.models.AuditEventSummary.rst | 11 + .../oci.data_safe.models.AuditPolicy.rst | 11 + ...afe.models.AuditPolicyAggregationItems.rst | 11 + ...e.models.AuditPolicyAnalyticCollection.rst | 11 + ...data_safe.models.AuditPolicyCollection.rst | 11 + ...data_safe.models.AuditPolicyDimensions.rst | 11 + ...ci.data_safe.models.AuditPolicySummary.rst | 11 + .../oci.data_safe.models.AuditProfile.rst | 11 + ...fe.models.AuditProfileAggregationItems.rst | 11 + ....models.AuditProfileAnalyticCollection.rst | 11 + ...ata_safe.models.AuditProfileCollection.rst | 11 + ...ata_safe.models.AuditProfileDimensions.rst | 11 + ...i.data_safe.models.AuditProfileSummary.rst | 11 + ...ci.data_safe.models.AuditSpecification.rst | 11 + .../oci.data_safe.models.AuditTrail.rst | 11 + ...safe.models.AuditTrailAggregationItems.rst | 11 + ...fe.models.AuditTrailAnalyticCollection.rst | 11 + ....data_safe.models.AuditTrailCollection.rst | 11 + ....data_safe.models.AuditTrailDimensions.rst | 11 + ...oci.data_safe.models.AuditTrailSummary.rst | 11 + ....models.AvailableAuditVolumeCollection.rst | 11 + ...afe.models.AvailableAuditVolumeSummary.rst | 11 + ...s.CalculateAuditVolumeAvailableDetails.rst | 11 + ...s.CalculateAuditVolumeCollectedDetails.rst | 11 + ...e.models.ChangeAlertCompartmentDetails.rst | 11 + ...ls.ChangeAlertPolicyCompartmentDetails.rst | 11 + ...uditArchiveRetrievalCompartmentDetails.rst | 11 + ...ls.ChangeAuditPolicyCompartmentDetails.rst | 11 + ...s.ChangeAuditProfileCompartmentDetails.rst | 11 + ...s.ChangeDiscoveryJobCompartmentDetails.rst | 11 + ...LibraryMaskingFormatCompartmentDetails.rst | 11 + ....ChangeMaskingPolicyCompartmentDetails.rst | 11 + ....models.ChangeReportCompartmentDetails.rst | 11 + ...angeReportDefinitionCompartmentDetails.rst | 11 + ...ata_safe.models.ChangeRetentionDetails.rst | 11 + ...geSensitiveDataModelCompartmentDetails.rst | 11 + ....ChangeSensitiveTypeCompartmentDetails.rst | 11 + ...ertPolicyAssociationCompartmentDetails.rst | 11 + ....models.CollectedAuditVolumeCollection.rst | 11 + ...afe.models.CollectedAuditVolumeSummary.rst | 11 + .../models/oci.data_safe.models.Column.rst | 11 + .../oci.data_safe.models.ColumnFilter.rst | 11 + .../oci.data_safe.models.ColumnSorting.rst | 11 + ...i.data_safe.models.ColumnSourceDetails.rst | 11 + ...safe.models.ColumnSourceFromSdmDetails.rst | 11 + ...e.models.ColumnSourceFromTargetDetails.rst | 11 + .../oci.data_safe.models.ColumnSummary.rst | 11 + ...e.models.CompatibleFormatsForDataTypes.rst | 11 + ...els.CompatibleFormatsForSensitiveTypes.rst | 11 + ...a_safe.models.CreateAlertPolicyDetails.rst | 11 + ...fe.models.CreateAlertPolicyRuleDetails.rst | 11 + ...els.CreateAuditArchiveRetrievalDetails.rst | 11 + ...a_safe.models.CreateAuditPolicyDetails.rst | 11 + ..._safe.models.CreateAuditProfileDetails.rst | 11 + ..._safe.models.CreateColumnSourceDetails.rst | 11 + ...odels.CreateColumnSourceFromSdmDetails.rst | 11 + ...ls.CreateColumnSourceFromTargetDetails.rst | 11 + ..._safe.models.CreateDiscoveryJobDetails.rst | 11 + ...dels.CreateLibraryMaskingFormatDetails.rst | 11 + ...safe.models.CreateMaskingColumnDetails.rst | 11 + ...safe.models.CreateMaskingPolicyDetails.rst | 11 + ...e.models.CreateReportDefinitionDetails.rst | 11 + ....models.CreateSensitiveCategoryDetails.rst | 11 + ...fe.models.CreateSensitiveColumnDetails.rst | 11 + ...models.CreateSensitiveDataModelDetails.rst | 11 + ...safe.models.CreateSensitiveTypeDetails.rst | 11 + ...dels.CreateSensitiveTypePatternDetails.rst | 11 + ...ateTargetAlertPolicyAssociationDetails.rst | 11 + ...data_safe.models.DeleteRowsFormatEntry.rst | 11 + ...DeterministicEncryptionDateFormatEntry.rst | 11 + ...els.DeterministicEncryptionFormatEntry.rst | 11 + ...s.DeterministicSubstitutionFormatEntry.rst | 11 + .../oci.data_safe.models.Dimensions.rst | 11 + ...fe.models.DiscoveryAnalyticsCollection.rst | 11 + ..._safe.models.DiscoveryAnalyticsSummary.rst | 11 + .../oci.data_safe.models.DiscoveryJob.rst | 11 + ...ata_safe.models.DiscoveryJobCollection.rst | 11 + ...ci.data_safe.models.DiscoveryJobResult.rst | 11 + ...fe.models.DiscoveryJobResultCollection.rst | 11 + ..._safe.models.DiscoveryJobResultSummary.rst | 11 + ...i.data_safe.models.DiscoveryJobSummary.rst | 11 + ....models.DownloadDiscoveryReportDetails.rst | 11 + ..._safe.models.DownloadMaskingLogDetails.rst | 11 + ...fe.models.DownloadMaskingPolicyDetails.rst | 11 + ...fe.models.DownloadMaskingReportDetails.rst | 11 + ...dels.DownloadSensitiveDataModelDetails.rst | 11 + .../oci.data_safe.models.EnableConditions.rst | 11 + ...ata_safe.models.FixedNumberFormatEntry.rst | 11 + ...ata_safe.models.FixedStringFormatEntry.rst | 11 + .../oci.data_safe.models.FormatEntry.rst | 11 + .../oci.data_safe.models.FormatSummary.rst | 11 + ...ci.data_safe.models.FormatsForDataType.rst | 11 + ...ta_safe.models.FormatsForSensitiveType.rst | 11 + ...erateDiscoveryReportForDownloadDetails.rst | 11 + ...enerateMaskingPolicyForDownloadDetails.rst | 11 + ...enerateMaskingReportForDownloadDetails.rst | 11 + ...data_safe.models.GenerateReportDetails.rst | 11 + ...teSensitiveDataModelForDownloadDetails.rst | 11 + .../oci.data_safe.models.GlobalSettings.rst | 11 + ....data_safe.models.LibraryMaskingFormat.rst | 11 + ....models.LibraryMaskingFormatCollection.rst | 11 + ..._safe.models.LibraryMaskingFormatEntry.rst | 11 + ...afe.models.LibraryMaskingFormatSummary.rst | 11 + .../oci.data_safe.models.MaskDataDetails.rst | 11 + ...ata_safe.models.MaskedColumnCollection.rst | 11 + ...i.data_safe.models.MaskedColumnSummary.rst | 11 + ...safe.models.MaskingAnalyticsCollection.rst | 11 + ...safe.models.MaskingAnalyticsDimensions.rst | 11 + ...ta_safe.models.MaskingAnalyticsSummary.rst | 11 + .../oci.data_safe.models.MaskingColumn.rst | 11 + ...ta_safe.models.MaskingColumnCollection.rst | 11 + ....data_safe.models.MaskingColumnSummary.rst | 11 + .../oci.data_safe.models.MaskingFormat.rst | 11 + .../oci.data_safe.models.MaskingPolicy.rst | 11 + ...ta_safe.models.MaskingPolicyCollection.rst | 11 + ....data_safe.models.MaskingPolicySummary.rst | 11 + .../oci.data_safe.models.MaskingReport.rst | 11 + ...ta_safe.models.MaskingReportCollection.rst | 11 + ....data_safe.models.MaskingReportSummary.rst | 11 + ...ci.data_safe.models.ModifiedAttributes.rst | 11 + ...afe.models.ModifyGlobalSettingsDetails.rst | 11 + ....data_safe.models.NullValueFormatEntry.rst | 11 + .../oci.data_safe.models.PPFFormatEntry.rst | 11 + ...afe.models.PatchAlertPolicyRuleDetails.rst | 11 + ...ci.data_safe.models.PatchAlertsDetails.rst | 11 + ....models.PatchDiscoveryJobResultDetails.rst | 11 + ...ata_safe.models.PatchInsertInstruction.rst | 11 + .../oci.data_safe.models.PatchInstruction.rst | 11 + ...safe.models.PatchMaskingColumnsDetails.rst | 11 + ...data_safe.models.PatchMergeInstruction.rst | 11 + ...ata_safe.models.PatchRemoveInstruction.rst | 11 + ...afe.models.PatchSensitiveColumnDetails.rst | 11 + ...models.PreserveOriginalDataFormatEntry.rst | 11 + ...a_safe.models.ProvisionAuditConditions.rst | 11 + ...afe.models.ProvisionAuditPolicyDetails.rst | 11 + ...data_safe.models.RandomDateFormatEntry.rst | 11 + ....models.RandomDecimalNumberFormatEntry.rst | 11 + ...ta_safe.models.RandomDigitsFormatEntry.rst | 11 + ...data_safe.models.RandomListFormatEntry.rst | 11 + ...ta_safe.models.RandomNumberFormatEntry.rst | 11 + ...ta_safe.models.RandomStringFormatEntry.rst | 11 + ...e.models.RandomSubstitutionFormatEntry.rst | 11 + ...fe.models.RegularExpressionFormatEntry.rst | 11 + .../models/oci.data_safe.models.Report.rst | 11 + .../oci.data_safe.models.ReportCollection.rst | 11 + .../oci.data_safe.models.ReportDefinition.rst | 11 + ...safe.models.ReportDefinitionCollection.rst | 11 + ...ta_safe.models.ReportDefinitionSummary.rst | 11 + .../oci.data_safe.models.ReportSummary.rst | 11 + .../oci.data_safe.models.RoleSummary.rst | 11 + ...a_safe.models.SQLExpressionFormatEntry.rst | 11 + .../oci.data_safe.models.SchemaSummary.rst | 11 + ...oci.data_safe.models.SensitiveCategory.rst | 11 + .../oci.data_safe.models.SensitiveColumn.rst | 11 + ..._safe.models.SensitiveColumnCollection.rst | 11 + ...ata_safe.models.SensitiveColumnSummary.rst | 11 + ...ci.data_safe.models.SensitiveDataModel.rst | 11 + ...fe.models.SensitiveDataModelCollection.rst | 11 + ..._safe.models.SensitiveDataModelSummary.rst | 11 + .../oci.data_safe.models.SensitiveType.rst | 11 + ...ta_safe.models.SensitiveTypeCollection.rst | 11 + ....data_safe.models.SensitiveTypePattern.rst | 11 + ....data_safe.models.SensitiveTypeSummary.rst | 11 + ...ci.data_safe.models.ShuffleFormatEntry.rst | 11 + ...ata_safe.models.StartAuditTrailDetails.rst | 11 + ....data_safe.models.SubstringFormatEntry.rst | 11 + .../models/oci.data_safe.models.Summary.rst | 11 + .../oci.data_safe.models.TableSummary.rst | 11 + ...fe.models.TargetAlertPolicyAssociation.rst | 11 + ...TargetAlertPolicyAssociationCollection.rst | 11 + ...ls.TargetAlertPolicyAssociationSummary.rst | 11 + ...a_safe.models.TruncateTableFormatEntry.rst | 11 + .../oci.data_safe.models.UDFFormatEntry.rst | 11 + ...ci.data_safe.models.UpdateAlertDetails.rst | 11 + ...fe.models.UpdateAlertPolicyRuleDetails.rst | 11 + ...els.UpdateAuditArchiveRetrievalDetails.rst | 11 + ...a_safe.models.UpdateAuditPolicyDetails.rst | 11 + ..._safe.models.UpdateAuditProfileDetails.rst | 11 + ...ta_safe.models.UpdateAuditTrailDetails.rst | 11 + ..._safe.models.UpdateColumnSourceDetails.rst | 11 + ...fe.models.UpdateColumnSourceSdmDetails.rst | 11 + ...models.UpdateColumnSourceTargetDetails.rst | 11 + ...dels.UpdateLibraryMaskingFormatDetails.rst | 11 + ...safe.models.UpdateMaskingColumnDetails.rst | 11 + ...safe.models.UpdateMaskingPolicyDetails.rst | 11 + ...e.models.UpdateReportDefinitionDetails.rst | 11 + ....models.UpdateSensitiveCategoryDetails.rst | 11 + ...fe.models.UpdateSensitiveColumnDetails.rst | 11 + ...models.UpdateSensitiveDataModelDetails.rst | 11 + ...safe.models.UpdateSensitiveTypeDetails.rst | 11 + ...dels.UpdateSensitiveTypePatternDetails.rst | 11 + ...ateTargetAlertPolicyAssociationDetails.rst | 11 + docs/api/landing.rst | 5 + docs/api/threat_intelligence.rst | 36 + ....threat_intelligence.ThreatintelClient.rst | 8 + ...e.ThreatintelClientCompositeOperations.rst | 8 + ...at_intelligence.models.DataAttribution.rst | 11 + ...eat_intelligence.models.DataVisibility.rst | 11 + ...at_intelligence.models.EntityReference.rst | 11 + ...i.threat_intelligence.models.Indicator.rst | 11 + ...intelligence.models.IndicatorAttribute.rst | 11 + ...igence.models.IndicatorCountCollection.rst | 11 + ...igence.models.IndicatorCountDimensions.rst | 11 + ...elligence.models.IndicatorCountSummary.rst | 11 + ...intelligence.models.IndicatorReference.rst | 11 + ...elligence.models.IndicatorRelationship.rst | 11 + ...lligence.models.IndicatorSourceSummary.rst | 11 + ...t_intelligence.models.IndicatorSummary.rst | 11 + ...ence.models.IndicatorSummaryCollection.rst | 11 + ....threat_intelligence.models.ThreatType.rst | 11 + ..._intelligence.models.ThreatTypeSummary.rst | 11 + ...elligence.models.ThreatTypesCollection.rst | 11 + src/oci/__init__.py | 4 +- src/oci/ai_vision/__init__.py | 12 + src/oci/ai_vision/ai_service_vision_client.py | 2535 ++ ...vice_vision_client_composite_operations.py | 350 + src/oci/ai_vision/models/__init__.py | 168 + .../models/analyze_document_details.py | 375 + .../models/analyze_document_result.py | 376 + .../ai_vision/models/analyze_image_details.py | 128 + .../ai_vision/models/analyze_image_result.py | 283 + src/oci/ai_vision/models/bounding_polygon.py | 72 + src/oci/ai_vision/models/cell.py | 221 + .../change_model_compartment_details.py | 76 + .../change_project_compartment_details.py | 76 + .../models/create_document_job_details.py | 437 + .../models/create_image_job_details.py | 217 + .../ai_vision/models/create_model_details.py | 438 + .../models/create_project_details.py | 198 + .../models/data_science_labeling_dataset.py | 80 + src/oci/ai_vision/models/dataset.py | 107 + .../models/detected_document_type.py | 101 + src/oci/ai_vision/models/detected_language.py | 209 + src/oci/ai_vision/models/dimensions.py | 148 + .../models/document_classification_feature.py | 111 + src/oci/ai_vision/models/document_details.py | 114 + src/oci/ai_vision/models/document_feature.py | 143 + src/oci/ai_vision/models/document_field.py | 175 + src/oci/ai_vision/models/document_job.py | 700 + .../document_key_value_detection_feature.py | 49 + ...ocument_language_classification_feature.py | 80 + src/oci/ai_vision/models/document_metadata.py | 101 + .../document_table_detection_feature.py | 49 + .../models/document_text_detection_feature.py | 80 + src/oci/ai_vision/models/field_label.py | 101 + src/oci/ai_vision/models/field_name.py | 159 + src/oci/ai_vision/models/field_value.py | 267 + .../models/image_classification_feature.py | 111 + src/oci/ai_vision/models/image_details.py | 114 + src/oci/ai_vision/models/image_feature.py | 123 + src/oci/ai_vision/models/image_job.py | 482 + src/oci/ai_vision/models/image_object.py | 128 + .../models/image_object_detection_feature.py | 111 + src/oci/ai_vision/models/image_text.py | 101 + .../models/image_text_detection_feature.py | 189 + .../models/inline_document_details.py | 80 + .../ai_vision/models/inline_image_details.py | 80 + src/oci/ai_vision/models/input_location.py | 103 + src/oci/ai_vision/models/label.py | 101 + src/oci/ai_vision/models/line.py | 159 + src/oci/ai_vision/models/model.py | 922 + src/oci/ai_vision/models/model_collection.py | 70 + src/oci/ai_vision/models/model_summary.py | 595 + src/oci/ai_vision/models/normalized_vertex.py | 103 + .../object_list_inline_input_location.py | 80 + src/oci/ai_vision/models/object_location.py | 132 + .../models/object_storage_dataset.py | 142 + .../models/object_storage_document_details.py | 142 + .../models/object_storage_image_details.py | 142 + src/oci/ai_vision/models/ontology_class.py | 132 + src/oci/ai_vision/models/output_location.py | 132 + src/oci/ai_vision/models/page.py | 283 + src/oci/ai_vision/models/processing_error.py | 101 + src/oci/ai_vision/models/project.py | 418 + .../ai_vision/models/project_collection.py | 70 + src/oci/ai_vision/models/project_summary.py | 355 + src/oci/ai_vision/models/table.py | 252 + src/oci/ai_vision/models/table_row.py | 70 + .../ai_vision/models/update_model_details.py | 167 + .../models/update_project_details.py | 167 + src/oci/ai_vision/models/value_array.py | 104 + src/oci/ai_vision/models/value_date.py | 108 + src/oci/ai_vision/models/value_integer.py | 108 + src/oci/ai_vision/models/value_number.py | 108 + .../ai_vision/models/value_phone_number.py | 108 + src/oci/ai_vision/models/value_string.py | 108 + src/oci/ai_vision/models/value_time.py | 108 + src/oci/ai_vision/models/word.py | 128 + src/oci/ai_vision/models/work_request.py | 412 + .../ai_vision/models/work_request_error.py | 134 + .../models/work_request_error_collection.py | 70 + .../models/work_request_log_entry.py | 101 + .../work_request_log_entry_collection.py | 70 + .../ai_vision/models/work_request_resource.py | 201 + .../ai_vision/models/work_request_summary.py | 416 + .../models/work_request_summary_collection.py | 70 + src/oci/announcements_service/__init__.py | 4 +- .../announcement_client.py | 52 +- .../announcement_subscription_client.py | 1007 + ...ubscription_client_composite_operations.py | 150 + .../announcements_preferences_client.py | 13 +- .../announcements_service/models/__init__.py | 24 +- .../models/announcement.py | 16 + .../models/announcement_subscription.py | 480 + .../announcement_subscription_collection.py | 70 + .../announcement_subscription_summary.py | 398 + .../models/announcement_summary.py | 20 +- .../models/base_announcement.py | 83 +- ...cement_subscription_compartment_details.py | 76 + ...reate_announcement_subscription_details.py | 268 + .../models/create_filter_group_details.py | 101 + .../announcements_service/models/filter.py | 133 + .../models/filter_group.py | 101 + .../models/filter_group_details.py | 70 + ...pdate_announcement_subscription_details.py | 204 + .../models/update_filter_group_details.py | 70 + src/oci/apm_traces/models/__init__.py | 14 + .../apm_traces/models/aggregated_snapshot.py | 101 + .../models/aggregated_stack_trace.py | 97 + src/oci/apm_traces/models/query_details.py | 6 +- .../models/query_result_metadata_summary.py | 8 +- src/oci/apm_traces/models/query_result_row.py | 22 +- .../models/query_result_row_type_summary.py | 2 +- .../query_results_grouped_by_summary.py | 6 +- .../query_results_ordered_by_summary.py | 6 +- .../apm_traces/models/quick_pick_summary.py | 10 +- src/oci/apm_traces/models/snapshot_detail.py | 101 + src/oci/apm_traces/models/span.py | 16 +- src/oci/apm_traces/models/span_log.py | 2 +- src/oci/apm_traces/models/span_snapshot.py | 256 + .../apm_traces/models/stack_trace_element.py | 194 + src/oci/apm_traces/models/tag.py | 2 +- src/oci/apm_traces/models/thread_snapshot.py | 132 + src/oci/apm_traces/models/trace.py | 62 +- .../models/trace_service_summary.py | 10 +- src/oci/apm_traces/models/trace_snapshot.py | 198 + .../apm_traces/models/trace_span_summary.py | 65 +- src/oci/apm_traces/query_client.py | 126 +- src/oci/apm_traces/trace_client.py | 221 +- src/oci/data_safe/data_safe_client.py | 20075 ++++++++++++++-- .../data_safe_client_composite_operations.py | 2922 ++- src/oci/data_safe/models/__init__.py | 426 + src/oci/data_safe/models/alert.py | 853 + .../models/alert_aggregation_items.py | 190 + .../models/alert_analytics_collection.py | 70 + src/oci/data_safe/models/alert_collection.py | 70 + src/oci/data_safe/models/alert_policy.py | 550 + .../models/alert_policy_collection.py | 70 + src/oci/data_safe/models/alert_policy_rule.py | 132 + .../models/alert_policy_rule_collection.py | 70 + .../models/alert_policy_rule_summary.py | 132 + .../data_safe/models/alert_policy_summary.py | 515 + src/oci/data_safe/models/alert_summary.py | 758 + .../models/alerts_aggregation_dimension.py | 70 + .../apply_discovery_job_results_details.py | 70 + .../models/audit_archive_retrieval.py | 619 + .../audit_archive_retrieval_collection.py | 70 + .../models/audit_archive_retrieval_summary.py | 583 + src/oci/data_safe/models/audit_conditions.py | 167 + .../audit_event_aggregation_dimensions.py | 432 + .../models/audit_event_aggregation_items.py | 221 + .../audit_event_analytics_collection.py | 70 + .../models/audit_event_collection.py | 70 + .../data_safe/models/audit_event_summary.py | 1215 + src/oci/data_safe/models/audit_policy.py | 631 + .../models/audit_policy_aggregation_items.py | 97 + .../audit_policy_analytic_collection.py | 70 + .../models/audit_policy_collection.py | 70 + .../models/audit_policy_dimensions.py | 138 + .../data_safe/models/audit_policy_summary.py | 567 + src/oci/data_safe/models/audit_profile.py | 665 + .../models/audit_profile_aggregation_items.py | 97 + .../audit_profile_analytic_collection.py | 70 + .../models/audit_profile_collection.py | 70 + .../models/audit_profile_dimensions.py | 74 + .../data_safe/models/audit_profile_summary.py | 603 + .../data_safe/models/audit_specification.py | 474 + src/oci/data_safe/models/audit_trail.py | 696 + .../models/audit_trail_aggregation_items.py | 97 + .../models/audit_trail_analytic_collection.py | 70 + .../models/audit_trail_collection.py | 70 + .../models/audit_trail_dimensions.py | 195 + .../data_safe/models/audit_trail_summary.py | 625 + .../available_audit_volume_collection.py | 70 + .../models/available_audit_volume_summary.py | 167 + ...alculate_audit_volume_available_details.py | 101 + ...alculate_audit_volume_collected_details.py | 101 + .../change_alert_compartment_details.py | 70 + ...change_alert_policy_compartment_details.py | 70 + ...t_archive_retrieval_compartment_details.py | 76 + ...change_audit_policy_compartment_details.py | 70 + ...hange_audit_profile_compartment_details.py | 70 + ...hange_discovery_job_compartment_details.py | 70 + ...rary_masking_format_compartment_details.py | 70 + ...ange_masking_policy_compartment_details.py | 70 + .../change_report_compartment_details.py | 76 + ...e_report_definition_compartment_details.py | 76 + .../models/change_retention_details.py | 140 + ...ensitive_data_model_compartment_details.py | 70 + ...ange_sensitive_type_compartment_details.py | 70 + ..._policy_association_compartment_details.py | 70 + .../collected_audit_volume_collection.py | 70 + .../models/collected_audit_volume_summary.py | 167 + src/oci/data_safe/models/column.py | 194 + src/oci/data_safe/models/column_filter.py | 250 + src/oci/data_safe/models/column_sorting.py | 132 + .../data_safe/models/column_source_details.py | 107 + .../models/column_source_from_sdm_details.py | 80 + .../column_source_from_target_details.py | 80 + src/oci/data_safe/models/column_summary.py | 287 + .../compatible_formats_for_data_types.py | 76 + .../compatible_formats_for_sensitive_types.py | 70 + .../models/create_alert_policy_details.py | 322 + .../create_alert_policy_rule_details.py | 101 + .../create_audit_archive_retrieval_details.py | 303 + .../models/create_audit_policy_details.py | 241 + .../models/create_audit_profile_details.py | 276 + .../models/create_column_source_details.py | 108 + .../create_column_source_from_sdm_details.py | 80 + ...reate_column_source_from_target_details.py | 80 + .../models/create_discovery_job_details.py | 465 + .../create_library_masking_format_details.py | 277 + .../models/create_masking_column_details.py | 358 + .../models/create_masking_policy_details.py | 505 + .../create_report_definition_details.py | 365 + .../create_sensitive_category_details.py | 98 + .../models/create_sensitive_column_details.py | 498 + .../create_sensitive_data_model_details.py | 488 + .../models/create_sensitive_type_details.py | 343 + .../create_sensitive_type_pattern_details.py | 259 + ...target_alert_policy_association_details.py | 303 + .../models/data_safe_configuration.py | 58 + .../models/delete_rows_format_entry.py | 63 + ...erministic_encryption_date_format_entry.py | 138 + .../deterministic_encryption_format_entry.py | 128 + ...deterministic_substitution_format_entry.py | 159 + src/oci/data_safe/models/dimensions.py | 101 + .../models/discovery_analytics_collection.py | 70 + .../models/discovery_analytics_summary.py | 160 + src/oci/data_safe/models/discovery_job.py | 893 + .../models/discovery_job_collection.py | 70 + .../data_safe/models/discovery_job_result.py | 733 + .../models/discovery_job_result_collection.py | 70 + .../models/discovery_job_result_summary.py | 566 + .../data_safe/models/discovery_job_summary.py | 436 + .../download_discovery_report_details.py | 118 + .../models/download_masking_log_details.py | 70 + .../models/download_masking_policy_details.py | 83 + .../models/download_masking_report_details.py | 118 + .../download_sensitive_data_model_details.py | 83 + src/oci/data_safe/models/enable_conditions.py | 219 + .../models/fixed_number_format_entry.py | 88 + .../models/fixed_string_format_entry.py | 88 + src/oci/data_safe/models/format_entry.py | 309 + src/oci/data_safe/models/format_summary.py | 132 + .../data_safe/models/formats_for_data_type.py | 111 + .../models/formats_for_sensitive_type.py | 101 + ...e_discovery_report_for_download_details.py | 118 + ...ate_masking_policy_for_download_details.py | 83 + ...ate_masking_report_for_download_details.py | 118 + .../models/generate_report_details.py | 310 + ...nsitive_data_model_for_download_details.py | 83 + src/oci/data_safe/models/global_settings.py | 132 + .../models/library_masking_format.py | 494 + .../library_masking_format_collection.py | 70 + .../models/library_masking_format_entry.py | 91 + .../models/library_masking_format_summary.py | 456 + src/oci/data_safe/models/mask_data_details.py | 313 + .../models/masked_column_collection.py | 70 + .../data_safe/models/masked_column_summary.py | 365 + .../models/masking_analytics_collection.py | 70 + .../models/masking_analytics_dimensions.py | 101 + .../models/masking_analytics_summary.py | 168 + src/oci/data_safe/models/masking_column.py | 600 + .../models/masking_column_collection.py | 70 + .../models/masking_column_summary.py | 597 + src/oci/data_safe/models/masking_format.py | 150 + src/oci/data_safe/models/masking_policy.py | 681 + .../models/masking_policy_collection.py | 70 + .../models/masking_policy_summary.py | 405 + src/oci/data_safe/models/masking_report.py | 420 + .../models/masking_report_collection.py | 70 + .../models/masking_report_summary.py | 419 + .../data_safe/models/modified_attributes.py | 102 + .../models/modify_global_settings_details.py | 132 + .../models/null_value_format_entry.py | 58 + .../models/patch_alert_policy_rule_details.py | 70 + .../data_safe/models/patch_alerts_details.py | 70 + .../patch_discovery_job_result_details.py | 70 + .../models/patch_insert_instruction.py | 87 + src/oci/data_safe/models/patch_instruction.py | 151 + .../models/patch_masking_columns_details.py | 70 + .../models/patch_merge_instruction.py | 89 + .../models/patch_remove_instruction.py | 56 + .../models/patch_sensitive_column_details.py | 70 + src/oci/data_safe/models/ppf_format_entry.py | 100 + .../preserve_original_data_format_entry.py | 59 + .../models/provision_audit_conditions.py | 167 + .../models/provision_audit_policy_details.py | 101 + .../models/random_date_format_entry.py | 126 + .../random_decimal_number_format_entry.py | 129 + .../models/random_digits_format_entry.py | 132 + .../models/random_list_format_entry.py | 95 + .../models/random_number_format_entry.py | 131 + .../models/random_string_format_entry.py | 131 + .../random_substitution_format_entry.py | 158 + .../models/regular_expression_format_entry.py | 127 + src/oci/data_safe/models/report.py | 430 + src/oci/data_safe/models/report_collection.py | 70 + src/oci/data_safe/models/report_definition.py | 741 + .../models/report_definition_collection.py | 70 + .../models/report_definition_summary.py | 522 + src/oci/data_safe/models/report_summary.py | 397 + src/oci/data_safe/models/role_summary.py | 256 + src/oci/data_safe/models/schema_summary.py | 101 + .../data_safe/models/sensitive_category.py | 142 + src/oci/data_safe/models/sensitive_column.py | 851 + .../models/sensitive_column_collection.py | 70 + .../models/sensitive_column_summary.py | 754 + .../data_safe/models/sensitive_data_model.py | 684 + .../models/sensitive_data_model_collection.py | 70 + .../models/sensitive_data_model_summary.py | 440 + src/oci/data_safe/models/sensitive_type.py | 590 + .../models/sensitive_type_collection.py | 70 + .../models/sensitive_type_pattern.py | 322 + .../models/sensitive_type_summary.py | 563 + .../data_safe/models/shuffle_format_entry.py | 98 + .../models/sql_expression_format_entry.py | 99 + .../models/start_audit_trail_details.py | 103 + .../models/substring_format_entry.py | 129 + src/oci/data_safe/models/summary.py | 225 + src/oci/data_safe/models/table_summary.py | 101 + .../models/target_alert_policy_association.py | 500 + ...get_alert_policy_association_collection.py | 70 + ...target_alert_policy_association_summary.py | 467 + src/oci/data_safe/models/target_database.py | 31 + .../models/target_database_summary.py | 31 + .../models/truncate_table_format_entry.py | 60 + src/oci/data_safe/models/udf_format_entry.py | 93 + .../data_safe/models/update_alert_details.py | 196 + .../update_alert_policy_rule_details.py | 101 + .../update_audit_archive_retrieval_details.py | 179 + .../models/update_audit_policy_details.py | 179 + .../models/update_audit_profile_details.py | 214 + .../models/update_audit_trail_details.py | 212 + .../models/update_column_source_details.py | 108 + .../update_column_source_sdm_details.py | 80 + .../update_column_source_target_details.py | 80 + .../update_library_masking_format_details.py | 242 + .../models/update_masking_column_details.py | 237 + .../models/update_masking_policy_details.py | 457 + .../update_report_definition_details.py | 303 + .../update_sensitive_category_details.py | 91 + .../models/update_sensitive_column_details.py | 322 + .../update_sensitive_data_model_details.py | 389 + .../models/update_sensitive_type_details.py | 312 + .../update_sensitive_type_pattern_details.py | 252 + ...target_alert_policy_association_details.py | 210 + src/oci/data_safe/models/work_request.py | 240 +- .../data_safe/models/work_request_summary.py | 236 +- src/oci/loggingsearch/log_search_client.py | 9 +- src/oci/nosql/models/table_collection.py | 66 +- src/oci/nosql/models/table_limits.py | 55 +- src/oci/service_endpoints.py | 1 + src/oci/threat_intelligence/__init__.py | 12 + .../threat_intelligence/models/__init__.py | 42 + .../models/data_attribution.py | 186 + .../models/data_visibility.py | 129 + .../models/entity_reference.py | 99 + .../threat_intelligence/models/indicator.py | 438 + .../models/indicator_attribute.py | 132 + .../models/indicator_count_collection.py | 70 + .../models/indicator_count_dimensions.py | 137 + .../models/indicator_count_summary.py | 97 + .../models/indicator_reference.py | 80 + .../models/indicator_relationship.py | 128 + .../models/indicator_source_summary.py | 70 + .../models/indicator_summary.py | 370 + .../models/indicator_summary_collection.py | 70 + .../threat_intelligence/models/threat_type.py | 132 + .../models/threat_type_summary.py | 101 + .../models/threat_types_collection.py | 70 + .../threat_intelligence/threatintel_client.py | 547 + ...threatintel_client_composite_operations.py | 24 + src/oci/version.py | 2 +- 712 files changed, 99063 insertions(+), 2727 deletions(-) create mode 100644 docs/api/ai_vision.rst create mode 100644 docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClient.rst create mode 100644 docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClientCompositeOperations.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentResult.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageResult.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.BoundingPolygon.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Cell.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ChangeModelCompartmentDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ChangeProjectCompartmentDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.CreateDocumentJobDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.CreateImageJobDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.CreateModelDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.CreateProjectDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DataScienceLabelingDataset.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Dataset.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DetectedDocumentType.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DetectedLanguage.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Dimensions.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentClassificationFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentField.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentJob.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentKeyValueDetectionFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentLanguageClassificationFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentMetadata.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentTableDetectionFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.DocumentTextDetectionFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.FieldLabel.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.FieldName.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.FieldValue.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageClassificationFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageJob.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageObject.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageObjectDetectionFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageText.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ImageTextDetectionFeature.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.InlineDocumentDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.InlineImageDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.InputLocation.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Label.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Line.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Model.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ModelCollection.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ModelSummary.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.NormalizedVertex.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ObjectListInlineInputLocation.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ObjectLocation.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDataset.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDocumentDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageImageDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.OntologyClass.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.OutputLocation.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Page.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ProcessingError.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Project.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ProjectCollection.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ProjectSummary.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Table.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.TableRow.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.UpdateModelDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.UpdateProjectDetails.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValueArray.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValueDate.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValueInteger.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValueNumber.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValuePhoneNumber.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValueString.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.ValueTime.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.Word.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequest.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestError.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestErrorCollection.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntry.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntryCollection.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestResource.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummary.rst create mode 100644 docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummaryCollection.rst create mode 100644 docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClient.rst create mode 100644 docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClientCompositeOperations.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscription.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionCollection.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionSummary.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.ChangeAnnouncementSubscriptionCompartmentDetails.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.CreateAnnouncementSubscriptionDetails.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.CreateFilterGroupDetails.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.Filter.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.FilterGroup.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.FilterGroupDetails.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails.rst create mode 100644 docs/api/announcements_service/models/oci.announcements_service.models.UpdateFilterGroupDetails.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.AggregatedSnapshot.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.AggregatedStackTrace.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.SnapshotDetail.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.SpanSnapshot.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.StackTraceElement.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.ThreadSnapshot.rst create mode 100644 docs/api/apm_traces/models/oci.apm_traces.models.TraceSnapshot.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.Alert.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertAggregationItems.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertAnalyticsCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertPolicy.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertPolicyCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRule.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertPolicySummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AlertsAggregationDimension.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ApplyDiscoveryJobResultsDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrieval.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditConditions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationDimensions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationItems.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditEventAnalyticsCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditEventCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditEventSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditPolicy.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAggregationItems.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAnalyticCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditPolicyCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditPolicyDimensions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditPolicySummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditProfile.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditProfileAggregationItems.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditProfileAnalyticCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditProfileCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditProfileDimensions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditProfileSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditSpecification.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditTrail.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditTrailAggregationItems.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditTrailAnalyticCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditTrailCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditTrailDimensions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AuditTrailSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeAvailableDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeCollectedDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeAlertCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeAlertPolicyCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeAuditPolicyCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeAuditProfileCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeDiscoveryJobCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeLibraryMaskingFormatCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeMaskingPolicyCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeReportCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeReportDefinitionCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeRetentionDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveDataModelCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveTypeCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ChangeTargetAlertPolicyAssociationCompartmentDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.Column.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ColumnFilter.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ColumnSorting.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ColumnSourceDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromSdmDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromTargetDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ColumnSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForDataTypes.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForSensitiveTypes.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyRuleDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateAuditArchiveRetrievalDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateAuditPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateAuditProfileDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromSdmDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromTargetDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateDiscoveryJobDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateLibraryMaskingFormatDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateMaskingColumnDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateMaskingPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateReportDefinitionDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveCategoryDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveColumnDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveDataModelDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypeDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypePatternDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DeleteRowsFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionDateFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DeterministicSubstitutionFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.Dimensions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryJob.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResult.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DownloadDiscoveryReportDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingLogDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingReportDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.DownloadSensitiveDataModelDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.EnableConditions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.FixedNumberFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.FixedStringFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.FormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.FormatSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.FormatsForDataType.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.FormatsForSensitiveType.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingReportForDownloadDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.GenerateReportDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.GlobalSettings.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormat.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskDataDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskedColumnCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskedColumnSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsDimensions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingColumn.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingColumnCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingColumnSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingFormat.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingPolicy.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingPolicyCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingPolicySummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingReport.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingReportCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.MaskingReportSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ModifiedAttributes.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ModifyGlobalSettingsDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.NullValueFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PPFFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchAlertPolicyRuleDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchAlertsDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchDiscoveryJobResultDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchInsertInstruction.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchInstruction.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchMaskingColumnsDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchMergeInstruction.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchRemoveInstruction.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PatchSensitiveColumnDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.PreserveOriginalDataFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditConditions.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomDateFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomDecimalNumberFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomDigitsFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomListFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomNumberFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomStringFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RandomSubstitutionFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RegularExpressionFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.Report.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ReportCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ReportDefinition.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ReportSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.RoleSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SQLExpressionFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SchemaSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveCategory.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveColumn.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModel.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveType.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveTypePattern.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.ShuffleFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.StartAuditTrailDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.SubstringFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.Summary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.TableSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociation.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationCollection.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationSummary.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.TruncateTableFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UDFFormatEntry.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAlertDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyRuleDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAuditArchiveRetrievalDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAuditPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAuditProfileDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateAuditTrailDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceSdmDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceTargetDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateLibraryMaskingFormatDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingColumnDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingPolicyDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateReportDefinitionDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveCategoryDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveColumnDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveDataModelDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypeDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypePatternDetails.rst create mode 100644 docs/api/data_safe/models/oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails.rst create mode 100644 docs/api/threat_intelligence.rst create mode 100644 docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClient.rst create mode 100644 docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClientCompositeOperations.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataAttribution.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataVisibility.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.EntityReference.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.Indicator.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorAttribute.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountCollection.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountDimensions.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountSummary.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorReference.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorRelationship.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSourceSummary.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummary.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummaryCollection.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatType.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypeSummary.rst create mode 100644 docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypesCollection.rst create mode 100644 src/oci/ai_vision/__init__.py create mode 100644 src/oci/ai_vision/ai_service_vision_client.py create mode 100644 src/oci/ai_vision/ai_service_vision_client_composite_operations.py create mode 100644 src/oci/ai_vision/models/__init__.py create mode 100644 src/oci/ai_vision/models/analyze_document_details.py create mode 100644 src/oci/ai_vision/models/analyze_document_result.py create mode 100644 src/oci/ai_vision/models/analyze_image_details.py create mode 100644 src/oci/ai_vision/models/analyze_image_result.py create mode 100644 src/oci/ai_vision/models/bounding_polygon.py create mode 100644 src/oci/ai_vision/models/cell.py create mode 100644 src/oci/ai_vision/models/change_model_compartment_details.py create mode 100644 src/oci/ai_vision/models/change_project_compartment_details.py create mode 100644 src/oci/ai_vision/models/create_document_job_details.py create mode 100644 src/oci/ai_vision/models/create_image_job_details.py create mode 100644 src/oci/ai_vision/models/create_model_details.py create mode 100644 src/oci/ai_vision/models/create_project_details.py create mode 100644 src/oci/ai_vision/models/data_science_labeling_dataset.py create mode 100644 src/oci/ai_vision/models/dataset.py create mode 100644 src/oci/ai_vision/models/detected_document_type.py create mode 100644 src/oci/ai_vision/models/detected_language.py create mode 100644 src/oci/ai_vision/models/dimensions.py create mode 100644 src/oci/ai_vision/models/document_classification_feature.py create mode 100644 src/oci/ai_vision/models/document_details.py create mode 100644 src/oci/ai_vision/models/document_feature.py create mode 100644 src/oci/ai_vision/models/document_field.py create mode 100644 src/oci/ai_vision/models/document_job.py create mode 100644 src/oci/ai_vision/models/document_key_value_detection_feature.py create mode 100644 src/oci/ai_vision/models/document_language_classification_feature.py create mode 100644 src/oci/ai_vision/models/document_metadata.py create mode 100644 src/oci/ai_vision/models/document_table_detection_feature.py create mode 100644 src/oci/ai_vision/models/document_text_detection_feature.py create mode 100644 src/oci/ai_vision/models/field_label.py create mode 100644 src/oci/ai_vision/models/field_name.py create mode 100644 src/oci/ai_vision/models/field_value.py create mode 100644 src/oci/ai_vision/models/image_classification_feature.py create mode 100644 src/oci/ai_vision/models/image_details.py create mode 100644 src/oci/ai_vision/models/image_feature.py create mode 100644 src/oci/ai_vision/models/image_job.py create mode 100644 src/oci/ai_vision/models/image_object.py create mode 100644 src/oci/ai_vision/models/image_object_detection_feature.py create mode 100644 src/oci/ai_vision/models/image_text.py create mode 100644 src/oci/ai_vision/models/image_text_detection_feature.py create mode 100644 src/oci/ai_vision/models/inline_document_details.py create mode 100644 src/oci/ai_vision/models/inline_image_details.py create mode 100644 src/oci/ai_vision/models/input_location.py create mode 100644 src/oci/ai_vision/models/label.py create mode 100644 src/oci/ai_vision/models/line.py create mode 100644 src/oci/ai_vision/models/model.py create mode 100644 src/oci/ai_vision/models/model_collection.py create mode 100644 src/oci/ai_vision/models/model_summary.py create mode 100644 src/oci/ai_vision/models/normalized_vertex.py create mode 100644 src/oci/ai_vision/models/object_list_inline_input_location.py create mode 100644 src/oci/ai_vision/models/object_location.py create mode 100644 src/oci/ai_vision/models/object_storage_dataset.py create mode 100644 src/oci/ai_vision/models/object_storage_document_details.py create mode 100644 src/oci/ai_vision/models/object_storage_image_details.py create mode 100644 src/oci/ai_vision/models/ontology_class.py create mode 100644 src/oci/ai_vision/models/output_location.py create mode 100644 src/oci/ai_vision/models/page.py create mode 100644 src/oci/ai_vision/models/processing_error.py create mode 100644 src/oci/ai_vision/models/project.py create mode 100644 src/oci/ai_vision/models/project_collection.py create mode 100644 src/oci/ai_vision/models/project_summary.py create mode 100644 src/oci/ai_vision/models/table.py create mode 100644 src/oci/ai_vision/models/table_row.py create mode 100644 src/oci/ai_vision/models/update_model_details.py create mode 100644 src/oci/ai_vision/models/update_project_details.py create mode 100644 src/oci/ai_vision/models/value_array.py create mode 100644 src/oci/ai_vision/models/value_date.py create mode 100644 src/oci/ai_vision/models/value_integer.py create mode 100644 src/oci/ai_vision/models/value_number.py create mode 100644 src/oci/ai_vision/models/value_phone_number.py create mode 100644 src/oci/ai_vision/models/value_string.py create mode 100644 src/oci/ai_vision/models/value_time.py create mode 100644 src/oci/ai_vision/models/word.py create mode 100644 src/oci/ai_vision/models/work_request.py create mode 100644 src/oci/ai_vision/models/work_request_error.py create mode 100644 src/oci/ai_vision/models/work_request_error_collection.py create mode 100644 src/oci/ai_vision/models/work_request_log_entry.py create mode 100644 src/oci/ai_vision/models/work_request_log_entry_collection.py create mode 100644 src/oci/ai_vision/models/work_request_resource.py create mode 100644 src/oci/ai_vision/models/work_request_summary.py create mode 100644 src/oci/ai_vision/models/work_request_summary_collection.py create mode 100644 src/oci/announcements_service/announcement_subscription_client.py create mode 100644 src/oci/announcements_service/announcement_subscription_client_composite_operations.py create mode 100644 src/oci/announcements_service/models/announcement_subscription.py create mode 100644 src/oci/announcements_service/models/announcement_subscription_collection.py create mode 100644 src/oci/announcements_service/models/announcement_subscription_summary.py create mode 100644 src/oci/announcements_service/models/change_announcement_subscription_compartment_details.py create mode 100644 src/oci/announcements_service/models/create_announcement_subscription_details.py create mode 100644 src/oci/announcements_service/models/create_filter_group_details.py create mode 100644 src/oci/announcements_service/models/filter.py create mode 100644 src/oci/announcements_service/models/filter_group.py create mode 100644 src/oci/announcements_service/models/filter_group_details.py create mode 100644 src/oci/announcements_service/models/update_announcement_subscription_details.py create mode 100644 src/oci/announcements_service/models/update_filter_group_details.py create mode 100644 src/oci/apm_traces/models/aggregated_snapshot.py create mode 100644 src/oci/apm_traces/models/aggregated_stack_trace.py create mode 100644 src/oci/apm_traces/models/snapshot_detail.py create mode 100644 src/oci/apm_traces/models/span_snapshot.py create mode 100644 src/oci/apm_traces/models/stack_trace_element.py create mode 100644 src/oci/apm_traces/models/thread_snapshot.py create mode 100644 src/oci/apm_traces/models/trace_snapshot.py create mode 100644 src/oci/data_safe/models/alert.py create mode 100644 src/oci/data_safe/models/alert_aggregation_items.py create mode 100644 src/oci/data_safe/models/alert_analytics_collection.py create mode 100644 src/oci/data_safe/models/alert_collection.py create mode 100644 src/oci/data_safe/models/alert_policy.py create mode 100644 src/oci/data_safe/models/alert_policy_collection.py create mode 100644 src/oci/data_safe/models/alert_policy_rule.py create mode 100644 src/oci/data_safe/models/alert_policy_rule_collection.py create mode 100644 src/oci/data_safe/models/alert_policy_rule_summary.py create mode 100644 src/oci/data_safe/models/alert_policy_summary.py create mode 100644 src/oci/data_safe/models/alert_summary.py create mode 100644 src/oci/data_safe/models/alerts_aggregation_dimension.py create mode 100644 src/oci/data_safe/models/apply_discovery_job_results_details.py create mode 100644 src/oci/data_safe/models/audit_archive_retrieval.py create mode 100644 src/oci/data_safe/models/audit_archive_retrieval_collection.py create mode 100644 src/oci/data_safe/models/audit_archive_retrieval_summary.py create mode 100644 src/oci/data_safe/models/audit_conditions.py create mode 100644 src/oci/data_safe/models/audit_event_aggregation_dimensions.py create mode 100644 src/oci/data_safe/models/audit_event_aggregation_items.py create mode 100644 src/oci/data_safe/models/audit_event_analytics_collection.py create mode 100644 src/oci/data_safe/models/audit_event_collection.py create mode 100644 src/oci/data_safe/models/audit_event_summary.py create mode 100644 src/oci/data_safe/models/audit_policy.py create mode 100644 src/oci/data_safe/models/audit_policy_aggregation_items.py create mode 100644 src/oci/data_safe/models/audit_policy_analytic_collection.py create mode 100644 src/oci/data_safe/models/audit_policy_collection.py create mode 100644 src/oci/data_safe/models/audit_policy_dimensions.py create mode 100644 src/oci/data_safe/models/audit_policy_summary.py create mode 100644 src/oci/data_safe/models/audit_profile.py create mode 100644 src/oci/data_safe/models/audit_profile_aggregation_items.py create mode 100644 src/oci/data_safe/models/audit_profile_analytic_collection.py create mode 100644 src/oci/data_safe/models/audit_profile_collection.py create mode 100644 src/oci/data_safe/models/audit_profile_dimensions.py create mode 100644 src/oci/data_safe/models/audit_profile_summary.py create mode 100644 src/oci/data_safe/models/audit_specification.py create mode 100644 src/oci/data_safe/models/audit_trail.py create mode 100644 src/oci/data_safe/models/audit_trail_aggregation_items.py create mode 100644 src/oci/data_safe/models/audit_trail_analytic_collection.py create mode 100644 src/oci/data_safe/models/audit_trail_collection.py create mode 100644 src/oci/data_safe/models/audit_trail_dimensions.py create mode 100644 src/oci/data_safe/models/audit_trail_summary.py create mode 100644 src/oci/data_safe/models/available_audit_volume_collection.py create mode 100644 src/oci/data_safe/models/available_audit_volume_summary.py create mode 100644 src/oci/data_safe/models/calculate_audit_volume_available_details.py create mode 100644 src/oci/data_safe/models/calculate_audit_volume_collected_details.py create mode 100644 src/oci/data_safe/models/change_alert_compartment_details.py create mode 100644 src/oci/data_safe/models/change_alert_policy_compartment_details.py create mode 100644 src/oci/data_safe/models/change_audit_archive_retrieval_compartment_details.py create mode 100644 src/oci/data_safe/models/change_audit_policy_compartment_details.py create mode 100644 src/oci/data_safe/models/change_audit_profile_compartment_details.py create mode 100644 src/oci/data_safe/models/change_discovery_job_compartment_details.py create mode 100644 src/oci/data_safe/models/change_library_masking_format_compartment_details.py create mode 100644 src/oci/data_safe/models/change_masking_policy_compartment_details.py create mode 100644 src/oci/data_safe/models/change_report_compartment_details.py create mode 100644 src/oci/data_safe/models/change_report_definition_compartment_details.py create mode 100644 src/oci/data_safe/models/change_retention_details.py create mode 100644 src/oci/data_safe/models/change_sensitive_data_model_compartment_details.py create mode 100644 src/oci/data_safe/models/change_sensitive_type_compartment_details.py create mode 100644 src/oci/data_safe/models/change_target_alert_policy_association_compartment_details.py create mode 100644 src/oci/data_safe/models/collected_audit_volume_collection.py create mode 100644 src/oci/data_safe/models/collected_audit_volume_summary.py create mode 100644 src/oci/data_safe/models/column.py create mode 100644 src/oci/data_safe/models/column_filter.py create mode 100644 src/oci/data_safe/models/column_sorting.py create mode 100644 src/oci/data_safe/models/column_source_details.py create mode 100644 src/oci/data_safe/models/column_source_from_sdm_details.py create mode 100644 src/oci/data_safe/models/column_source_from_target_details.py create mode 100644 src/oci/data_safe/models/column_summary.py create mode 100644 src/oci/data_safe/models/compatible_formats_for_data_types.py create mode 100644 src/oci/data_safe/models/compatible_formats_for_sensitive_types.py create mode 100644 src/oci/data_safe/models/create_alert_policy_details.py create mode 100644 src/oci/data_safe/models/create_alert_policy_rule_details.py create mode 100644 src/oci/data_safe/models/create_audit_archive_retrieval_details.py create mode 100644 src/oci/data_safe/models/create_audit_policy_details.py create mode 100644 src/oci/data_safe/models/create_audit_profile_details.py create mode 100644 src/oci/data_safe/models/create_column_source_details.py create mode 100644 src/oci/data_safe/models/create_column_source_from_sdm_details.py create mode 100644 src/oci/data_safe/models/create_column_source_from_target_details.py create mode 100644 src/oci/data_safe/models/create_discovery_job_details.py create mode 100644 src/oci/data_safe/models/create_library_masking_format_details.py create mode 100644 src/oci/data_safe/models/create_masking_column_details.py create mode 100644 src/oci/data_safe/models/create_masking_policy_details.py create mode 100644 src/oci/data_safe/models/create_report_definition_details.py create mode 100644 src/oci/data_safe/models/create_sensitive_category_details.py create mode 100644 src/oci/data_safe/models/create_sensitive_column_details.py create mode 100644 src/oci/data_safe/models/create_sensitive_data_model_details.py create mode 100644 src/oci/data_safe/models/create_sensitive_type_details.py create mode 100644 src/oci/data_safe/models/create_sensitive_type_pattern_details.py create mode 100644 src/oci/data_safe/models/create_target_alert_policy_association_details.py create mode 100644 src/oci/data_safe/models/delete_rows_format_entry.py create mode 100644 src/oci/data_safe/models/deterministic_encryption_date_format_entry.py create mode 100644 src/oci/data_safe/models/deterministic_encryption_format_entry.py create mode 100644 src/oci/data_safe/models/deterministic_substitution_format_entry.py create mode 100644 src/oci/data_safe/models/dimensions.py create mode 100644 src/oci/data_safe/models/discovery_analytics_collection.py create mode 100644 src/oci/data_safe/models/discovery_analytics_summary.py create mode 100644 src/oci/data_safe/models/discovery_job.py create mode 100644 src/oci/data_safe/models/discovery_job_collection.py create mode 100644 src/oci/data_safe/models/discovery_job_result.py create mode 100644 src/oci/data_safe/models/discovery_job_result_collection.py create mode 100644 src/oci/data_safe/models/discovery_job_result_summary.py create mode 100644 src/oci/data_safe/models/discovery_job_summary.py create mode 100644 src/oci/data_safe/models/download_discovery_report_details.py create mode 100644 src/oci/data_safe/models/download_masking_log_details.py create mode 100644 src/oci/data_safe/models/download_masking_policy_details.py create mode 100644 src/oci/data_safe/models/download_masking_report_details.py create mode 100644 src/oci/data_safe/models/download_sensitive_data_model_details.py create mode 100644 src/oci/data_safe/models/enable_conditions.py create mode 100644 src/oci/data_safe/models/fixed_number_format_entry.py create mode 100644 src/oci/data_safe/models/fixed_string_format_entry.py create mode 100644 src/oci/data_safe/models/format_entry.py create mode 100644 src/oci/data_safe/models/format_summary.py create mode 100644 src/oci/data_safe/models/formats_for_data_type.py create mode 100644 src/oci/data_safe/models/formats_for_sensitive_type.py create mode 100644 src/oci/data_safe/models/generate_discovery_report_for_download_details.py create mode 100644 src/oci/data_safe/models/generate_masking_policy_for_download_details.py create mode 100644 src/oci/data_safe/models/generate_masking_report_for_download_details.py create mode 100644 src/oci/data_safe/models/generate_report_details.py create mode 100644 src/oci/data_safe/models/generate_sensitive_data_model_for_download_details.py create mode 100644 src/oci/data_safe/models/global_settings.py create mode 100644 src/oci/data_safe/models/library_masking_format.py create mode 100644 src/oci/data_safe/models/library_masking_format_collection.py create mode 100644 src/oci/data_safe/models/library_masking_format_entry.py create mode 100644 src/oci/data_safe/models/library_masking_format_summary.py create mode 100644 src/oci/data_safe/models/mask_data_details.py create mode 100644 src/oci/data_safe/models/masked_column_collection.py create mode 100644 src/oci/data_safe/models/masked_column_summary.py create mode 100644 src/oci/data_safe/models/masking_analytics_collection.py create mode 100644 src/oci/data_safe/models/masking_analytics_dimensions.py create mode 100644 src/oci/data_safe/models/masking_analytics_summary.py create mode 100644 src/oci/data_safe/models/masking_column.py create mode 100644 src/oci/data_safe/models/masking_column_collection.py create mode 100644 src/oci/data_safe/models/masking_column_summary.py create mode 100644 src/oci/data_safe/models/masking_format.py create mode 100644 src/oci/data_safe/models/masking_policy.py create mode 100644 src/oci/data_safe/models/masking_policy_collection.py create mode 100644 src/oci/data_safe/models/masking_policy_summary.py create mode 100644 src/oci/data_safe/models/masking_report.py create mode 100644 src/oci/data_safe/models/masking_report_collection.py create mode 100644 src/oci/data_safe/models/masking_report_summary.py create mode 100644 src/oci/data_safe/models/modified_attributes.py create mode 100644 src/oci/data_safe/models/modify_global_settings_details.py create mode 100644 src/oci/data_safe/models/null_value_format_entry.py create mode 100644 src/oci/data_safe/models/patch_alert_policy_rule_details.py create mode 100644 src/oci/data_safe/models/patch_alerts_details.py create mode 100644 src/oci/data_safe/models/patch_discovery_job_result_details.py create mode 100644 src/oci/data_safe/models/patch_insert_instruction.py create mode 100644 src/oci/data_safe/models/patch_instruction.py create mode 100644 src/oci/data_safe/models/patch_masking_columns_details.py create mode 100644 src/oci/data_safe/models/patch_merge_instruction.py create mode 100644 src/oci/data_safe/models/patch_remove_instruction.py create mode 100644 src/oci/data_safe/models/patch_sensitive_column_details.py create mode 100644 src/oci/data_safe/models/ppf_format_entry.py create mode 100644 src/oci/data_safe/models/preserve_original_data_format_entry.py create mode 100644 src/oci/data_safe/models/provision_audit_conditions.py create mode 100644 src/oci/data_safe/models/provision_audit_policy_details.py create mode 100644 src/oci/data_safe/models/random_date_format_entry.py create mode 100644 src/oci/data_safe/models/random_decimal_number_format_entry.py create mode 100644 src/oci/data_safe/models/random_digits_format_entry.py create mode 100644 src/oci/data_safe/models/random_list_format_entry.py create mode 100644 src/oci/data_safe/models/random_number_format_entry.py create mode 100644 src/oci/data_safe/models/random_string_format_entry.py create mode 100644 src/oci/data_safe/models/random_substitution_format_entry.py create mode 100644 src/oci/data_safe/models/regular_expression_format_entry.py create mode 100644 src/oci/data_safe/models/report.py create mode 100644 src/oci/data_safe/models/report_collection.py create mode 100644 src/oci/data_safe/models/report_definition.py create mode 100644 src/oci/data_safe/models/report_definition_collection.py create mode 100644 src/oci/data_safe/models/report_definition_summary.py create mode 100644 src/oci/data_safe/models/report_summary.py create mode 100644 src/oci/data_safe/models/role_summary.py create mode 100644 src/oci/data_safe/models/schema_summary.py create mode 100644 src/oci/data_safe/models/sensitive_category.py create mode 100644 src/oci/data_safe/models/sensitive_column.py create mode 100644 src/oci/data_safe/models/sensitive_column_collection.py create mode 100644 src/oci/data_safe/models/sensitive_column_summary.py create mode 100644 src/oci/data_safe/models/sensitive_data_model.py create mode 100644 src/oci/data_safe/models/sensitive_data_model_collection.py create mode 100644 src/oci/data_safe/models/sensitive_data_model_summary.py create mode 100644 src/oci/data_safe/models/sensitive_type.py create mode 100644 src/oci/data_safe/models/sensitive_type_collection.py create mode 100644 src/oci/data_safe/models/sensitive_type_pattern.py create mode 100644 src/oci/data_safe/models/sensitive_type_summary.py create mode 100644 src/oci/data_safe/models/shuffle_format_entry.py create mode 100644 src/oci/data_safe/models/sql_expression_format_entry.py create mode 100644 src/oci/data_safe/models/start_audit_trail_details.py create mode 100644 src/oci/data_safe/models/substring_format_entry.py create mode 100644 src/oci/data_safe/models/summary.py create mode 100644 src/oci/data_safe/models/table_summary.py create mode 100644 src/oci/data_safe/models/target_alert_policy_association.py create mode 100644 src/oci/data_safe/models/target_alert_policy_association_collection.py create mode 100644 src/oci/data_safe/models/target_alert_policy_association_summary.py create mode 100644 src/oci/data_safe/models/truncate_table_format_entry.py create mode 100644 src/oci/data_safe/models/udf_format_entry.py create mode 100644 src/oci/data_safe/models/update_alert_details.py create mode 100644 src/oci/data_safe/models/update_alert_policy_rule_details.py create mode 100644 src/oci/data_safe/models/update_audit_archive_retrieval_details.py create mode 100644 src/oci/data_safe/models/update_audit_policy_details.py create mode 100644 src/oci/data_safe/models/update_audit_profile_details.py create mode 100644 src/oci/data_safe/models/update_audit_trail_details.py create mode 100644 src/oci/data_safe/models/update_column_source_details.py create mode 100644 src/oci/data_safe/models/update_column_source_sdm_details.py create mode 100644 src/oci/data_safe/models/update_column_source_target_details.py create mode 100644 src/oci/data_safe/models/update_library_masking_format_details.py create mode 100644 src/oci/data_safe/models/update_masking_column_details.py create mode 100644 src/oci/data_safe/models/update_masking_policy_details.py create mode 100644 src/oci/data_safe/models/update_report_definition_details.py create mode 100644 src/oci/data_safe/models/update_sensitive_category_details.py create mode 100644 src/oci/data_safe/models/update_sensitive_column_details.py create mode 100644 src/oci/data_safe/models/update_sensitive_data_model_details.py create mode 100644 src/oci/data_safe/models/update_sensitive_type_details.py create mode 100644 src/oci/data_safe/models/update_sensitive_type_pattern_details.py create mode 100644 src/oci/data_safe/models/update_target_alert_policy_association_details.py create mode 100644 src/oci/threat_intelligence/__init__.py create mode 100644 src/oci/threat_intelligence/models/__init__.py create mode 100644 src/oci/threat_intelligence/models/data_attribution.py create mode 100644 src/oci/threat_intelligence/models/data_visibility.py create mode 100644 src/oci/threat_intelligence/models/entity_reference.py create mode 100644 src/oci/threat_intelligence/models/indicator.py create mode 100644 src/oci/threat_intelligence/models/indicator_attribute.py create mode 100644 src/oci/threat_intelligence/models/indicator_count_collection.py create mode 100644 src/oci/threat_intelligence/models/indicator_count_dimensions.py create mode 100644 src/oci/threat_intelligence/models/indicator_count_summary.py create mode 100644 src/oci/threat_intelligence/models/indicator_reference.py create mode 100644 src/oci/threat_intelligence/models/indicator_relationship.py create mode 100644 src/oci/threat_intelligence/models/indicator_source_summary.py create mode 100644 src/oci/threat_intelligence/models/indicator_summary.py create mode 100644 src/oci/threat_intelligence/models/indicator_summary_collection.py create mode 100644 src/oci/threat_intelligence/models/threat_type.py create mode 100644 src/oci/threat_intelligence/models/threat_type_summary.py create mode 100644 src/oci/threat_intelligence/models/threat_types_collection.py create mode 100644 src/oci/threat_intelligence/threatintel_client.py create mode 100644 src/oci/threat_intelligence/threatintel_client_composite_operations.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8d395d69ae..54ebd706d8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,25 @@ Change Log All notable changes to this project will be documented in this file. The format is based on `Keep a Changelog `_. +==================== +2.57.0 - 2022-02-15 +==================== + +Added +------ +* Support for the AI Vision service +* Support for the Threat Intelligence service +* Support for creation of NoSQL database tables with on-demand throughput capacity in the NoSQL Database Cloud service +* Support for tagging features in the Oracle Container Engine for Kubernetes (OKE) service +* Support for trace snapshots in the Application Performance Monitoring service +* Support for auditing and alerts in the Data Safe service +* Support for data discovery and data masking in the Data Safe service +* Support for customized subscriptions and delivery of announcements by email and SMS in the Announcements service + +Breaking +-------- +* The API `query_old` was removed from `query_client` in the Application Performance Monitoring service + ==================== 2.56.0 - 2022-02-08 ==================== diff --git a/docs/api/ai_vision.rst b/docs/api/ai_vision.rst new file mode 100644 index 0000000000..7a9396d299 --- /dev/null +++ b/docs/api/ai_vision.rst @@ -0,0 +1,99 @@ +Ai Vision +========= + +.. autosummary:: + :toctree: ai_vision/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.ai_vision.AIServiceVisionClient + oci.ai_vision.AIServiceVisionClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: ai_vision/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.ai_vision.models.AnalyzeDocumentDetails + oci.ai_vision.models.AnalyzeDocumentResult + oci.ai_vision.models.AnalyzeImageDetails + oci.ai_vision.models.AnalyzeImageResult + oci.ai_vision.models.BoundingPolygon + oci.ai_vision.models.Cell + oci.ai_vision.models.ChangeModelCompartmentDetails + oci.ai_vision.models.ChangeProjectCompartmentDetails + oci.ai_vision.models.CreateDocumentJobDetails + oci.ai_vision.models.CreateImageJobDetails + oci.ai_vision.models.CreateModelDetails + oci.ai_vision.models.CreateProjectDetails + oci.ai_vision.models.DataScienceLabelingDataset + oci.ai_vision.models.Dataset + oci.ai_vision.models.DetectedDocumentType + oci.ai_vision.models.DetectedLanguage + oci.ai_vision.models.Dimensions + oci.ai_vision.models.DocumentClassificationFeature + oci.ai_vision.models.DocumentDetails + oci.ai_vision.models.DocumentFeature + oci.ai_vision.models.DocumentField + oci.ai_vision.models.DocumentJob + oci.ai_vision.models.DocumentKeyValueDetectionFeature + oci.ai_vision.models.DocumentLanguageClassificationFeature + oci.ai_vision.models.DocumentMetadata + oci.ai_vision.models.DocumentTableDetectionFeature + oci.ai_vision.models.DocumentTextDetectionFeature + oci.ai_vision.models.FieldLabel + oci.ai_vision.models.FieldName + oci.ai_vision.models.FieldValue + oci.ai_vision.models.ImageClassificationFeature + oci.ai_vision.models.ImageDetails + oci.ai_vision.models.ImageFeature + oci.ai_vision.models.ImageJob + oci.ai_vision.models.ImageObject + oci.ai_vision.models.ImageObjectDetectionFeature + oci.ai_vision.models.ImageText + oci.ai_vision.models.ImageTextDetectionFeature + oci.ai_vision.models.InlineDocumentDetails + oci.ai_vision.models.InlineImageDetails + oci.ai_vision.models.InputLocation + oci.ai_vision.models.Label + oci.ai_vision.models.Line + oci.ai_vision.models.Model + oci.ai_vision.models.ModelCollection + oci.ai_vision.models.ModelSummary + oci.ai_vision.models.NormalizedVertex + oci.ai_vision.models.ObjectListInlineInputLocation + oci.ai_vision.models.ObjectLocation + oci.ai_vision.models.ObjectStorageDataset + oci.ai_vision.models.ObjectStorageDocumentDetails + oci.ai_vision.models.ObjectStorageImageDetails + oci.ai_vision.models.OntologyClass + oci.ai_vision.models.OutputLocation + oci.ai_vision.models.Page + oci.ai_vision.models.ProcessingError + oci.ai_vision.models.Project + oci.ai_vision.models.ProjectCollection + oci.ai_vision.models.ProjectSummary + oci.ai_vision.models.Table + oci.ai_vision.models.TableRow + oci.ai_vision.models.UpdateModelDetails + oci.ai_vision.models.UpdateProjectDetails + oci.ai_vision.models.ValueArray + oci.ai_vision.models.ValueDate + oci.ai_vision.models.ValueInteger + oci.ai_vision.models.ValueNumber + oci.ai_vision.models.ValuePhoneNumber + oci.ai_vision.models.ValueString + oci.ai_vision.models.ValueTime + oci.ai_vision.models.Word + oci.ai_vision.models.WorkRequest + oci.ai_vision.models.WorkRequestError + oci.ai_vision.models.WorkRequestErrorCollection + oci.ai_vision.models.WorkRequestLogEntry + oci.ai_vision.models.WorkRequestLogEntryCollection + oci.ai_vision.models.WorkRequestResource + oci.ai_vision.models.WorkRequestSummary + oci.ai_vision.models.WorkRequestSummaryCollection diff --git a/docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClient.rst b/docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClient.rst new file mode 100644 index 0000000000..589042dc20 --- /dev/null +++ b/docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClient.rst @@ -0,0 +1,8 @@ +AIServiceVisionClient +===================== + +.. currentmodule:: oci.ai_vision + +.. autoclass:: AIServiceVisionClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClientCompositeOperations.rst b/docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClientCompositeOperations.rst new file mode 100644 index 0000000000..1d54feeac6 --- /dev/null +++ b/docs/api/ai_vision/client/oci.ai_vision.AIServiceVisionClientCompositeOperations.rst @@ -0,0 +1,8 @@ +AIServiceVisionClientCompositeOperations +======================================== + +.. currentmodule:: oci.ai_vision + +.. autoclass:: AIServiceVisionClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentDetails.rst new file mode 100644 index 0000000000..8a07e7a3c3 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentDetails.rst @@ -0,0 +1,11 @@ +AnalyzeDocumentDetails +====================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: AnalyzeDocumentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentResult.rst b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentResult.rst new file mode 100644 index 0000000000..bad5393441 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeDocumentResult.rst @@ -0,0 +1,11 @@ +AnalyzeDocumentResult +===================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: AnalyzeDocumentResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageDetails.rst new file mode 100644 index 0000000000..319ff23f29 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageDetails.rst @@ -0,0 +1,11 @@ +AnalyzeImageDetails +=================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: AnalyzeImageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageResult.rst b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageResult.rst new file mode 100644 index 0000000000..4d4e195697 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.AnalyzeImageResult.rst @@ -0,0 +1,11 @@ +AnalyzeImageResult +================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: AnalyzeImageResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.BoundingPolygon.rst b/docs/api/ai_vision/models/oci.ai_vision.models.BoundingPolygon.rst new file mode 100644 index 0000000000..ade35b0568 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.BoundingPolygon.rst @@ -0,0 +1,11 @@ +BoundingPolygon +=============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: BoundingPolygon + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Cell.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Cell.rst new file mode 100644 index 0000000000..0777b00f28 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Cell.rst @@ -0,0 +1,11 @@ +Cell +==== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Cell + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ChangeModelCompartmentDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ChangeModelCompartmentDetails.rst new file mode 100644 index 0000000000..2c4428653f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ChangeModelCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeModelCompartmentDetails +============================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ChangeModelCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ChangeProjectCompartmentDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ChangeProjectCompartmentDetails.rst new file mode 100644 index 0000000000..6f53525a05 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ChangeProjectCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeProjectCompartmentDetails +=============================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ChangeProjectCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.CreateDocumentJobDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.CreateDocumentJobDetails.rst new file mode 100644 index 0000000000..62587f4bb1 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.CreateDocumentJobDetails.rst @@ -0,0 +1,11 @@ +CreateDocumentJobDetails +======================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: CreateDocumentJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.CreateImageJobDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.CreateImageJobDetails.rst new file mode 100644 index 0000000000..53af3b0f35 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.CreateImageJobDetails.rst @@ -0,0 +1,11 @@ +CreateImageJobDetails +===================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: CreateImageJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.CreateModelDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.CreateModelDetails.rst new file mode 100644 index 0000000000..2a022ef3a7 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.CreateModelDetails.rst @@ -0,0 +1,11 @@ +CreateModelDetails +================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: CreateModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.CreateProjectDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.CreateProjectDetails.rst new file mode 100644 index 0000000000..3da06cfd4d --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.CreateProjectDetails.rst @@ -0,0 +1,11 @@ +CreateProjectDetails +==================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: CreateProjectDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DataScienceLabelingDataset.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DataScienceLabelingDataset.rst new file mode 100644 index 0000000000..cdf387eb1b --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DataScienceLabelingDataset.rst @@ -0,0 +1,11 @@ +DataScienceLabelingDataset +========================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DataScienceLabelingDataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Dataset.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Dataset.rst new file mode 100644 index 0000000000..cc706e4e59 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Dataset.rst @@ -0,0 +1,11 @@ +Dataset +======= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Dataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DetectedDocumentType.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DetectedDocumentType.rst new file mode 100644 index 0000000000..7c8fa87591 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DetectedDocumentType.rst @@ -0,0 +1,11 @@ +DetectedDocumentType +==================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DetectedDocumentType + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DetectedLanguage.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DetectedLanguage.rst new file mode 100644 index 0000000000..411a89d55d --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DetectedLanguage.rst @@ -0,0 +1,11 @@ +DetectedLanguage +================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DetectedLanguage + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Dimensions.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Dimensions.rst new file mode 100644 index 0000000000..72f3b3e0e2 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Dimensions.rst @@ -0,0 +1,11 @@ +Dimensions +========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Dimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentClassificationFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentClassificationFeature.rst new file mode 100644 index 0000000000..c6a6e7e314 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentClassificationFeature.rst @@ -0,0 +1,11 @@ +DocumentClassificationFeature +============================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentClassificationFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentDetails.rst new file mode 100644 index 0000000000..f06136ac97 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentDetails.rst @@ -0,0 +1,11 @@ +DocumentDetails +=============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentFeature.rst new file mode 100644 index 0000000000..38e83649d1 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentFeature.rst @@ -0,0 +1,11 @@ +DocumentFeature +=============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentField.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentField.rst new file mode 100644 index 0000000000..9377d0f91f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentField.rst @@ -0,0 +1,11 @@ +DocumentField +============= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentField + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentJob.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentJob.rst new file mode 100644 index 0000000000..28fa7f4a0c --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentJob.rst @@ -0,0 +1,11 @@ +DocumentJob +=========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentJob + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentKeyValueDetectionFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentKeyValueDetectionFeature.rst new file mode 100644 index 0000000000..fc847411a4 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentKeyValueDetectionFeature.rst @@ -0,0 +1,11 @@ +DocumentKeyValueDetectionFeature +================================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentKeyValueDetectionFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentLanguageClassificationFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentLanguageClassificationFeature.rst new file mode 100644 index 0000000000..d6c0392d38 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentLanguageClassificationFeature.rst @@ -0,0 +1,11 @@ +DocumentLanguageClassificationFeature +===================================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentLanguageClassificationFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentMetadata.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentMetadata.rst new file mode 100644 index 0000000000..3a0e716ff7 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentMetadata.rst @@ -0,0 +1,11 @@ +DocumentMetadata +================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentMetadata + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentTableDetectionFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentTableDetectionFeature.rst new file mode 100644 index 0000000000..e45c6fbd6a --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentTableDetectionFeature.rst @@ -0,0 +1,11 @@ +DocumentTableDetectionFeature +============================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentTableDetectionFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.DocumentTextDetectionFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentTextDetectionFeature.rst new file mode 100644 index 0000000000..3dd3ec5faa --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.DocumentTextDetectionFeature.rst @@ -0,0 +1,11 @@ +DocumentTextDetectionFeature +============================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: DocumentTextDetectionFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.FieldLabel.rst b/docs/api/ai_vision/models/oci.ai_vision.models.FieldLabel.rst new file mode 100644 index 0000000000..cdd09e12eb --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.FieldLabel.rst @@ -0,0 +1,11 @@ +FieldLabel +========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: FieldLabel + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.FieldName.rst b/docs/api/ai_vision/models/oci.ai_vision.models.FieldName.rst new file mode 100644 index 0000000000..d78e89c817 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.FieldName.rst @@ -0,0 +1,11 @@ +FieldName +========= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: FieldName + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.FieldValue.rst b/docs/api/ai_vision/models/oci.ai_vision.models.FieldValue.rst new file mode 100644 index 0000000000..7500fdc40c --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.FieldValue.rst @@ -0,0 +1,11 @@ +FieldValue +========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: FieldValue + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageClassificationFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageClassificationFeature.rst new file mode 100644 index 0000000000..a838abeeb3 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageClassificationFeature.rst @@ -0,0 +1,11 @@ +ImageClassificationFeature +========================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageClassificationFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageDetails.rst new file mode 100644 index 0000000000..80efeab988 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageDetails.rst @@ -0,0 +1,11 @@ +ImageDetails +============ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageFeature.rst new file mode 100644 index 0000000000..3c0e190278 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageFeature.rst @@ -0,0 +1,11 @@ +ImageFeature +============ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageJob.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageJob.rst new file mode 100644 index 0000000000..3aedfc87cd --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageJob.rst @@ -0,0 +1,11 @@ +ImageJob +======== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageJob + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageObject.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageObject.rst new file mode 100644 index 0000000000..19115ff80b --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageObject.rst @@ -0,0 +1,11 @@ +ImageObject +=========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageObject + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageObjectDetectionFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageObjectDetectionFeature.rst new file mode 100644 index 0000000000..78d64c2af1 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageObjectDetectionFeature.rst @@ -0,0 +1,11 @@ +ImageObjectDetectionFeature +=========================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageObjectDetectionFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageText.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageText.rst new file mode 100644 index 0000000000..0405a5811f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageText.rst @@ -0,0 +1,11 @@ +ImageText +========= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageText + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ImageTextDetectionFeature.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ImageTextDetectionFeature.rst new file mode 100644 index 0000000000..442a76c306 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ImageTextDetectionFeature.rst @@ -0,0 +1,11 @@ +ImageTextDetectionFeature +========================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ImageTextDetectionFeature + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.InlineDocumentDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.InlineDocumentDetails.rst new file mode 100644 index 0000000000..c0a38fc56f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.InlineDocumentDetails.rst @@ -0,0 +1,11 @@ +InlineDocumentDetails +===================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: InlineDocumentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.InlineImageDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.InlineImageDetails.rst new file mode 100644 index 0000000000..a7f0e6c718 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.InlineImageDetails.rst @@ -0,0 +1,11 @@ +InlineImageDetails +================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: InlineImageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.InputLocation.rst b/docs/api/ai_vision/models/oci.ai_vision.models.InputLocation.rst new file mode 100644 index 0000000000..55e1042760 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.InputLocation.rst @@ -0,0 +1,11 @@ +InputLocation +============= + +.. currentmodule:: oci.ai_vision.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_vision/models/oci.ai_vision.models.Label.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Label.rst new file mode 100644 index 0000000000..7df1ce1185 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Label.rst @@ -0,0 +1,11 @@ +Label +===== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Label + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Line.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Line.rst new file mode 100644 index 0000000000..a950f5284d --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Line.rst @@ -0,0 +1,11 @@ +Line +==== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Line + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Model.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Model.rst new file mode 100644 index 0000000000..5a8d201f58 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Model.rst @@ -0,0 +1,11 @@ +Model +===== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Model + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ModelCollection.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ModelCollection.rst new file mode 100644 index 0000000000..53865e5f99 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ModelCollection.rst @@ -0,0 +1,11 @@ +ModelCollection +=============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ModelCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ModelSummary.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ModelSummary.rst new file mode 100644 index 0000000000..c60bb68ac5 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ModelSummary.rst @@ -0,0 +1,11 @@ +ModelSummary +============ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ModelSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.NormalizedVertex.rst b/docs/api/ai_vision/models/oci.ai_vision.models.NormalizedVertex.rst new file mode 100644 index 0000000000..3d8de85c7f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.NormalizedVertex.rst @@ -0,0 +1,11 @@ +NormalizedVertex +================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: NormalizedVertex + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ObjectListInlineInputLocation.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectListInlineInputLocation.rst new file mode 100644 index 0000000000..cc59297c64 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectListInlineInputLocation.rst @@ -0,0 +1,11 @@ +ObjectListInlineInputLocation +============================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ObjectListInlineInputLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ObjectLocation.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectLocation.rst new file mode 100644 index 0000000000..37d5823d3a --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectLocation.rst @@ -0,0 +1,11 @@ +ObjectLocation +============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ObjectLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDataset.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDataset.rst new file mode 100644 index 0000000000..685194a0d2 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDataset.rst @@ -0,0 +1,11 @@ +ObjectStorageDataset +==================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ObjectStorageDataset + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDocumentDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDocumentDetails.rst new file mode 100644 index 0000000000..34455a9a28 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageDocumentDetails.rst @@ -0,0 +1,11 @@ +ObjectStorageDocumentDetails +============================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ObjectStorageDocumentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageImageDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageImageDetails.rst new file mode 100644 index 0000000000..f85fef45ad --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ObjectStorageImageDetails.rst @@ -0,0 +1,11 @@ +ObjectStorageImageDetails +========================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ObjectStorageImageDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.OntologyClass.rst b/docs/api/ai_vision/models/oci.ai_vision.models.OntologyClass.rst new file mode 100644 index 0000000000..0ec70dcab1 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.OntologyClass.rst @@ -0,0 +1,11 @@ +OntologyClass +============= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: OntologyClass + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.OutputLocation.rst b/docs/api/ai_vision/models/oci.ai_vision.models.OutputLocation.rst new file mode 100644 index 0000000000..f5faeea39f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.OutputLocation.rst @@ -0,0 +1,11 @@ +OutputLocation +============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: OutputLocation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Page.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Page.rst new file mode 100644 index 0000000000..af33f4b69b --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Page.rst @@ -0,0 +1,11 @@ +Page +==== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Page + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ProcessingError.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ProcessingError.rst new file mode 100644 index 0000000000..187660ba64 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ProcessingError.rst @@ -0,0 +1,11 @@ +ProcessingError +=============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ProcessingError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Project.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Project.rst new file mode 100644 index 0000000000..afbb4407c6 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Project.rst @@ -0,0 +1,11 @@ +Project +======= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Project + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ProjectCollection.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ProjectCollection.rst new file mode 100644 index 0000000000..a18e283059 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ProjectCollection.rst @@ -0,0 +1,11 @@ +ProjectCollection +================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ProjectCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ProjectSummary.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ProjectSummary.rst new file mode 100644 index 0000000000..ec10c9e5eb --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ProjectSummary.rst @@ -0,0 +1,11 @@ +ProjectSummary +============== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ProjectSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Table.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Table.rst new file mode 100644 index 0000000000..87553745e9 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Table.rst @@ -0,0 +1,11 @@ +Table +===== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Table + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.TableRow.rst b/docs/api/ai_vision/models/oci.ai_vision.models.TableRow.rst new file mode 100644 index 0000000000..ea33d24d89 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.TableRow.rst @@ -0,0 +1,11 @@ +TableRow +======== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: TableRow + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.UpdateModelDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.UpdateModelDetails.rst new file mode 100644 index 0000000000..ef39c4a915 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.UpdateModelDetails.rst @@ -0,0 +1,11 @@ +UpdateModelDetails +================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: UpdateModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.UpdateProjectDetails.rst b/docs/api/ai_vision/models/oci.ai_vision.models.UpdateProjectDetails.rst new file mode 100644 index 0000000000..90289bad73 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.UpdateProjectDetails.rst @@ -0,0 +1,11 @@ +UpdateProjectDetails +==================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: UpdateProjectDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValueArray.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValueArray.rst new file mode 100644 index 0000000000..19bb8ebe50 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValueArray.rst @@ -0,0 +1,11 @@ +ValueArray +========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValueArray + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValueDate.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValueDate.rst new file mode 100644 index 0000000000..6519a6833d --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValueDate.rst @@ -0,0 +1,11 @@ +ValueDate +========= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValueDate + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValueInteger.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValueInteger.rst new file mode 100644 index 0000000000..5daf4a3f6f --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValueInteger.rst @@ -0,0 +1,11 @@ +ValueInteger +============ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValueInteger + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValueNumber.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValueNumber.rst new file mode 100644 index 0000000000..0dcff8d264 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValueNumber.rst @@ -0,0 +1,11 @@ +ValueNumber +=========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValueNumber + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValuePhoneNumber.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValuePhoneNumber.rst new file mode 100644 index 0000000000..6ff8956316 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValuePhoneNumber.rst @@ -0,0 +1,11 @@ +ValuePhoneNumber +================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValuePhoneNumber + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValueString.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValueString.rst new file mode 100644 index 0000000000..7a64e4cbd5 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValueString.rst @@ -0,0 +1,11 @@ +ValueString +=========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValueString + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.ValueTime.rst b/docs/api/ai_vision/models/oci.ai_vision.models.ValueTime.rst new file mode 100644 index 0000000000..cc173c68a5 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.ValueTime.rst @@ -0,0 +1,11 @@ +ValueTime +========= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: ValueTime + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.Word.rst b/docs/api/ai_vision/models/oci.ai_vision.models.Word.rst new file mode 100644 index 0000000000..2459910129 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.Word.rst @@ -0,0 +1,11 @@ +Word +==== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: Word + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequest.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequest.rst new file mode 100644 index 0000000000..5b03b9d4e3 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequest.rst @@ -0,0 +1,11 @@ +WorkRequest +=========== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequest + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestError.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestError.rst new file mode 100644 index 0000000000..9722a2ab79 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestError.rst @@ -0,0 +1,11 @@ +WorkRequestError +================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestError + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestErrorCollection.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestErrorCollection.rst new file mode 100644 index 0000000000..7b1471a3f3 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestErrorCollection.rst @@ -0,0 +1,11 @@ +WorkRequestErrorCollection +========================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestErrorCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntry.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntry.rst new file mode 100644 index 0000000000..1983fc2a6d --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntry.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntry +=================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestLogEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntryCollection.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntryCollection.rst new file mode 100644 index 0000000000..0c69637ee8 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestLogEntryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestLogEntryCollection +============================= + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestLogEntryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestResource.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestResource.rst new file mode 100644 index 0000000000..a410c40726 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestResource.rst @@ -0,0 +1,11 @@ +WorkRequestResource +=================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestResource + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummary.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummary.rst new file mode 100644 index 0000000000..ede2316825 --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummary.rst @@ -0,0 +1,11 @@ +WorkRequestSummary +================== + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummaryCollection.rst b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummaryCollection.rst new file mode 100644 index 0000000000..cb8b68b1ce --- /dev/null +++ b/docs/api/ai_vision/models/oci.ai_vision.models.WorkRequestSummaryCollection.rst @@ -0,0 +1,11 @@ +WorkRequestSummaryCollection +============================ + +.. currentmodule:: oci.ai_vision.models + +.. autoclass:: WorkRequestSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service.rst b/docs/api/announcements_service.rst index 45d20492a1..8c158866fb 100644 --- a/docs/api/announcements_service.rst +++ b/docs/api/announcements_service.rst @@ -7,8 +7,10 @@ Announcements Service :template: autosummary/service_client.rst oci.announcements_service.AnnouncementClient + oci.announcements_service.AnnouncementSubscriptionClient oci.announcements_service.AnnouncementsPreferencesClient oci.announcements_service.AnnouncementClientCompositeOperations + oci.announcements_service.AnnouncementSubscriptionClientCompositeOperations oci.announcements_service.AnnouncementsPreferencesClientCompositeOperations -------- @@ -22,6 +24,9 @@ Announcements Service oci.announcements_service.models.AffectedResource oci.announcements_service.models.Announcement + oci.announcements_service.models.AnnouncementSubscription + oci.announcements_service.models.AnnouncementSubscriptionCollection + oci.announcements_service.models.AnnouncementSubscriptionSummary oci.announcements_service.models.AnnouncementSummary oci.announcements_service.models.AnnouncementUserStatusDetails oci.announcements_service.models.AnnouncementsCollection @@ -30,6 +35,14 @@ Announcements Service oci.announcements_service.models.BaseAnnouncement oci.announcements_service.models.BaseAnnouncementsPreferences oci.announcements_service.models.BaseCreateAnnouncementsPreferencesDetails + oci.announcements_service.models.ChangeAnnouncementSubscriptionCompartmentDetails + oci.announcements_service.models.CreateAnnouncementSubscriptionDetails oci.announcements_service.models.CreateAnnouncementsPreferencesDetails + oci.announcements_service.models.CreateFilterGroupDetails + oci.announcements_service.models.Filter + oci.announcements_service.models.FilterGroup + oci.announcements_service.models.FilterGroupDetails oci.announcements_service.models.ModelProperty + oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails oci.announcements_service.models.UpdateAnnouncementsPreferencesDetails + oci.announcements_service.models.UpdateFilterGroupDetails diff --git a/docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClient.rst b/docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClient.rst new file mode 100644 index 0000000000..b006aabed4 --- /dev/null +++ b/docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClient.rst @@ -0,0 +1,8 @@ +AnnouncementSubscriptionClient +============================== + +.. currentmodule:: oci.announcements_service + +.. autoclass:: AnnouncementSubscriptionClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClientCompositeOperations.rst b/docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClientCompositeOperations.rst new file mode 100644 index 0000000000..3054b97ca7 --- /dev/null +++ b/docs/api/announcements_service/client/oci.announcements_service.AnnouncementSubscriptionClientCompositeOperations.rst @@ -0,0 +1,8 @@ +AnnouncementSubscriptionClientCompositeOperations +================================================= + +.. currentmodule:: oci.announcements_service + +.. autoclass:: AnnouncementSubscriptionClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscription.rst b/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscription.rst new file mode 100644 index 0000000000..c3bb50a819 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscription.rst @@ -0,0 +1,11 @@ +AnnouncementSubscription +======================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: AnnouncementSubscription + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionCollection.rst b/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionCollection.rst new file mode 100644 index 0000000000..4ff79e40bc --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionCollection.rst @@ -0,0 +1,11 @@ +AnnouncementSubscriptionCollection +================================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: AnnouncementSubscriptionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionSummary.rst b/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionSummary.rst new file mode 100644 index 0000000000..2832a55d4f --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.AnnouncementSubscriptionSummary.rst @@ -0,0 +1,11 @@ +AnnouncementSubscriptionSummary +=============================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: AnnouncementSubscriptionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.ChangeAnnouncementSubscriptionCompartmentDetails.rst b/docs/api/announcements_service/models/oci.announcements_service.models.ChangeAnnouncementSubscriptionCompartmentDetails.rst new file mode 100644 index 0000000000..d913fd3677 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.ChangeAnnouncementSubscriptionCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeAnnouncementSubscriptionCompartmentDetails +================================================ + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: ChangeAnnouncementSubscriptionCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.CreateAnnouncementSubscriptionDetails.rst b/docs/api/announcements_service/models/oci.announcements_service.models.CreateAnnouncementSubscriptionDetails.rst new file mode 100644 index 0000000000..d9d31fdaed --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.CreateAnnouncementSubscriptionDetails.rst @@ -0,0 +1,11 @@ +CreateAnnouncementSubscriptionDetails +===================================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: CreateAnnouncementSubscriptionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.CreateFilterGroupDetails.rst b/docs/api/announcements_service/models/oci.announcements_service.models.CreateFilterGroupDetails.rst new file mode 100644 index 0000000000..d278aaf829 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.CreateFilterGroupDetails.rst @@ -0,0 +1,11 @@ +CreateFilterGroupDetails +======================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: CreateFilterGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.Filter.rst b/docs/api/announcements_service/models/oci.announcements_service.models.Filter.rst new file mode 100644 index 0000000000..2fa48dfe67 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.Filter.rst @@ -0,0 +1,11 @@ +Filter +====== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: Filter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.FilterGroup.rst b/docs/api/announcements_service/models/oci.announcements_service.models.FilterGroup.rst new file mode 100644 index 0000000000..b5c951f3cc --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.FilterGroup.rst @@ -0,0 +1,11 @@ +FilterGroup +=========== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: FilterGroup + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.FilterGroupDetails.rst b/docs/api/announcements_service/models/oci.announcements_service.models.FilterGroupDetails.rst new file mode 100644 index 0000000000..a42b657b99 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.FilterGroupDetails.rst @@ -0,0 +1,11 @@ +FilterGroupDetails +================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: FilterGroupDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails.rst b/docs/api/announcements_service/models/oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails.rst new file mode 100644 index 0000000000..320af14c13 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails.rst @@ -0,0 +1,11 @@ +UpdateAnnouncementSubscriptionDetails +===================================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: UpdateAnnouncementSubscriptionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/announcements_service/models/oci.announcements_service.models.UpdateFilterGroupDetails.rst b/docs/api/announcements_service/models/oci.announcements_service.models.UpdateFilterGroupDetails.rst new file mode 100644 index 0000000000..45bb5675e7 --- /dev/null +++ b/docs/api/announcements_service/models/oci.announcements_service.models.UpdateFilterGroupDetails.rst @@ -0,0 +1,11 @@ +UpdateFilterGroupDetails +======================== + +.. currentmodule:: oci.announcements_service.models + +.. autoclass:: UpdateFilterGroupDetails + :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 0c65c5b1e4..81b500d536 100644 --- a/docs/api/apm_traces.rst +++ b/docs/api/apm_traces.rst @@ -20,6 +20,8 @@ Apm Traces :nosignatures: :template: autosummary/model_class.rst + oci.apm_traces.models.AggregatedSnapshot + oci.apm_traces.models.AggregatedStackTrace oci.apm_traces.models.QueryDetails oci.apm_traces.models.QueryResultMetadataSummary oci.apm_traces.models.QueryResultResponse @@ -28,10 +30,15 @@ Apm Traces oci.apm_traces.models.QueryResultsGroupedBySummary oci.apm_traces.models.QueryResultsOrderedBySummary oci.apm_traces.models.QuickPickSummary + oci.apm_traces.models.SnapshotDetail oci.apm_traces.models.Span oci.apm_traces.models.SpanLog oci.apm_traces.models.SpanLogCollection + oci.apm_traces.models.SpanSnapshot + oci.apm_traces.models.StackTraceElement oci.apm_traces.models.Tag + oci.apm_traces.models.ThreadSnapshot oci.apm_traces.models.Trace oci.apm_traces.models.TraceServiceSummary + oci.apm_traces.models.TraceSnapshot oci.apm_traces.models.TraceSpanSummary diff --git a/docs/api/apm_traces/models/oci.apm_traces.models.AggregatedSnapshot.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AggregatedSnapshot.rst new file mode 100644 index 0000000000..2198c2bdce --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AggregatedSnapshot.rst @@ -0,0 +1,11 @@ +AggregatedSnapshot +================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AggregatedSnapshot + :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.AggregatedStackTrace.rst b/docs/api/apm_traces/models/oci.apm_traces.models.AggregatedStackTrace.rst new file mode 100644 index 0000000000..f16e3d0df3 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.AggregatedStackTrace.rst @@ -0,0 +1,11 @@ +AggregatedStackTrace +==================== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: AggregatedStackTrace + :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.SnapshotDetail.rst b/docs/api/apm_traces/models/oci.apm_traces.models.SnapshotDetail.rst new file mode 100644 index 0000000000..91b6eae235 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.SnapshotDetail.rst @@ -0,0 +1,11 @@ +SnapshotDetail +============== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: SnapshotDetail + :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.SpanSnapshot.rst b/docs/api/apm_traces/models/oci.apm_traces.models.SpanSnapshot.rst new file mode 100644 index 0000000000..8abff897ef --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.SpanSnapshot.rst @@ -0,0 +1,11 @@ +SpanSnapshot +============ + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: SpanSnapshot + :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.StackTraceElement.rst b/docs/api/apm_traces/models/oci.apm_traces.models.StackTraceElement.rst new file mode 100644 index 0000000000..6cb54e0de8 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.StackTraceElement.rst @@ -0,0 +1,11 @@ +StackTraceElement +================= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: StackTraceElement + :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.ThreadSnapshot.rst b/docs/api/apm_traces/models/oci.apm_traces.models.ThreadSnapshot.rst new file mode 100644 index 0000000000..e77d9b3f31 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.ThreadSnapshot.rst @@ -0,0 +1,11 @@ +ThreadSnapshot +============== + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: ThreadSnapshot + :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.TraceSnapshot.rst b/docs/api/apm_traces/models/oci.apm_traces.models.TraceSnapshot.rst new file mode 100644 index 0000000000..8542101f90 --- /dev/null +++ b/docs/api/apm_traces/models/oci.apm_traces.models.TraceSnapshot.rst @@ -0,0 +1,11 @@ +TraceSnapshot +============= + +.. currentmodule:: oci.apm_traces.models + +.. autoclass:: TraceSnapshot + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe.rst b/docs/api/data_safe.rst index fe41ebae2a..7693cd4ebc 100644 --- a/docs/api/data_safe.rst +++ b/docs/api/data_safe.rst @@ -19,18 +19,107 @@ Data Safe :template: autosummary/model_class.rst oci.data_safe.models.ActivateTargetDatabaseDetails + oci.data_safe.models.Alert + oci.data_safe.models.AlertAggregationItems + oci.data_safe.models.AlertAnalyticsCollection + oci.data_safe.models.AlertCollection + oci.data_safe.models.AlertPolicy + oci.data_safe.models.AlertPolicyCollection + oci.data_safe.models.AlertPolicyRule + oci.data_safe.models.AlertPolicyRuleCollection + oci.data_safe.models.AlertPolicyRuleSummary + oci.data_safe.models.AlertPolicySummary + oci.data_safe.models.AlertSummary + oci.data_safe.models.AlertsAggregationDimension + oci.data_safe.models.ApplyDiscoveryJobResultsDetails + oci.data_safe.models.AuditArchiveRetrieval + oci.data_safe.models.AuditArchiveRetrievalCollection + oci.data_safe.models.AuditArchiveRetrievalSummary + oci.data_safe.models.AuditConditions + oci.data_safe.models.AuditEventAggregationDimensions + oci.data_safe.models.AuditEventAggregationItems + oci.data_safe.models.AuditEventAnalyticsCollection + oci.data_safe.models.AuditEventCollection + oci.data_safe.models.AuditEventSummary + oci.data_safe.models.AuditPolicy + oci.data_safe.models.AuditPolicyAggregationItems + oci.data_safe.models.AuditPolicyAnalyticCollection + oci.data_safe.models.AuditPolicyCollection + oci.data_safe.models.AuditPolicyDimensions + oci.data_safe.models.AuditPolicySummary + oci.data_safe.models.AuditProfile + oci.data_safe.models.AuditProfileAggregationItems + oci.data_safe.models.AuditProfileAnalyticCollection + oci.data_safe.models.AuditProfileCollection + oci.data_safe.models.AuditProfileDimensions + oci.data_safe.models.AuditProfileSummary + oci.data_safe.models.AuditSpecification + oci.data_safe.models.AuditTrail + oci.data_safe.models.AuditTrailAggregationItems + oci.data_safe.models.AuditTrailAnalyticCollection + oci.data_safe.models.AuditTrailCollection + oci.data_safe.models.AuditTrailDimensions + oci.data_safe.models.AuditTrailSummary oci.data_safe.models.AutonomousDatabaseDetails + oci.data_safe.models.AvailableAuditVolumeCollection + oci.data_safe.models.AvailableAuditVolumeSummary + oci.data_safe.models.CalculateAuditVolumeAvailableDetails + oci.data_safe.models.CalculateAuditVolumeCollectedDetails + oci.data_safe.models.ChangeAlertCompartmentDetails + oci.data_safe.models.ChangeAlertPolicyCompartmentDetails + oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails + oci.data_safe.models.ChangeAuditPolicyCompartmentDetails + oci.data_safe.models.ChangeAuditProfileCompartmentDetails oci.data_safe.models.ChangeDataSafePrivateEndpointCompartmentDetails + oci.data_safe.models.ChangeDiscoveryJobCompartmentDetails + oci.data_safe.models.ChangeLibraryMaskingFormatCompartmentDetails + oci.data_safe.models.ChangeMaskingPolicyCompartmentDetails oci.data_safe.models.ChangeOnPremConnectorCompartmentDetails + oci.data_safe.models.ChangeReportCompartmentDetails + oci.data_safe.models.ChangeReportDefinitionCompartmentDetails + oci.data_safe.models.ChangeRetentionDetails oci.data_safe.models.ChangeSecurityAssessmentCompartmentDetails + oci.data_safe.models.ChangeSensitiveDataModelCompartmentDetails + oci.data_safe.models.ChangeSensitiveTypeCompartmentDetails + oci.data_safe.models.ChangeTargetAlertPolicyAssociationCompartmentDetails oci.data_safe.models.ChangeTargetDatabaseCompartmentDetails oci.data_safe.models.ChangeUserAssessmentCompartmentDetails + oci.data_safe.models.CollectedAuditVolumeCollection + oci.data_safe.models.CollectedAuditVolumeSummary + oci.data_safe.models.Column + oci.data_safe.models.ColumnFilter + oci.data_safe.models.ColumnSorting + oci.data_safe.models.ColumnSourceDetails + oci.data_safe.models.ColumnSourceFromSdmDetails + oci.data_safe.models.ColumnSourceFromTargetDetails + oci.data_safe.models.ColumnSummary oci.data_safe.models.CompareSecurityAssessmentDetails oci.data_safe.models.CompareUserAssessmentDetails + oci.data_safe.models.CompatibleFormatsForDataTypes + oci.data_safe.models.CompatibleFormatsForSensitiveTypes oci.data_safe.models.ConnectionOption + oci.data_safe.models.CreateAlertPolicyDetails + oci.data_safe.models.CreateAlertPolicyRuleDetails + oci.data_safe.models.CreateAuditArchiveRetrievalDetails + oci.data_safe.models.CreateAuditPolicyDetails + oci.data_safe.models.CreateAuditProfileDetails + oci.data_safe.models.CreateColumnSourceDetails + oci.data_safe.models.CreateColumnSourceFromSdmDetails + oci.data_safe.models.CreateColumnSourceFromTargetDetails oci.data_safe.models.CreateDataSafePrivateEndpointDetails + oci.data_safe.models.CreateDiscoveryJobDetails + oci.data_safe.models.CreateLibraryMaskingFormatDetails + oci.data_safe.models.CreateMaskingColumnDetails + oci.data_safe.models.CreateMaskingPolicyDetails oci.data_safe.models.CreateOnPremConnectorDetails + oci.data_safe.models.CreateReportDefinitionDetails oci.data_safe.models.CreateSecurityAssessmentDetails + oci.data_safe.models.CreateSensitiveCategoryDetails + oci.data_safe.models.CreateSensitiveColumnDetails + oci.data_safe.models.CreateSensitiveDataModelDetails + oci.data_safe.models.CreateSensitiveTypeDetails + oci.data_safe.models.CreateSensitiveTypePatternDetails + oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails oci.data_safe.models.CreateTargetDatabaseDetails oci.data_safe.models.CreateUserAssessmentDetails oci.data_safe.models.Credentials @@ -39,26 +128,110 @@ Data Safe oci.data_safe.models.DataSafePrivateEndpointSummary oci.data_safe.models.DatabaseCloudServiceDetails oci.data_safe.models.DatabaseDetails + oci.data_safe.models.DeleteRowsFormatEntry + oci.data_safe.models.DeterministicEncryptionDateFormatEntry + oci.data_safe.models.DeterministicEncryptionFormatEntry + oci.data_safe.models.DeterministicSubstitutionFormatEntry oci.data_safe.models.Diffs + oci.data_safe.models.Dimensions + oci.data_safe.models.DiscoveryAnalyticsCollection + oci.data_safe.models.DiscoveryAnalyticsSummary + oci.data_safe.models.DiscoveryJob + oci.data_safe.models.DiscoveryJobCollection + oci.data_safe.models.DiscoveryJobResult + oci.data_safe.models.DiscoveryJobResultCollection + oci.data_safe.models.DiscoveryJobResultSummary + oci.data_safe.models.DiscoveryJobSummary + oci.data_safe.models.DownloadDiscoveryReportDetails + oci.data_safe.models.DownloadMaskingLogDetails + oci.data_safe.models.DownloadMaskingPolicyDetails + oci.data_safe.models.DownloadMaskingReportDetails oci.data_safe.models.DownloadSecurityAssessmentReportDetails + oci.data_safe.models.DownloadSensitiveDataModelDetails oci.data_safe.models.DownloadUserAssessmentReportDetails + oci.data_safe.models.EnableConditions oci.data_safe.models.EnableDataSafeConfigurationDetails oci.data_safe.models.Finding oci.data_safe.models.FindingSummary + oci.data_safe.models.FixedNumberFormatEntry + oci.data_safe.models.FixedStringFormatEntry + oci.data_safe.models.FormatEntry + oci.data_safe.models.FormatSummary + oci.data_safe.models.FormatsForDataType + oci.data_safe.models.FormatsForSensitiveType + oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails + oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails + oci.data_safe.models.GenerateMaskingReportForDownloadDetails oci.data_safe.models.GenerateOnPremConnectorConfigurationDetails + oci.data_safe.models.GenerateReportDetails oci.data_safe.models.GenerateSecurityAssessmentReportDetails + oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails oci.data_safe.models.GenerateUserAssessmentReportDetails + oci.data_safe.models.GlobalSettings oci.data_safe.models.GrantSummary oci.data_safe.models.InitializationParameter oci.data_safe.models.InstalledDatabaseDetails + oci.data_safe.models.LibraryMaskingFormat + oci.data_safe.models.LibraryMaskingFormatCollection + oci.data_safe.models.LibraryMaskingFormatEntry + oci.data_safe.models.LibraryMaskingFormatSummary + oci.data_safe.models.MaskDataDetails + oci.data_safe.models.MaskedColumnCollection + oci.data_safe.models.MaskedColumnSummary + oci.data_safe.models.MaskingAnalyticsCollection + oci.data_safe.models.MaskingAnalyticsDimensions + oci.data_safe.models.MaskingAnalyticsSummary + oci.data_safe.models.MaskingColumn + oci.data_safe.models.MaskingColumnCollection + oci.data_safe.models.MaskingColumnSummary + oci.data_safe.models.MaskingFormat + oci.data_safe.models.MaskingPolicy + oci.data_safe.models.MaskingPolicyCollection + oci.data_safe.models.MaskingPolicySummary + oci.data_safe.models.MaskingReport + oci.data_safe.models.MaskingReportCollection + oci.data_safe.models.MaskingReportSummary + oci.data_safe.models.ModifiedAttributes + oci.data_safe.models.ModifyGlobalSettingsDetails + oci.data_safe.models.NullValueFormatEntry oci.data_safe.models.OnPremConnector oci.data_safe.models.OnPremConnectorSummary oci.data_safe.models.OnPremiseConnector + oci.data_safe.models.PPFFormatEntry + oci.data_safe.models.PatchAlertPolicyRuleDetails + oci.data_safe.models.PatchAlertsDetails + oci.data_safe.models.PatchDiscoveryJobResultDetails + oci.data_safe.models.PatchInsertInstruction + oci.data_safe.models.PatchInstruction + oci.data_safe.models.PatchMaskingColumnsDetails + oci.data_safe.models.PatchMergeInstruction + oci.data_safe.models.PatchRemoveInstruction + oci.data_safe.models.PatchSensitiveColumnDetails + oci.data_safe.models.PreserveOriginalDataFormatEntry oci.data_safe.models.PrivateEndpoint oci.data_safe.models.ProfileDetails + oci.data_safe.models.ProvisionAuditConditions + oci.data_safe.models.ProvisionAuditPolicyDetails + oci.data_safe.models.RandomDateFormatEntry + oci.data_safe.models.RandomDecimalNumberFormatEntry + oci.data_safe.models.RandomDigitsFormatEntry + oci.data_safe.models.RandomListFormatEntry + oci.data_safe.models.RandomNumberFormatEntry + oci.data_safe.models.RandomStringFormatEntry + oci.data_safe.models.RandomSubstitutionFormatEntry oci.data_safe.models.References + oci.data_safe.models.RegularExpressionFormatEntry + oci.data_safe.models.Report + oci.data_safe.models.ReportCollection + oci.data_safe.models.ReportDefinition + oci.data_safe.models.ReportDefinitionCollection + oci.data_safe.models.ReportDefinitionSummary + oci.data_safe.models.ReportSummary + oci.data_safe.models.RoleSummary oci.data_safe.models.RunSecurityAssessmentDetails oci.data_safe.models.RunUserAssessmentDetails + oci.data_safe.models.SQLExpressionFormatEntry + oci.data_safe.models.SchemaSummary oci.data_safe.models.SectionStatistics oci.data_safe.models.SecurityAssessment oci.data_safe.models.SecurityAssessmentBaseLineDetails @@ -66,13 +239,53 @@ Data Safe oci.data_safe.models.SecurityAssessmentComparisonPerTarget oci.data_safe.models.SecurityAssessmentStatistics oci.data_safe.models.SecurityAssessmentSummary + oci.data_safe.models.SensitiveCategory + oci.data_safe.models.SensitiveColumn + oci.data_safe.models.SensitiveColumnCollection + oci.data_safe.models.SensitiveColumnSummary + oci.data_safe.models.SensitiveDataModel + oci.data_safe.models.SensitiveDataModelCollection + oci.data_safe.models.SensitiveDataModelSummary + oci.data_safe.models.SensitiveType + oci.data_safe.models.SensitiveTypeCollection + oci.data_safe.models.SensitiveTypePattern + oci.data_safe.models.SensitiveTypeSummary + oci.data_safe.models.ShuffleFormatEntry + oci.data_safe.models.StartAuditTrailDetails + oci.data_safe.models.SubstringFormatEntry + oci.data_safe.models.Summary + oci.data_safe.models.TableSummary + oci.data_safe.models.TargetAlertPolicyAssociation + oci.data_safe.models.TargetAlertPolicyAssociationCollection + oci.data_safe.models.TargetAlertPolicyAssociationSummary oci.data_safe.models.TargetDatabase oci.data_safe.models.TargetDatabaseSummary oci.data_safe.models.TlsConfig + oci.data_safe.models.TruncateTableFormatEntry + oci.data_safe.models.UDFFormatEntry + oci.data_safe.models.UpdateAlertDetails + oci.data_safe.models.UpdateAlertPolicyRuleDetails + oci.data_safe.models.UpdateAuditArchiveRetrievalDetails + oci.data_safe.models.UpdateAuditPolicyDetails + oci.data_safe.models.UpdateAuditProfileDetails + oci.data_safe.models.UpdateAuditTrailDetails + oci.data_safe.models.UpdateColumnSourceDetails + oci.data_safe.models.UpdateColumnSourceSdmDetails + oci.data_safe.models.UpdateColumnSourceTargetDetails oci.data_safe.models.UpdateDataSafePrivateEndpointDetails + oci.data_safe.models.UpdateLibraryMaskingFormatDetails + oci.data_safe.models.UpdateMaskingColumnDetails + oci.data_safe.models.UpdateMaskingPolicyDetails oci.data_safe.models.UpdateOnPremConnectorDetails oci.data_safe.models.UpdateOnPremConnectorWalletDetails + oci.data_safe.models.UpdateReportDefinitionDetails oci.data_safe.models.UpdateSecurityAssessmentDetails + oci.data_safe.models.UpdateSensitiveCategoryDetails + oci.data_safe.models.UpdateSensitiveColumnDetails + oci.data_safe.models.UpdateSensitiveDataModelDetails + oci.data_safe.models.UpdateSensitiveTypeDetails + oci.data_safe.models.UpdateSensitiveTypePatternDetails + oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails oci.data_safe.models.UpdateTargetDatabaseDetails oci.data_safe.models.UpdateUserAssessmentDetails oci.data_safe.models.UserAggregation diff --git a/docs/api/data_safe/models/oci.data_safe.models.Alert.rst b/docs/api/data_safe/models/oci.data_safe.models.Alert.rst new file mode 100644 index 0000000000..b71d36e300 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.Alert.rst @@ -0,0 +1,11 @@ +Alert +===== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: Alert + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertAggregationItems.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertAggregationItems.rst new file mode 100644 index 0000000000..64f4727050 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertAggregationItems.rst @@ -0,0 +1,11 @@ +AlertAggregationItems +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertAggregationItems + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertAnalyticsCollection.rst new file mode 100644 index 0000000000..2a89490b88 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertAnalyticsCollection.rst @@ -0,0 +1,11 @@ +AlertAnalyticsCollection +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertAnalyticsCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertCollection.rst new file mode 100644 index 0000000000..b5dce1e667 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertCollection.rst @@ -0,0 +1,11 @@ +AlertCollection +=============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertPolicy.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicy.rst new file mode 100644 index 0000000000..366cc8a2fd --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicy.rst @@ -0,0 +1,11 @@ +AlertPolicy +=========== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyCollection.rst new file mode 100644 index 0000000000..e72bc2200f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyCollection.rst @@ -0,0 +1,11 @@ +AlertPolicyCollection +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertPolicyCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRule.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRule.rst new file mode 100644 index 0000000000..6ce12dc7c5 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRule.rst @@ -0,0 +1,11 @@ +AlertPolicyRule +=============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertPolicyRule + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleCollection.rst new file mode 100644 index 0000000000..a534e14c7c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleCollection.rst @@ -0,0 +1,11 @@ +AlertPolicyRuleCollection +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertPolicyRuleCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleSummary.rst new file mode 100644 index 0000000000..4eeb9e11c1 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicyRuleSummary.rst @@ -0,0 +1,11 @@ +AlertPolicyRuleSummary +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertPolicyRuleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertPolicySummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicySummary.rst new file mode 100644 index 0000000000..b79b3f70ee --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertPolicySummary.rst @@ -0,0 +1,11 @@ +AlertPolicySummary +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertPolicySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertSummary.rst new file mode 100644 index 0000000000..fb75af4aba --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertSummary.rst @@ -0,0 +1,11 @@ +AlertSummary +============ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AlertsAggregationDimension.rst b/docs/api/data_safe/models/oci.data_safe.models.AlertsAggregationDimension.rst new file mode 100644 index 0000000000..36487f21e5 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AlertsAggregationDimension.rst @@ -0,0 +1,11 @@ +AlertsAggregationDimension +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AlertsAggregationDimension + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ApplyDiscoveryJobResultsDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ApplyDiscoveryJobResultsDetails.rst new file mode 100644 index 0000000000..617909a43c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ApplyDiscoveryJobResultsDetails.rst @@ -0,0 +1,11 @@ +ApplyDiscoveryJobResultsDetails +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ApplyDiscoveryJobResultsDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrieval.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrieval.rst new file mode 100644 index 0000000000..ed2831e7e9 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrieval.rst @@ -0,0 +1,11 @@ +AuditArchiveRetrieval +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditArchiveRetrieval + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalCollection.rst new file mode 100644 index 0000000000..25a968a20e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalCollection.rst @@ -0,0 +1,11 @@ +AuditArchiveRetrievalCollection +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditArchiveRetrievalCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalSummary.rst new file mode 100644 index 0000000000..8d2d93f883 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditArchiveRetrievalSummary.rst @@ -0,0 +1,11 @@ +AuditArchiveRetrievalSummary +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditArchiveRetrievalSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditConditions.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditConditions.rst new file mode 100644 index 0000000000..a18c8866ce --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditConditions.rst @@ -0,0 +1,11 @@ +AuditConditions +=============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditConditions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationDimensions.rst new file mode 100644 index 0000000000..d5feba7a52 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationDimensions.rst @@ -0,0 +1,11 @@ +AuditEventAggregationDimensions +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditEventAggregationDimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationItems.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationItems.rst new file mode 100644 index 0000000000..7c234e50a0 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditEventAggregationItems.rst @@ -0,0 +1,11 @@ +AuditEventAggregationItems +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditEventAggregationItems + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditEventAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditEventAnalyticsCollection.rst new file mode 100644 index 0000000000..76b133e40d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditEventAnalyticsCollection.rst @@ -0,0 +1,11 @@ +AuditEventAnalyticsCollection +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditEventAnalyticsCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditEventCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditEventCollection.rst new file mode 100644 index 0000000000..4dbf0c6947 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditEventCollection.rst @@ -0,0 +1,11 @@ +AuditEventCollection +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditEventCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditEventSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditEventSummary.rst new file mode 100644 index 0000000000..c128de3297 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditEventSummary.rst @@ -0,0 +1,11 @@ +AuditEventSummary +================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditEventSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditPolicy.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicy.rst new file mode 100644 index 0000000000..bc6fee7156 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicy.rst @@ -0,0 +1,11 @@ +AuditPolicy +=========== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAggregationItems.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAggregationItems.rst new file mode 100644 index 0000000000..10400da343 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAggregationItems.rst @@ -0,0 +1,11 @@ +AuditPolicyAggregationItems +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditPolicyAggregationItems + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAnalyticCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAnalyticCollection.rst new file mode 100644 index 0000000000..5119072d82 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyAnalyticCollection.rst @@ -0,0 +1,11 @@ +AuditPolicyAnalyticCollection +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditPolicyAnalyticCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyCollection.rst new file mode 100644 index 0000000000..43815f0c28 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyCollection.rst @@ -0,0 +1,11 @@ +AuditPolicyCollection +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditPolicyCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyDimensions.rst new file mode 100644 index 0000000000..5e83f185da --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicyDimensions.rst @@ -0,0 +1,11 @@ +AuditPolicyDimensions +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditPolicyDimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditPolicySummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicySummary.rst new file mode 100644 index 0000000000..e2e0fb06bb --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditPolicySummary.rst @@ -0,0 +1,11 @@ +AuditPolicySummary +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditPolicySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditProfile.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditProfile.rst new file mode 100644 index 0000000000..bfac304f84 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditProfile.rst @@ -0,0 +1,11 @@ +AuditProfile +============ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditProfile + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditProfileAggregationItems.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileAggregationItems.rst new file mode 100644 index 0000000000..de7a43436a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileAggregationItems.rst @@ -0,0 +1,11 @@ +AuditProfileAggregationItems +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditProfileAggregationItems + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditProfileAnalyticCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileAnalyticCollection.rst new file mode 100644 index 0000000000..3c572723e7 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileAnalyticCollection.rst @@ -0,0 +1,11 @@ +AuditProfileAnalyticCollection +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditProfileAnalyticCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditProfileCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileCollection.rst new file mode 100644 index 0000000000..dac36d23fb --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileCollection.rst @@ -0,0 +1,11 @@ +AuditProfileCollection +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditProfileCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditProfileDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileDimensions.rst new file mode 100644 index 0000000000..892478ab91 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileDimensions.rst @@ -0,0 +1,11 @@ +AuditProfileDimensions +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditProfileDimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditProfileSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileSummary.rst new file mode 100644 index 0000000000..84d0a9f4d4 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditProfileSummary.rst @@ -0,0 +1,11 @@ +AuditProfileSummary +=================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditProfileSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditSpecification.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditSpecification.rst new file mode 100644 index 0000000000..cc1f383460 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditSpecification.rst @@ -0,0 +1,11 @@ +AuditSpecification +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditSpecification + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditTrail.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditTrail.rst new file mode 100644 index 0000000000..7ea7b53bae --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditTrail.rst @@ -0,0 +1,11 @@ +AuditTrail +========== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditTrail + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditTrailAggregationItems.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailAggregationItems.rst new file mode 100644 index 0000000000..ea34c434c9 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailAggregationItems.rst @@ -0,0 +1,11 @@ +AuditTrailAggregationItems +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditTrailAggregationItems + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditTrailAnalyticCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailAnalyticCollection.rst new file mode 100644 index 0000000000..5e4c322229 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailAnalyticCollection.rst @@ -0,0 +1,11 @@ +AuditTrailAnalyticCollection +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditTrailAnalyticCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditTrailCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailCollection.rst new file mode 100644 index 0000000000..548b7b4f57 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailCollection.rst @@ -0,0 +1,11 @@ +AuditTrailCollection +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditTrailCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditTrailDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailDimensions.rst new file mode 100644 index 0000000000..e75158dce0 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailDimensions.rst @@ -0,0 +1,11 @@ +AuditTrailDimensions +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditTrailDimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AuditTrailSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailSummary.rst new file mode 100644 index 0000000000..096dfb41a9 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AuditTrailSummary.rst @@ -0,0 +1,11 @@ +AuditTrailSummary +================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AuditTrailSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeCollection.rst new file mode 100644 index 0000000000..0248ca3a43 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeCollection.rst @@ -0,0 +1,11 @@ +AvailableAuditVolumeCollection +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AvailableAuditVolumeCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeSummary.rst new file mode 100644 index 0000000000..293407de73 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.AvailableAuditVolumeSummary.rst @@ -0,0 +1,11 @@ +AvailableAuditVolumeSummary +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: AvailableAuditVolumeSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeAvailableDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeAvailableDetails.rst new file mode 100644 index 0000000000..3ae9ff5114 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeAvailableDetails.rst @@ -0,0 +1,11 @@ +CalculateAuditVolumeAvailableDetails +==================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CalculateAuditVolumeAvailableDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeCollectedDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeCollectedDetails.rst new file mode 100644 index 0000000000..cb15455974 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CalculateAuditVolumeCollectedDetails.rst @@ -0,0 +1,11 @@ +CalculateAuditVolumeCollectedDetails +==================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CalculateAuditVolumeCollectedDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeAlertCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeAlertCompartmentDetails.rst new file mode 100644 index 0000000000..6b7ab8a2ad --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeAlertCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeAlertCompartmentDetails +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeAlertCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeAlertPolicyCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeAlertPolicyCompartmentDetails.rst new file mode 100644 index 0000000000..194b968a9e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeAlertPolicyCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeAlertPolicyCompartmentDetails +=================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeAlertPolicyCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails.rst new file mode 100644 index 0000000000..2d8c5e3139 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeAuditArchiveRetrievalCompartmentDetails +============================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeAuditArchiveRetrievalCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditPolicyCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditPolicyCompartmentDetails.rst new file mode 100644 index 0000000000..09625d2245 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditPolicyCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeAuditPolicyCompartmentDetails +=================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeAuditPolicyCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditProfileCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditProfileCompartmentDetails.rst new file mode 100644 index 0000000000..a732cd4b36 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeAuditProfileCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeAuditProfileCompartmentDetails +==================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeAuditProfileCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeDiscoveryJobCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeDiscoveryJobCompartmentDetails.rst new file mode 100644 index 0000000000..7f45d1962c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeDiscoveryJobCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeDiscoveryJobCompartmentDetails +==================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeDiscoveryJobCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeLibraryMaskingFormatCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeLibraryMaskingFormatCompartmentDetails.rst new file mode 100644 index 0000000000..d21bfbcc90 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeLibraryMaskingFormatCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeLibraryMaskingFormatCompartmentDetails +============================================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeLibraryMaskingFormatCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeMaskingPolicyCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeMaskingPolicyCompartmentDetails.rst new file mode 100644 index 0000000000..5e2f354946 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeMaskingPolicyCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeMaskingPolicyCompartmentDetails +===================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeMaskingPolicyCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeReportCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeReportCompartmentDetails.rst new file mode 100644 index 0000000000..e739924463 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeReportCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeReportCompartmentDetails +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeReportCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeReportDefinitionCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeReportDefinitionCompartmentDetails.rst new file mode 100644 index 0000000000..283491d16c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeReportDefinitionCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeReportDefinitionCompartmentDetails +======================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeReportDefinitionCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeRetentionDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeRetentionDetails.rst new file mode 100644 index 0000000000..e558ef178e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeRetentionDetails.rst @@ -0,0 +1,11 @@ +ChangeRetentionDetails +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeRetentionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveDataModelCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveDataModelCompartmentDetails.rst new file mode 100644 index 0000000000..ffe4687d3f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveDataModelCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeSensitiveDataModelCompartmentDetails +========================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeSensitiveDataModelCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveTypeCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveTypeCompartmentDetails.rst new file mode 100644 index 0000000000..901577d885 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeSensitiveTypeCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeSensitiveTypeCompartmentDetails +===================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeSensitiveTypeCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ChangeTargetAlertPolicyAssociationCompartmentDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ChangeTargetAlertPolicyAssociationCompartmentDetails.rst new file mode 100644 index 0000000000..cdb5b9afdb --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ChangeTargetAlertPolicyAssociationCompartmentDetails.rst @@ -0,0 +1,11 @@ +ChangeTargetAlertPolicyAssociationCompartmentDetails +==================================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ChangeTargetAlertPolicyAssociationCompartmentDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeCollection.rst new file mode 100644 index 0000000000..71de7ffe53 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeCollection.rst @@ -0,0 +1,11 @@ +CollectedAuditVolumeCollection +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CollectedAuditVolumeCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeSummary.rst new file mode 100644 index 0000000000..8504809c83 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CollectedAuditVolumeSummary.rst @@ -0,0 +1,11 @@ +CollectedAuditVolumeSummary +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CollectedAuditVolumeSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.Column.rst b/docs/api/data_safe/models/oci.data_safe.models.Column.rst new file mode 100644 index 0000000000..77b95e4f56 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.Column.rst @@ -0,0 +1,11 @@ +Column +====== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: Column + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ColumnFilter.rst b/docs/api/data_safe/models/oci.data_safe.models.ColumnFilter.rst new file mode 100644 index 0000000000..a89cd63c1b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ColumnFilter.rst @@ -0,0 +1,11 @@ +ColumnFilter +============ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ColumnFilter + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ColumnSorting.rst b/docs/api/data_safe/models/oci.data_safe.models.ColumnSorting.rst new file mode 100644 index 0000000000..f3fe83bcc6 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ColumnSorting.rst @@ -0,0 +1,11 @@ +ColumnSorting +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ColumnSorting + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceDetails.rst new file mode 100644 index 0000000000..d848f33a84 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceDetails.rst @@ -0,0 +1,11 @@ +ColumnSourceDetails +=================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ColumnSourceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromSdmDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromSdmDetails.rst new file mode 100644 index 0000000000..05fe26502c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromSdmDetails.rst @@ -0,0 +1,11 @@ +ColumnSourceFromSdmDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ColumnSourceFromSdmDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromTargetDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromTargetDetails.rst new file mode 100644 index 0000000000..153eb37e14 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ColumnSourceFromTargetDetails.rst @@ -0,0 +1,11 @@ +ColumnSourceFromTargetDetails +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ColumnSourceFromTargetDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ColumnSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.ColumnSummary.rst new file mode 100644 index 0000000000..91fdcd9857 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ColumnSummary.rst @@ -0,0 +1,11 @@ +ColumnSummary +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ColumnSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForDataTypes.rst b/docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForDataTypes.rst new file mode 100644 index 0000000000..2da5290e0f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForDataTypes.rst @@ -0,0 +1,11 @@ +CompatibleFormatsForDataTypes +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CompatibleFormatsForDataTypes + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForSensitiveTypes.rst b/docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForSensitiveTypes.rst new file mode 100644 index 0000000000..1dbb70c31c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CompatibleFormatsForSensitiveTypes.rst @@ -0,0 +1,11 @@ +CompatibleFormatsForSensitiveTypes +================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CompatibleFormatsForSensitiveTypes + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyDetails.rst new file mode 100644 index 0000000000..681b36aded --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyDetails.rst @@ -0,0 +1,11 @@ +CreateAlertPolicyDetails +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateAlertPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyRuleDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyRuleDetails.rst new file mode 100644 index 0000000000..41ad60fb96 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateAlertPolicyRuleDetails.rst @@ -0,0 +1,11 @@ +CreateAlertPolicyRuleDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateAlertPolicyRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateAuditArchiveRetrievalDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateAuditArchiveRetrievalDetails.rst new file mode 100644 index 0000000000..47058c3abe --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateAuditArchiveRetrievalDetails.rst @@ -0,0 +1,11 @@ +CreateAuditArchiveRetrievalDetails +================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateAuditArchiveRetrievalDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateAuditPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateAuditPolicyDetails.rst new file mode 100644 index 0000000000..31f3106f8f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateAuditPolicyDetails.rst @@ -0,0 +1,11 @@ +CreateAuditPolicyDetails +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateAuditPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateAuditProfileDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateAuditProfileDetails.rst new file mode 100644 index 0000000000..b8f6e70f60 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateAuditProfileDetails.rst @@ -0,0 +1,11 @@ +CreateAuditProfileDetails +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateAuditProfileDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceDetails.rst new file mode 100644 index 0000000000..fa7f51a7fe --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceDetails.rst @@ -0,0 +1,11 @@ +CreateColumnSourceDetails +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateColumnSourceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromSdmDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromSdmDetails.rst new file mode 100644 index 0000000000..1c46c5296a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromSdmDetails.rst @@ -0,0 +1,11 @@ +CreateColumnSourceFromSdmDetails +================================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateColumnSourceFromSdmDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromTargetDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromTargetDetails.rst new file mode 100644 index 0000000000..49ebdb2337 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateColumnSourceFromTargetDetails.rst @@ -0,0 +1,11 @@ +CreateColumnSourceFromTargetDetails +=================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateColumnSourceFromTargetDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateDiscoveryJobDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateDiscoveryJobDetails.rst new file mode 100644 index 0000000000..d274365a52 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateDiscoveryJobDetails.rst @@ -0,0 +1,11 @@ +CreateDiscoveryJobDetails +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateDiscoveryJobDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateLibraryMaskingFormatDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateLibraryMaskingFormatDetails.rst new file mode 100644 index 0000000000..8130b19f43 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateLibraryMaskingFormatDetails.rst @@ -0,0 +1,11 @@ +CreateLibraryMaskingFormatDetails +================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateLibraryMaskingFormatDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateMaskingColumnDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateMaskingColumnDetails.rst new file mode 100644 index 0000000000..f774def52d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateMaskingColumnDetails.rst @@ -0,0 +1,11 @@ +CreateMaskingColumnDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateMaskingColumnDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateMaskingPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateMaskingPolicyDetails.rst new file mode 100644 index 0000000000..02bd93d5b4 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateMaskingPolicyDetails.rst @@ -0,0 +1,11 @@ +CreateMaskingPolicyDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateMaskingPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateReportDefinitionDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateReportDefinitionDetails.rst new file mode 100644 index 0000000000..42db83fcdb --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateReportDefinitionDetails.rst @@ -0,0 +1,11 @@ +CreateReportDefinitionDetails +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateReportDefinitionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveCategoryDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveCategoryDetails.rst new file mode 100644 index 0000000000..751b3ab5eb --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveCategoryDetails.rst @@ -0,0 +1,11 @@ +CreateSensitiveCategoryDetails +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateSensitiveCategoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveColumnDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveColumnDetails.rst new file mode 100644 index 0000000000..1a4392b191 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveColumnDetails.rst @@ -0,0 +1,11 @@ +CreateSensitiveColumnDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateSensitiveColumnDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveDataModelDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveDataModelDetails.rst new file mode 100644 index 0000000000..2a4c118e9c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveDataModelDetails.rst @@ -0,0 +1,11 @@ +CreateSensitiveDataModelDetails +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateSensitiveDataModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypeDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypeDetails.rst new file mode 100644 index 0000000000..80e1fe9a68 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypeDetails.rst @@ -0,0 +1,11 @@ +CreateSensitiveTypeDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateSensitiveTypeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypePatternDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypePatternDetails.rst new file mode 100644 index 0000000000..e36bd417bc --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateSensitiveTypePatternDetails.rst @@ -0,0 +1,11 @@ +CreateSensitiveTypePatternDetails +================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateSensitiveTypePatternDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails.rst new file mode 100644 index 0000000000..0c2fd3c2d4 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails.rst @@ -0,0 +1,11 @@ +CreateTargetAlertPolicyAssociationDetails +========================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: CreateTargetAlertPolicyAssociationDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DeleteRowsFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.DeleteRowsFormatEntry.rst new file mode 100644 index 0000000000..6623e62500 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DeleteRowsFormatEntry.rst @@ -0,0 +1,11 @@ +DeleteRowsFormatEntry +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DeleteRowsFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionDateFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionDateFormatEntry.rst new file mode 100644 index 0000000000..954d91822a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionDateFormatEntry.rst @@ -0,0 +1,11 @@ +DeterministicEncryptionDateFormatEntry +====================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DeterministicEncryptionDateFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionFormatEntry.rst new file mode 100644 index 0000000000..4025f21403 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DeterministicEncryptionFormatEntry.rst @@ -0,0 +1,11 @@ +DeterministicEncryptionFormatEntry +================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DeterministicEncryptionFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DeterministicSubstitutionFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.DeterministicSubstitutionFormatEntry.rst new file mode 100644 index 0000000000..46605d24c9 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DeterministicSubstitutionFormatEntry.rst @@ -0,0 +1,11 @@ +DeterministicSubstitutionFormatEntry +==================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DeterministicSubstitutionFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.Dimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.Dimensions.rst new file mode 100644 index 0000000000..040a877b91 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.Dimensions.rst @@ -0,0 +1,11 @@ +Dimensions +========== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: Dimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsCollection.rst new file mode 100644 index 0000000000..e48ae91946 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsCollection.rst @@ -0,0 +1,11 @@ +DiscoveryAnalyticsCollection +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryAnalyticsCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsSummary.rst new file mode 100644 index 0000000000..6b25e2fcea --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryAnalyticsSummary.rst @@ -0,0 +1,11 @@ +DiscoveryAnalyticsSummary +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryAnalyticsSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJob.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJob.rst new file mode 100644 index 0000000000..26928b575a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJob.rst @@ -0,0 +1,11 @@ +DiscoveryJob +============ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryJob + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobCollection.rst new file mode 100644 index 0000000000..fa6ba7f144 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobCollection.rst @@ -0,0 +1,11 @@ +DiscoveryJobCollection +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryJobCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResult.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResult.rst new file mode 100644 index 0000000000..4356263a3f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResult.rst @@ -0,0 +1,11 @@ +DiscoveryJobResult +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryJobResult + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultCollection.rst new file mode 100644 index 0000000000..4842ed5bd5 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultCollection.rst @@ -0,0 +1,11 @@ +DiscoveryJobResultCollection +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryJobResultCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultSummary.rst new file mode 100644 index 0000000000..e3f850a0f8 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobResultSummary.rst @@ -0,0 +1,11 @@ +DiscoveryJobResultSummary +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryJobResultSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobSummary.rst new file mode 100644 index 0000000000..470a4ec96c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DiscoveryJobSummary.rst @@ -0,0 +1,11 @@ +DiscoveryJobSummary +=================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DiscoveryJobSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DownloadDiscoveryReportDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.DownloadDiscoveryReportDetails.rst new file mode 100644 index 0000000000..e744de3f9b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DownloadDiscoveryReportDetails.rst @@ -0,0 +1,11 @@ +DownloadDiscoveryReportDetails +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DownloadDiscoveryReportDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingLogDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingLogDetails.rst new file mode 100644 index 0000000000..425f15d6f2 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingLogDetails.rst @@ -0,0 +1,11 @@ +DownloadMaskingLogDetails +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DownloadMaskingLogDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingPolicyDetails.rst new file mode 100644 index 0000000000..282dbc3f11 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingPolicyDetails.rst @@ -0,0 +1,11 @@ +DownloadMaskingPolicyDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DownloadMaskingPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingReportDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingReportDetails.rst new file mode 100644 index 0000000000..83ed097b02 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DownloadMaskingReportDetails.rst @@ -0,0 +1,11 @@ +DownloadMaskingReportDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DownloadMaskingReportDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.DownloadSensitiveDataModelDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.DownloadSensitiveDataModelDetails.rst new file mode 100644 index 0000000000..706a583394 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.DownloadSensitiveDataModelDetails.rst @@ -0,0 +1,11 @@ +DownloadSensitiveDataModelDetails +================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: DownloadSensitiveDataModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.EnableConditions.rst b/docs/api/data_safe/models/oci.data_safe.models.EnableConditions.rst new file mode 100644 index 0000000000..68458c45df --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.EnableConditions.rst @@ -0,0 +1,11 @@ +EnableConditions +================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: EnableConditions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.FixedNumberFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.FixedNumberFormatEntry.rst new file mode 100644 index 0000000000..cd4a659924 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.FixedNumberFormatEntry.rst @@ -0,0 +1,11 @@ +FixedNumberFormatEntry +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: FixedNumberFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.FixedStringFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.FixedStringFormatEntry.rst new file mode 100644 index 0000000000..09f6375303 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.FixedStringFormatEntry.rst @@ -0,0 +1,11 @@ +FixedStringFormatEntry +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: FixedStringFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.FormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.FormatEntry.rst new file mode 100644 index 0000000000..31547e5227 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.FormatEntry.rst @@ -0,0 +1,11 @@ +FormatEntry +=========== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: FormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.FormatSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.FormatSummary.rst new file mode 100644 index 0000000000..6358de60d2 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.FormatSummary.rst @@ -0,0 +1,11 @@ +FormatSummary +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: FormatSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.FormatsForDataType.rst b/docs/api/data_safe/models/oci.data_safe.models.FormatsForDataType.rst new file mode 100644 index 0000000000..d8ea289e73 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.FormatsForDataType.rst @@ -0,0 +1,11 @@ +FormatsForDataType +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: FormatsForDataType + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.FormatsForSensitiveType.rst b/docs/api/data_safe/models/oci.data_safe.models.FormatsForSensitiveType.rst new file mode 100644 index 0000000000..9bf5187731 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.FormatsForSensitiveType.rst @@ -0,0 +1,11 @@ +FormatsForSensitiveType +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: FormatsForSensitiveType + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails.rst new file mode 100644 index 0000000000..da62a0c161 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails.rst @@ -0,0 +1,11 @@ +GenerateDiscoveryReportForDownloadDetails +========================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: GenerateDiscoveryReportForDownloadDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails.rst new file mode 100644 index 0000000000..19242f3f74 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails.rst @@ -0,0 +1,11 @@ +GenerateMaskingPolicyForDownloadDetails +======================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: GenerateMaskingPolicyForDownloadDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingReportForDownloadDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingReportForDownloadDetails.rst new file mode 100644 index 0000000000..b4eb6dd79c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.GenerateMaskingReportForDownloadDetails.rst @@ -0,0 +1,11 @@ +GenerateMaskingReportForDownloadDetails +======================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: GenerateMaskingReportForDownloadDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.GenerateReportDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.GenerateReportDetails.rst new file mode 100644 index 0000000000..e10e31ade9 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.GenerateReportDetails.rst @@ -0,0 +1,11 @@ +GenerateReportDetails +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: GenerateReportDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails.rst new file mode 100644 index 0000000000..20e43ae09e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails.rst @@ -0,0 +1,11 @@ +GenerateSensitiveDataModelForDownloadDetails +============================================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: GenerateSensitiveDataModelForDownloadDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.GlobalSettings.rst b/docs/api/data_safe/models/oci.data_safe.models.GlobalSettings.rst new file mode 100644 index 0000000000..606bf0c0a5 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.GlobalSettings.rst @@ -0,0 +1,11 @@ +GlobalSettings +============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: GlobalSettings + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormat.rst b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormat.rst new file mode 100644 index 0000000000..52eeb2ac63 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormat.rst @@ -0,0 +1,11 @@ +LibraryMaskingFormat +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: LibraryMaskingFormat + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatCollection.rst new file mode 100644 index 0000000000..4b5d4be737 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatCollection.rst @@ -0,0 +1,11 @@ +LibraryMaskingFormatCollection +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: LibraryMaskingFormatCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatEntry.rst new file mode 100644 index 0000000000..64bb8df24d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatEntry.rst @@ -0,0 +1,11 @@ +LibraryMaskingFormatEntry +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: LibraryMaskingFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatSummary.rst new file mode 100644 index 0000000000..072df11fac --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.LibraryMaskingFormatSummary.rst @@ -0,0 +1,11 @@ +LibraryMaskingFormatSummary +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: LibraryMaskingFormatSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskDataDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskDataDetails.rst new file mode 100644 index 0000000000..b20baac488 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskDataDetails.rst @@ -0,0 +1,11 @@ +MaskDataDetails +=============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskDataDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskedColumnCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskedColumnCollection.rst new file mode 100644 index 0000000000..580a93e899 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskedColumnCollection.rst @@ -0,0 +1,11 @@ +MaskedColumnCollection +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskedColumnCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskedColumnSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskedColumnSummary.rst new file mode 100644 index 0000000000..23d691966c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskedColumnSummary.rst @@ -0,0 +1,11 @@ +MaskedColumnSummary +=================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskedColumnSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsCollection.rst new file mode 100644 index 0000000000..67dbf08ff3 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsCollection.rst @@ -0,0 +1,11 @@ +MaskingAnalyticsCollection +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingAnalyticsCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsDimensions.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsDimensions.rst new file mode 100644 index 0000000000..281acebef8 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsDimensions.rst @@ -0,0 +1,11 @@ +MaskingAnalyticsDimensions +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingAnalyticsDimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsSummary.rst new file mode 100644 index 0000000000..4ec822b299 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingAnalyticsSummary.rst @@ -0,0 +1,11 @@ +MaskingAnalyticsSummary +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingAnalyticsSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingColumn.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingColumn.rst new file mode 100644 index 0000000000..86a52c568c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingColumn.rst @@ -0,0 +1,11 @@ +MaskingColumn +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingColumn + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingColumnCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingColumnCollection.rst new file mode 100644 index 0000000000..bf2844d0c3 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingColumnCollection.rst @@ -0,0 +1,11 @@ +MaskingColumnCollection +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingColumnCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingColumnSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingColumnSummary.rst new file mode 100644 index 0000000000..9b06072849 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingColumnSummary.rst @@ -0,0 +1,11 @@ +MaskingColumnSummary +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingColumnSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingFormat.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingFormat.rst new file mode 100644 index 0000000000..65dc1b8dd4 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingFormat.rst @@ -0,0 +1,11 @@ +MaskingFormat +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingFormat + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicy.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicy.rst new file mode 100644 index 0000000000..5ead05fe48 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicy.rst @@ -0,0 +1,11 @@ +MaskingPolicy +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingPolicy + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicyCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicyCollection.rst new file mode 100644 index 0000000000..fa09a17707 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicyCollection.rst @@ -0,0 +1,11 @@ +MaskingPolicyCollection +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingPolicyCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicySummary.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicySummary.rst new file mode 100644 index 0000000000..90e85e8619 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingPolicySummary.rst @@ -0,0 +1,11 @@ +MaskingPolicySummary +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingPolicySummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingReport.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingReport.rst new file mode 100644 index 0000000000..a9b290c0f4 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingReport.rst @@ -0,0 +1,11 @@ +MaskingReport +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingReport + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingReportCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingReportCollection.rst new file mode 100644 index 0000000000..ff693e630e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingReportCollection.rst @@ -0,0 +1,11 @@ +MaskingReportCollection +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingReportCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.MaskingReportSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.MaskingReportSummary.rst new file mode 100644 index 0000000000..65d92b108c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.MaskingReportSummary.rst @@ -0,0 +1,11 @@ +MaskingReportSummary +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: MaskingReportSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ModifiedAttributes.rst b/docs/api/data_safe/models/oci.data_safe.models.ModifiedAttributes.rst new file mode 100644 index 0000000000..dc9e41f550 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ModifiedAttributes.rst @@ -0,0 +1,11 @@ +ModifiedAttributes +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ModifiedAttributes + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ModifyGlobalSettingsDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ModifyGlobalSettingsDetails.rst new file mode 100644 index 0000000000..f214500414 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ModifyGlobalSettingsDetails.rst @@ -0,0 +1,11 @@ +ModifyGlobalSettingsDetails +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ModifyGlobalSettingsDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.NullValueFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.NullValueFormatEntry.rst new file mode 100644 index 0000000000..eba4ae4e87 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.NullValueFormatEntry.rst @@ -0,0 +1,11 @@ +NullValueFormatEntry +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: NullValueFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PPFFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.PPFFormatEntry.rst new file mode 100644 index 0000000000..23659c2a3b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PPFFormatEntry.rst @@ -0,0 +1,11 @@ +PPFFormatEntry +============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PPFFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchAlertPolicyRuleDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchAlertPolicyRuleDetails.rst new file mode 100644 index 0000000000..885f5e2c56 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchAlertPolicyRuleDetails.rst @@ -0,0 +1,11 @@ +PatchAlertPolicyRuleDetails +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchAlertPolicyRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchAlertsDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchAlertsDetails.rst new file mode 100644 index 0000000000..7d3aa3144d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchAlertsDetails.rst @@ -0,0 +1,11 @@ +PatchAlertsDetails +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchAlertsDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchDiscoveryJobResultDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchDiscoveryJobResultDetails.rst new file mode 100644 index 0000000000..53ed1e08d6 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchDiscoveryJobResultDetails.rst @@ -0,0 +1,11 @@ +PatchDiscoveryJobResultDetails +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchDiscoveryJobResultDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchInsertInstruction.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchInsertInstruction.rst new file mode 100644 index 0000000000..5db68fc17f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchInsertInstruction.rst @@ -0,0 +1,11 @@ +PatchInsertInstruction +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchInsertInstruction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchInstruction.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchInstruction.rst new file mode 100644 index 0000000000..cf8e28241b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchInstruction.rst @@ -0,0 +1,11 @@ +PatchInstruction +================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchInstruction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchMaskingColumnsDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchMaskingColumnsDetails.rst new file mode 100644 index 0000000000..aabd150f5a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchMaskingColumnsDetails.rst @@ -0,0 +1,11 @@ +PatchMaskingColumnsDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchMaskingColumnsDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchMergeInstruction.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchMergeInstruction.rst new file mode 100644 index 0000000000..45babb4dc5 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchMergeInstruction.rst @@ -0,0 +1,11 @@ +PatchMergeInstruction +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchMergeInstruction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchRemoveInstruction.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchRemoveInstruction.rst new file mode 100644 index 0000000000..f68b89e899 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchRemoveInstruction.rst @@ -0,0 +1,11 @@ +PatchRemoveInstruction +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchRemoveInstruction + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PatchSensitiveColumnDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.PatchSensitiveColumnDetails.rst new file mode 100644 index 0000000000..95ee95f133 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PatchSensitiveColumnDetails.rst @@ -0,0 +1,11 @@ +PatchSensitiveColumnDetails +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PatchSensitiveColumnDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.PreserveOriginalDataFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.PreserveOriginalDataFormatEntry.rst new file mode 100644 index 0000000000..f0f9c24883 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.PreserveOriginalDataFormatEntry.rst @@ -0,0 +1,11 @@ +PreserveOriginalDataFormatEntry +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: PreserveOriginalDataFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditConditions.rst b/docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditConditions.rst new file mode 100644 index 0000000000..fc9792cf3c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditConditions.rst @@ -0,0 +1,11 @@ +ProvisionAuditConditions +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ProvisionAuditConditions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditPolicyDetails.rst new file mode 100644 index 0000000000..d7f175b74c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ProvisionAuditPolicyDetails.rst @@ -0,0 +1,11 @@ +ProvisionAuditPolicyDetails +=========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ProvisionAuditPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomDateFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomDateFormatEntry.rst new file mode 100644 index 0000000000..0d1b9d6602 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomDateFormatEntry.rst @@ -0,0 +1,11 @@ +RandomDateFormatEntry +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomDateFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomDecimalNumberFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomDecimalNumberFormatEntry.rst new file mode 100644 index 0000000000..c32ea2df12 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomDecimalNumberFormatEntry.rst @@ -0,0 +1,11 @@ +RandomDecimalNumberFormatEntry +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomDecimalNumberFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomDigitsFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomDigitsFormatEntry.rst new file mode 100644 index 0000000000..3fcd18c48b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomDigitsFormatEntry.rst @@ -0,0 +1,11 @@ +RandomDigitsFormatEntry +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomDigitsFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomListFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomListFormatEntry.rst new file mode 100644 index 0000000000..6d2c8eb929 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomListFormatEntry.rst @@ -0,0 +1,11 @@ +RandomListFormatEntry +===================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomListFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomNumberFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomNumberFormatEntry.rst new file mode 100644 index 0000000000..7fa05683d2 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomNumberFormatEntry.rst @@ -0,0 +1,11 @@ +RandomNumberFormatEntry +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomNumberFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomStringFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomStringFormatEntry.rst new file mode 100644 index 0000000000..5f753831b4 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomStringFormatEntry.rst @@ -0,0 +1,11 @@ +RandomStringFormatEntry +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomStringFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RandomSubstitutionFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RandomSubstitutionFormatEntry.rst new file mode 100644 index 0000000000..53ad537de1 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RandomSubstitutionFormatEntry.rst @@ -0,0 +1,11 @@ +RandomSubstitutionFormatEntry +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RandomSubstitutionFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RegularExpressionFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.RegularExpressionFormatEntry.rst new file mode 100644 index 0000000000..c1e4076882 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RegularExpressionFormatEntry.rst @@ -0,0 +1,11 @@ +RegularExpressionFormatEntry +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RegularExpressionFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.Report.rst b/docs/api/data_safe/models/oci.data_safe.models.Report.rst new file mode 100644 index 0000000000..51d25cd33f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.Report.rst @@ -0,0 +1,11 @@ +Report +====== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: Report + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ReportCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.ReportCollection.rst new file mode 100644 index 0000000000..c81fdf94c3 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ReportCollection.rst @@ -0,0 +1,11 @@ +ReportCollection +================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ReportCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ReportDefinition.rst b/docs/api/data_safe/models/oci.data_safe.models.ReportDefinition.rst new file mode 100644 index 0000000000..5ccbf1b590 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ReportDefinition.rst @@ -0,0 +1,11 @@ +ReportDefinition +================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ReportDefinition + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionCollection.rst new file mode 100644 index 0000000000..d7a0bf3b99 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionCollection.rst @@ -0,0 +1,11 @@ +ReportDefinitionCollection +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ReportDefinitionCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionSummary.rst new file mode 100644 index 0000000000..a034c7701b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ReportDefinitionSummary.rst @@ -0,0 +1,11 @@ +ReportDefinitionSummary +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ReportDefinitionSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ReportSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.ReportSummary.rst new file mode 100644 index 0000000000..a3fbcd7c65 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ReportSummary.rst @@ -0,0 +1,11 @@ +ReportSummary +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ReportSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.RoleSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.RoleSummary.rst new file mode 100644 index 0000000000..85e92a091b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.RoleSummary.rst @@ -0,0 +1,11 @@ +RoleSummary +=========== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: RoleSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SQLExpressionFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.SQLExpressionFormatEntry.rst new file mode 100644 index 0000000000..710c25f08e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SQLExpressionFormatEntry.rst @@ -0,0 +1,11 @@ +SQLExpressionFormatEntry +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SQLExpressionFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SchemaSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SchemaSummary.rst new file mode 100644 index 0000000000..dc14161119 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SchemaSummary.rst @@ -0,0 +1,11 @@ +SchemaSummary +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SchemaSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveCategory.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveCategory.rst new file mode 100644 index 0000000000..0581126cbd --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveCategory.rst @@ -0,0 +1,11 @@ +SensitiveCategory +================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveCategory + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumn.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumn.rst new file mode 100644 index 0000000000..adc6f88a54 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumn.rst @@ -0,0 +1,11 @@ +SensitiveColumn +=============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveColumn + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnCollection.rst new file mode 100644 index 0000000000..74cc348167 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnCollection.rst @@ -0,0 +1,11 @@ +SensitiveColumnCollection +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveColumnCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnSummary.rst new file mode 100644 index 0000000000..f49c993d9f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveColumnSummary.rst @@ -0,0 +1,11 @@ +SensitiveColumnSummary +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveColumnSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModel.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModel.rst new file mode 100644 index 0000000000..fe90acce1b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModel.rst @@ -0,0 +1,11 @@ +SensitiveDataModel +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveDataModel + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelCollection.rst new file mode 100644 index 0000000000..9eab39fd9f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelCollection.rst @@ -0,0 +1,11 @@ +SensitiveDataModelCollection +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveDataModelCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelSummary.rst new file mode 100644 index 0000000000..c9799bda8b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveDataModelSummary.rst @@ -0,0 +1,11 @@ +SensitiveDataModelSummary +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveDataModelSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveType.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveType.rst new file mode 100644 index 0000000000..9b26f7524c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveType.rst @@ -0,0 +1,11 @@ +SensitiveType +============= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveType + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeCollection.rst new file mode 100644 index 0000000000..88fdf4cbf7 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeCollection.rst @@ -0,0 +1,11 @@ +SensitiveTypeCollection +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveTypeCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypePattern.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypePattern.rst new file mode 100644 index 0000000000..f63793780d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypePattern.rst @@ -0,0 +1,11 @@ +SensitiveTypePattern +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveTypePattern + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeSummary.rst new file mode 100644 index 0000000000..9998c838d9 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SensitiveTypeSummary.rst @@ -0,0 +1,11 @@ +SensitiveTypeSummary +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SensitiveTypeSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.ShuffleFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.ShuffleFormatEntry.rst new file mode 100644 index 0000000000..c638988c11 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.ShuffleFormatEntry.rst @@ -0,0 +1,11 @@ +ShuffleFormatEntry +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: ShuffleFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.StartAuditTrailDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.StartAuditTrailDetails.rst new file mode 100644 index 0000000000..a863e2cabf --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.StartAuditTrailDetails.rst @@ -0,0 +1,11 @@ +StartAuditTrailDetails +====================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: StartAuditTrailDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.SubstringFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.SubstringFormatEntry.rst new file mode 100644 index 0000000000..4aafd02be0 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.SubstringFormatEntry.rst @@ -0,0 +1,11 @@ +SubstringFormatEntry +==================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: SubstringFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.Summary.rst b/docs/api/data_safe/models/oci.data_safe.models.Summary.rst new file mode 100644 index 0000000000..ab1f14d73f --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.Summary.rst @@ -0,0 +1,11 @@ +Summary +======= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: Summary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.TableSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.TableSummary.rst new file mode 100644 index 0000000000..0151e04b82 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.TableSummary.rst @@ -0,0 +1,11 @@ +TableSummary +============ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: TableSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociation.rst b/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociation.rst new file mode 100644 index 0000000000..3c2e6191a3 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociation.rst @@ -0,0 +1,11 @@ +TargetAlertPolicyAssociation +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: TargetAlertPolicyAssociation + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationCollection.rst b/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationCollection.rst new file mode 100644 index 0000000000..b6eb3d5b5e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationCollection.rst @@ -0,0 +1,11 @@ +TargetAlertPolicyAssociationCollection +====================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: TargetAlertPolicyAssociationCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationSummary.rst b/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationSummary.rst new file mode 100644 index 0000000000..c704fef97c --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.TargetAlertPolicyAssociationSummary.rst @@ -0,0 +1,11 @@ +TargetAlertPolicyAssociationSummary +=================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: TargetAlertPolicyAssociationSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.TruncateTableFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.TruncateTableFormatEntry.rst new file mode 100644 index 0000000000..8bcbd9daef --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.TruncateTableFormatEntry.rst @@ -0,0 +1,11 @@ +TruncateTableFormatEntry +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: TruncateTableFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UDFFormatEntry.rst b/docs/api/data_safe/models/oci.data_safe.models.UDFFormatEntry.rst new file mode 100644 index 0000000000..53a4ac7861 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UDFFormatEntry.rst @@ -0,0 +1,11 @@ +UDFFormatEntry +============== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UDFFormatEntry + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertDetails.rst new file mode 100644 index 0000000000..d23bb6fb4e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertDetails.rst @@ -0,0 +1,11 @@ +UpdateAlertDetails +================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAlertDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyRuleDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyRuleDetails.rst new file mode 100644 index 0000000000..91fcefa6bd --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAlertPolicyRuleDetails.rst @@ -0,0 +1,11 @@ +UpdateAlertPolicyRuleDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAlertPolicyRuleDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditArchiveRetrievalDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditArchiveRetrievalDetails.rst new file mode 100644 index 0000000000..146a36261a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditArchiveRetrievalDetails.rst @@ -0,0 +1,11 @@ +UpdateAuditArchiveRetrievalDetails +================================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAuditArchiveRetrievalDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditPolicyDetails.rst new file mode 100644 index 0000000000..7525e90d58 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditPolicyDetails.rst @@ -0,0 +1,11 @@ +UpdateAuditPolicyDetails +======================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAuditPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditProfileDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditProfileDetails.rst new file mode 100644 index 0000000000..702a792836 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditProfileDetails.rst @@ -0,0 +1,11 @@ +UpdateAuditProfileDetails +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAuditProfileDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditTrailDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditTrailDetails.rst new file mode 100644 index 0000000000..cf3b4c9160 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateAuditTrailDetails.rst @@ -0,0 +1,11 @@ +UpdateAuditTrailDetails +======================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateAuditTrailDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceDetails.rst new file mode 100644 index 0000000000..c924081b3d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceDetails.rst @@ -0,0 +1,11 @@ +UpdateColumnSourceDetails +========================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateColumnSourceDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceSdmDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceSdmDetails.rst new file mode 100644 index 0000000000..4aeba29d0d --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceSdmDetails.rst @@ -0,0 +1,11 @@ +UpdateColumnSourceSdmDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateColumnSourceSdmDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceTargetDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceTargetDetails.rst new file mode 100644 index 0000000000..33cf8c363e --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateColumnSourceTargetDetails.rst @@ -0,0 +1,11 @@ +UpdateColumnSourceTargetDetails +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateColumnSourceTargetDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateLibraryMaskingFormatDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateLibraryMaskingFormatDetails.rst new file mode 100644 index 0000000000..b5d06edf44 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateLibraryMaskingFormatDetails.rst @@ -0,0 +1,11 @@ +UpdateLibraryMaskingFormatDetails +================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateLibraryMaskingFormatDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingColumnDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingColumnDetails.rst new file mode 100644 index 0000000000..2805bb1b91 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingColumnDetails.rst @@ -0,0 +1,11 @@ +UpdateMaskingColumnDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateMaskingColumnDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingPolicyDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingPolicyDetails.rst new file mode 100644 index 0000000000..af0b1ee34a --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateMaskingPolicyDetails.rst @@ -0,0 +1,11 @@ +UpdateMaskingPolicyDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateMaskingPolicyDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateReportDefinitionDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateReportDefinitionDetails.rst new file mode 100644 index 0000000000..86a0d5bceb --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateReportDefinitionDetails.rst @@ -0,0 +1,11 @@ +UpdateReportDefinitionDetails +============================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateReportDefinitionDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveCategoryDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveCategoryDetails.rst new file mode 100644 index 0000000000..9b98d761b0 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveCategoryDetails.rst @@ -0,0 +1,11 @@ +UpdateSensitiveCategoryDetails +============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateSensitiveCategoryDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveColumnDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveColumnDetails.rst new file mode 100644 index 0000000000..615c5b1100 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveColumnDetails.rst @@ -0,0 +1,11 @@ +UpdateSensitiveColumnDetails +============================ + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateSensitiveColumnDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveDataModelDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveDataModelDetails.rst new file mode 100644 index 0000000000..7b93c9d6aa --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveDataModelDetails.rst @@ -0,0 +1,11 @@ +UpdateSensitiveDataModelDetails +=============================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateSensitiveDataModelDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypeDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypeDetails.rst new file mode 100644 index 0000000000..bf689b96c1 --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypeDetails.rst @@ -0,0 +1,11 @@ +UpdateSensitiveTypeDetails +========================== + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateSensitiveTypeDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypePatternDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypePatternDetails.rst new file mode 100644 index 0000000000..4a32a689ac --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateSensitiveTypePatternDetails.rst @@ -0,0 +1,11 @@ +UpdateSensitiveTypePatternDetails +================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateSensitiveTypePatternDetails + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/data_safe/models/oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails.rst b/docs/api/data_safe/models/oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails.rst new file mode 100644 index 0000000000..da1402797b --- /dev/null +++ b/docs/api/data_safe/models/oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails.rst @@ -0,0 +1,11 @@ +UpdateTargetAlertPolicyAssociationDetails +========================================= + +.. currentmodule:: oci.data_safe.models + +.. autoclass:: UpdateTargetAlertPolicyAssociationDetails + :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 dbcec493d6..145ea17baf 100644 --- a/docs/api/landing.rst +++ b/docs/api/landing.rst @@ -5,8 +5,10 @@ API Reference * :doc:`Anomaly Detection ` * :doc:`Ai Service Language ` +* :doc:`Ai Service Vision ` * :doc:`Analytics ` * :doc:`Announcement ` +* :doc:`Announcement Subscription ` * :doc:`Announcements Preferences ` * :doc:`Api Gateway ` * :doc:`Deployment ` @@ -140,6 +142,7 @@ API Reference * :doc:`Sender Invitation ` * :doc:`Subscription ` * :doc:`Work Request ` +* :doc:`Threatintel ` * :doc:`Rewards ` * :doc:`Usageapi ` * :doc:`Vaults ` @@ -170,6 +173,7 @@ API Reference ai_anomaly_detection ai_language + ai_vision analytics announcements_service apigateway @@ -256,6 +260,7 @@ API Reference service_manager_proxy streaming tenant_manager_control_plane + threat_intelligence usage usage_api vault diff --git a/docs/api/threat_intelligence.rst b/docs/api/threat_intelligence.rst new file mode 100644 index 0000000000..4d15ed7aab --- /dev/null +++ b/docs/api/threat_intelligence.rst @@ -0,0 +1,36 @@ +Threat Intelligence +=================== + +.. autosummary:: + :toctree: threat_intelligence/client + :nosignatures: + :template: autosummary/service_client.rst + + oci.threat_intelligence.ThreatintelClient + oci.threat_intelligence.ThreatintelClientCompositeOperations + +-------- + Models +-------- + +.. autosummary:: + :toctree: threat_intelligence/models + :nosignatures: + :template: autosummary/model_class.rst + + oci.threat_intelligence.models.DataAttribution + oci.threat_intelligence.models.DataVisibility + oci.threat_intelligence.models.EntityReference + oci.threat_intelligence.models.Indicator + oci.threat_intelligence.models.IndicatorAttribute + oci.threat_intelligence.models.IndicatorCountCollection + oci.threat_intelligence.models.IndicatorCountDimensions + oci.threat_intelligence.models.IndicatorCountSummary + oci.threat_intelligence.models.IndicatorReference + oci.threat_intelligence.models.IndicatorRelationship + oci.threat_intelligence.models.IndicatorSourceSummary + oci.threat_intelligence.models.IndicatorSummary + oci.threat_intelligence.models.IndicatorSummaryCollection + oci.threat_intelligence.models.ThreatType + oci.threat_intelligence.models.ThreatTypeSummary + oci.threat_intelligence.models.ThreatTypesCollection diff --git a/docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClient.rst b/docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClient.rst new file mode 100644 index 0000000000..d92607bf39 --- /dev/null +++ b/docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClient.rst @@ -0,0 +1,8 @@ +ThreatintelClient +================= + +.. currentmodule:: oci.threat_intelligence + +.. autoclass:: ThreatintelClient + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClientCompositeOperations.rst b/docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClientCompositeOperations.rst new file mode 100644 index 0000000000..bd48effb34 --- /dev/null +++ b/docs/api/threat_intelligence/client/oci.threat_intelligence.ThreatintelClientCompositeOperations.rst @@ -0,0 +1,8 @@ +ThreatintelClientCompositeOperations +==================================== + +.. currentmodule:: oci.threat_intelligence + +.. autoclass:: ThreatintelClientCompositeOperations + :special-members: __init__ + :members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataAttribution.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataAttribution.rst new file mode 100644 index 0000000000..8e2ee245a5 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataAttribution.rst @@ -0,0 +1,11 @@ +DataAttribution +=============== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: DataAttribution + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataVisibility.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataVisibility.rst new file mode 100644 index 0000000000..b1fdd463cf --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.DataVisibility.rst @@ -0,0 +1,11 @@ +DataVisibility +============== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: DataVisibility + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.EntityReference.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.EntityReference.rst new file mode 100644 index 0000000000..11bb2c4d35 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.EntityReference.rst @@ -0,0 +1,11 @@ +EntityReference +=============== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: EntityReference + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.Indicator.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.Indicator.rst new file mode 100644 index 0000000000..c951c8efb8 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.Indicator.rst @@ -0,0 +1,11 @@ +Indicator +========= + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: Indicator + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorAttribute.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorAttribute.rst new file mode 100644 index 0000000000..a97de1adb6 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorAttribute.rst @@ -0,0 +1,11 @@ +IndicatorAttribute +================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorAttribute + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountCollection.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountCollection.rst new file mode 100644 index 0000000000..f1e019309e --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountCollection.rst @@ -0,0 +1,11 @@ +IndicatorCountCollection +======================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorCountCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountDimensions.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountDimensions.rst new file mode 100644 index 0000000000..ec3fa0e676 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountDimensions.rst @@ -0,0 +1,11 @@ +IndicatorCountDimensions +======================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorCountDimensions + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountSummary.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountSummary.rst new file mode 100644 index 0000000000..2e0069c93b --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorCountSummary.rst @@ -0,0 +1,11 @@ +IndicatorCountSummary +===================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorCountSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorReference.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorReference.rst new file mode 100644 index 0000000000..fed2b899ca --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorReference.rst @@ -0,0 +1,11 @@ +IndicatorReference +================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorReference + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorRelationship.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorRelationship.rst new file mode 100644 index 0000000000..21ab4c64f8 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorRelationship.rst @@ -0,0 +1,11 @@ +IndicatorRelationship +===================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorRelationship + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSourceSummary.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSourceSummary.rst new file mode 100644 index 0000000000..15ff798033 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSourceSummary.rst @@ -0,0 +1,11 @@ +IndicatorSourceSummary +====================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorSourceSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummary.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummary.rst new file mode 100644 index 0000000000..b18d546040 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummary.rst @@ -0,0 +1,11 @@ +IndicatorSummary +================ + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummaryCollection.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummaryCollection.rst new file mode 100644 index 0000000000..f007140cc8 --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.IndicatorSummaryCollection.rst @@ -0,0 +1,11 @@ +IndicatorSummaryCollection +========================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: IndicatorSummaryCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatType.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatType.rst new file mode 100644 index 0000000000..c5cd1447cf --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatType.rst @@ -0,0 +1,11 @@ +ThreatType +========== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: ThreatType + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypeSummary.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypeSummary.rst new file mode 100644 index 0000000000..b6d0a7449d --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypeSummary.rst @@ -0,0 +1,11 @@ +ThreatTypeSummary +================= + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: ThreatTypeSummary + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypesCollection.rst b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypesCollection.rst new file mode 100644 index 0000000000..ce6330305d --- /dev/null +++ b/docs/api/threat_intelligence/models/oci.threat_intelligence.models.ThreatTypesCollection.rst @@ -0,0 +1,11 @@ +ThreatTypesCollection +===================== + +.. currentmodule:: oci.threat_intelligence.models + +.. autoclass:: ThreatTypesCollection + :show-inheritance: + :special-members: __init__ + :members: + :undoc-members: + :inherited-members: \ No newline at end of file diff --git a/src/oci/__init__.py b/src/oci/__init__.py index c94266c353..e7c1632133 100644 --- a/src/oci/__init__.py +++ b/src/oci/__init__.py @@ -16,9 +16,9 @@ if os.getenv("OCI_PYTHON_SDK_NO_SERVICE_IMPORTS", "").lower() in ["true", "1"]: pass else: - from . import ai_anomaly_detection, ai_language, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, application_migration, appmgmt_control, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, certificates, certificates_management, cims, cloud_guard, compute_instance_agent, container_engine, core, dashboard_service, data_catalog, data_flow, data_integration, data_labeling_service, data_labeling_service_dataplane, data_safe, data_science, database, database_management, database_migration, database_tools, devops, dns, dts, email, events, file_storage, functions, generic_artifacts_content, golden_gate, healthchecks, identity, identity_data_plane, integration, jms, key_management, limits, load_balancer, log_analytics, logging, loggingingestion, loggingsearch, management_agent, management_dashboard, marketplace, monitoring, mysql, network_load_balancer, nosql, object_storage, oce, ocvp, oda, ons, operator_access_control, opsi, optimizer, os_management, osp_gateway, osub_billing_schedule, osub_organization_subscription, osub_subscription, osub_usage, resource_manager, resource_search, rover, sch, secrets, service_catalog, service_manager_proxy, streaming, tenant_manager_control_plane, usage, usage_api, vault, visual_builder, vulnerability_scanning, waas, waf, work_requests + from . import ai_anomaly_detection, ai_language, ai_vision, analytics, announcements_service, apigateway, apm_config, apm_control_plane, apm_synthetics, apm_traces, application_migration, appmgmt_control, artifacts, audit, autoscaling, bastion, bds, blockchain, budget, certificates, certificates_management, cims, cloud_guard, compute_instance_agent, container_engine, core, dashboard_service, data_catalog, data_flow, data_integration, data_labeling_service, data_labeling_service_dataplane, data_safe, data_science, database, database_management, database_migration, database_tools, devops, dns, dts, email, events, file_storage, functions, generic_artifacts_content, golden_gate, healthchecks, identity, identity_data_plane, integration, jms, key_management, limits, load_balancer, log_analytics, logging, loggingingestion, loggingsearch, management_agent, management_dashboard, marketplace, monitoring, mysql, network_load_balancer, nosql, object_storage, oce, ocvp, oda, ons, operator_access_control, opsi, optimizer, os_management, osp_gateway, osub_billing_schedule, osub_organization_subscription, osub_subscription, osub_usage, resource_manager, resource_search, rover, sch, secrets, service_catalog, service_manager_proxy, streaming, tenant_manager_control_plane, threat_intelligence, usage, usage_api, vault, visual_builder, vulnerability_scanning, waas, waf, work_requests __all__ = [ "BaseClient", "Error", "Request", "Response", "Signer", "config", "constants", "decorators", "exceptions", "regions", "wait_until", "pagination", "auth", "retry", "fips", "circuit_breaker", - "ai_anomaly_detection", "ai_language", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "application_migration", "appmgmt_control", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "certificates", "certificates_management", "cims", "cloud_guard", "compute_instance_agent", "container_engine", "core", "dashboard_service", "data_catalog", "data_flow", "data_integration", "data_labeling_service", "data_labeling_service_dataplane", "data_safe", "data_science", "database", "database_management", "database_migration", "database_tools", "devops", "dns", "dts", "email", "events", "file_storage", "functions", "generic_artifacts_content", "golden_gate", "healthchecks", "identity", "identity_data_plane", "integration", "jms", "key_management", "limits", "load_balancer", "log_analytics", "logging", "loggingingestion", "loggingsearch", "management_agent", "management_dashboard", "marketplace", "monitoring", "mysql", "network_load_balancer", "nosql", "object_storage", "oce", "ocvp", "oda", "ons", "operator_access_control", "opsi", "optimizer", "os_management", "osp_gateway", "osub_billing_schedule", "osub_organization_subscription", "osub_subscription", "osub_usage", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "service_manager_proxy", "streaming", "tenant_manager_control_plane", "usage", "usage_api", "vault", "visual_builder", "vulnerability_scanning", "waas", "waf", "work_requests" + "ai_anomaly_detection", "ai_language", "ai_vision", "analytics", "announcements_service", "apigateway", "apm_config", "apm_control_plane", "apm_synthetics", "apm_traces", "application_migration", "appmgmt_control", "artifacts", "audit", "autoscaling", "bastion", "bds", "blockchain", "budget", "certificates", "certificates_management", "cims", "cloud_guard", "compute_instance_agent", "container_engine", "core", "dashboard_service", "data_catalog", "data_flow", "data_integration", "data_labeling_service", "data_labeling_service_dataplane", "data_safe", "data_science", "database", "database_management", "database_migration", "database_tools", "devops", "dns", "dts", "email", "events", "file_storage", "functions", "generic_artifacts_content", "golden_gate", "healthchecks", "identity", "identity_data_plane", "integration", "jms", "key_management", "limits", "load_balancer", "log_analytics", "logging", "loggingingestion", "loggingsearch", "management_agent", "management_dashboard", "marketplace", "monitoring", "mysql", "network_load_balancer", "nosql", "object_storage", "oce", "ocvp", "oda", "ons", "operator_access_control", "opsi", "optimizer", "os_management", "osp_gateway", "osub_billing_schedule", "osub_organization_subscription", "osub_subscription", "osub_usage", "resource_manager", "resource_search", "rover", "sch", "secrets", "service_catalog", "service_manager_proxy", "streaming", "tenant_manager_control_plane", "threat_intelligence", "usage", "usage_api", "vault", "visual_builder", "vulnerability_scanning", "waas", "waf", "work_requests" ] diff --git a/src/oci/ai_vision/__init__.py b/src/oci/ai_vision/__init__.py new file mode 100644 index 0000000000..0c90bb8725 --- /dev/null +++ b/src/oci/ai_vision/__init__.py @@ -0,0 +1,12 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + + +from .ai_service_vision_client import AIServiceVisionClient +from .ai_service_vision_client_composite_operations import AIServiceVisionClientCompositeOperations +from . import models + +__all__ = ["AIServiceVisionClient", "AIServiceVisionClientCompositeOperations", "models"] diff --git a/src/oci/ai_vision/ai_service_vision_client.py b/src/oci/ai_vision/ai_service_vision_client.py new file mode 100644 index 0000000000..3e5d49acd2 --- /dev/null +++ b/src/oci/ai_vision/ai_service_vision_client.py @@ -0,0 +1,2535 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import ai_vision_type_mapping +missing = Sentinel("Missing") + + +class AIServiceVisionClient(object): + """ + A description of the VisionService API. + """ + + 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 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. + """ + 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': '/20220125', + 'service_endpoint_template': 'https://vision.aiservice.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + 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("ai_service_vision", config, signer, ai_vision_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def analyze_document(self, analyze_document_details, **kwargs): + """ + Perform different types of image analysis. + + + :param oci.ai_vision.models.AnalyzeDocumentDetails analyze_document_details: (required) + Details about how to analyze a document. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.AnalyzeDocumentResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use analyze_document API. + """ + resource_path = "/actions/analyzeDocument" + method = "POST" + + # 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( + "analyze_document got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + 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, + header_params=header_params, + body=analyze_document_details, + response_type="AnalyzeDocumentResult") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=analyze_document_details, + response_type="AnalyzeDocumentResult") + + def analyze_image(self, analyze_image_details, **kwargs): + """ + Perform different types of image analysis. + + + :param oci.ai_vision.models.AnalyzeImageDetails analyze_image_details: (required) + Details about how to analyze an image. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.AnalyzeImageResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use analyze_image API. + """ + resource_path = "/actions/analyzeImage" + method = "POST" + + # 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( + "analyze_image got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + 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, + header_params=header_params, + body=analyze_image_details, + response_type="AnalyzeImageResult") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=analyze_image_details, + response_type="AnalyzeImageResult") + + def cancel_document_job(self, document_job_id, **kwargs): + """ + Cancel a batch document job. + + + :param str document_job_id: (required) + Document job 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_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_document_job API. + """ + resource_path = "/documentJobs/{documentJobId}/actions/cancel" + method = "POST" + + # 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( + "cancel_document_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "documentJobId": document_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def cancel_image_job(self, image_job_id, **kwargs): + """ + Cancel a batch image job. + + + :param str image_job_id: (required) + Image job 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_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_image_job API. + """ + resource_path = "/imageJobs/{imageJobId}/actions/cancel" + method = "POST" + + # 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( + "cancel_image_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "imageJobId": image_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def cancel_work_request(self, work_request_id, **kwargs): + """ + Cancel work request with the given ID. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_work_request API. + """ + resource_path = "/workRequests/{workRequestId}" + method = "DELETE" + + # 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( + "cancel_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def change_model_compartment(self, model_id, change_model_compartment_details, **kwargs): + """ + Moves a model from one compartment to another. When provided, If-Match is checked against ETag values of the resource. + + + :param str model_id: (required) + unique model identifier. + + :param oci.ai_vision.models.ChangeModelCompartmentDetails change_model_compartment_details: (required) + The deatils of the move. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_model_compartment API. + """ + resource_path = "/models/{modelId}/actions/changeCompartment" + method = "POST" + + # 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( + "change_model_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_model_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_model_compartment_details) + + def change_project_compartment(self, project_id, change_project_compartment_details, **kwargs): + """ + Moves a project from one compartment to another. When provided, If-Match is checked against ETag values of the resource. + + + :param str project_id: (required) + unique project identifier. + + :param oci.ai_vision.models.ChangeProjectCompartmentDetails change_project_compartment_details: (required) + The deatils of the move. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_project_compartment API. + """ + resource_path = "/projects/{projectId}/actions/changeCompartment" + method = "POST" + + # 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( + "change_project_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_project_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_project_compartment_details) + + def create_document_job(self, create_document_job_details, **kwargs): + """ + Create a batch document analysis job + + + :param oci.ai_vision.models.CreateDocumentJobDetails create_document_job_details: (required) + Details about the batch document analysis. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.DocumentJob` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_document_job API. + """ + resource_path = "/documentJobs" + method = "POST" + + # 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( + "create_document_job got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_document_job_details, + response_type="DocumentJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_document_job_details, + response_type="DocumentJob") + + def create_image_job(self, create_image_job_details, **kwargs): + """ + Create a batch image analysis job. + + + :param oci.ai_vision.models.CreateImageJobDetails create_image_job_details: (required) + Details about the batch image analysis. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.ImageJob` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_image_job API. + """ + resource_path = "/imageJobs" + method = "POST" + + # 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( + "create_image_job got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_image_job_details, + response_type="ImageJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_image_job_details, + response_type="ImageJob") + + def create_model(self, create_model_details, **kwargs): + """ + Creates a new model. + + + :param oci.ai_vision.models.CreateModelDetails create_model_details: (required) + Metadata about the new model. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.Model` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_model API. + """ + resource_path = "/models" + method = "POST" + + # 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( + "create_model got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_model_details, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_model_details, + response_type="Model") + + def create_project(self, create_project_details, **kwargs): + """ + Creates a new project. + + + :param oci.ai_vision.models.CreateProjectDetails create_project_details: (required) + Details for the new Project. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request + might be rejected. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.Project` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_project API. + """ + resource_path = "/projects" + method = "POST" + + # 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( + "create_project got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_project_details, + response_type="Project") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_project_details, + response_type="Project") + + def delete_model(self, model_id, **kwargs): + """ + Deletes a model by identifier. + + + :param str model_id: (required) + unique model identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_model API. + """ + resource_path = "/models/{modelId}" + method = "DELETE" + + # 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( + "delete_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_project(self, project_id, **kwargs): + """ + Deletes a project by identifier. + + + :param str project_id: (required) + unique project identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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_project API. + """ + resource_path = "/projects/{projectId}" + method = "DELETE" + + # 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( + "delete_project got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def get_document_job(self, document_job_id, **kwargs): + """ + Get details of a batch document job. + + + :param str document_job_id: (required) + Document job id. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.DocumentJob` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_document_job API. + """ + resource_path = "/documentJobs/{documentJobId}" + method = "GET" + + # 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( + "get_document_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "documentJobId": document_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DocumentJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DocumentJob") + + def get_image_job(self, image_job_id, **kwargs): + """ + Get details of a batch image job. + + + :param str image_job_id: (required) + Image job id. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.ImageJob` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_image_job API. + """ + resource_path = "/imageJobs/{imageJobId}" + method = "GET" + + # 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( + "get_image_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "imageJobId": image_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ImageJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ImageJob") + + def get_model(self, model_id, **kwargs): + """ + Gets a model by identifier. + + + :param str model_id: (required) + unique model identifier. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.ai_vision.models.Model` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_model API. + """ + resource_path = "/models/{modelId}" + method = "GET" + + # 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( + "get_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Model") + + def get_project(self, project_id, **kwargs): + """ + Gets a project by identifier. + + + :param str project_id: (required) + unique project identifier. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.ai_vision.models.Project` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_project API. + """ + resource_path = "/projects/{projectId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_project got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Project") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Project") + + def get_work_request(self, work_request_id, **kwargs): + """ + Gets the status of the work request with the given ID. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation 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.ai_vision.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_work_request API. + """ + resource_path = "/workRequests/{workRequestId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + + def list_models(self, **kwargs): + """ + Returns a list of models in a compartment. + + + :param str compartment_id: (optional) + The ID of the compartment in which to list resources. + + :param str project_id: (optional) + The ID of the project for which to list the objects. + + :param str lifecycle_state: (optional) + Filter to match models with the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str id: (optional) + Filter to find the model with the given identifier. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :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 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.ai_vision.models.ModelCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_models API. + """ + resource_path = "/models" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "project_id", + "lifecycle_state", + "display_name", + "id", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_models got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "projectId": kwargs.get("project_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing), + "id": kwargs.get("id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ModelCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ModelCollection") + + def list_projects(self, **kwargs): + """ + Returns a list of projects. + + + :param str compartment_id: (optional) + The ID of the compartment in which to list resources. + + :param str lifecycle_state: (optional) + Filter to match projects with the given lifecycleState. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str id: (optional) + Filter to find the project with the given identifier. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + The position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :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 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.ai_vision.models.ProjectCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_projects API. + """ + resource_path = "/projects" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "lifecycle_state", + "display_name", + "id", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_projects got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "displayName": kwargs.get("display_name", missing), + "id": kwargs.get("id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ProjectCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ProjectCollection") + + def list_work_request_errors(self, work_request_id, **kwargs): + """ + Return a (paginated) list of errors for a given work request. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :param int limit: (optional) + The maximum number of items to return. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + + Allowed values are: "timeAccepted" + + :param str sort_order: (optional) + The sort order to use, either 'ASC' or 'DESC'. + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.WorkRequestErrorCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_errors API. + """ + resource_path = "/workRequests/{workRequestId}/errors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeAccepted"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestErrorCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestErrorCollection") + + def list_work_request_logs(self, work_request_id, **kwargs): + """ + Return a (paginated) list of logs for a given work request. + + + :param str work_request_id: (required) + The ID of the asynchronous request. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :param int limit: (optional) + The maximum number of items to return. + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeAccepted is descending. + + Allowed values are: "timeAccepted" + + :param str sort_order: (optional) + The sort order to use, either 'ASC' or 'DESC'. + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.WorkRequestLogEntryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_logs API. + """ + resource_path = "/workRequests/{workRequestId}/logs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit", + "sort_by", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeAccepted"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestLogEntryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestLogEntryCollection") + + def list_work_requests(self, **kwargs): + """ + Lists the work requests in a compartment. + + + :param str compartment_id: (optional) + The ID of the compartment in which to list resources. + + :param str work_request_id: (optional) + The ID of the asynchronous work request. + + :param str status: (optional) + A filter to return only resources their lifecycleState matches the given OperationStatus. + + Allowed values are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED" + + :param str resource_id: (optional) + The ID of the resource affected by the work request. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str page: (optional) + The position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :param int limit: (optional) + The maximum number of items to return. + + :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 timeAccepted is descending. + + Allowed values are: "timeAccepted" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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_vision.models.WorkRequestSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_requests API. + """ + resource_path = "/workRequests" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "work_request_id", + "status", + "resource_id", + "opc_request_id", + "page", + "limit", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'status' in kwargs: + status_allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if kwargs['status'] not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeAccepted"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing), + "workRequestId": kwargs.get("work_request_id", missing), + "status": kwargs.get("status", missing), + "resourceId": kwargs.get("resource_id", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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="WorkRequestSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="WorkRequestSummaryCollection") + + def update_model(self, model_id, update_model_details, **kwargs): + """ + Updates model metadata. + + + :param str model_id: (required) + unique model identifier. + + :param oci.ai_vision.models.UpdateModelDetails update_model_details: (required) + Model metadata to be updated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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 update_model API. + """ + resource_path = "/models/{modelId}" + method = "PUT" + + # 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( + "update_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "modelId": model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_model_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_model_details) + + def update_project(self, project_id, update_project_details, **kwargs): + """ + Updates project metadata. + + + :param str project_id: (required) + unique project identifier. + + :param oci.ai_vision.models.UpdateProjectDetails update_project_details: (required) + Project metadata to be updated. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the `if-match` parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + 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 update_project API. + """ + resource_path = "/projects/{projectId}" + method = "PUT" + + # 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( + "update_project got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "projectId": project_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_project_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_project_details) diff --git a/src/oci/ai_vision/ai_service_vision_client_composite_operations.py b/src/oci/ai_vision/ai_service_vision_client_composite_operations.py new file mode 100644 index 0000000000..99b3ba335f --- /dev/null +++ b/src/oci/ai_vision/ai_service_vision_client_composite_operations.py @@ -0,0 +1,350 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class AIServiceVisionClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.ai_vision.AIServiceVisionClient` 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 AIServiceVisionClientCompositeOperations object + + :param AIServiceVisionClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_document_job_and_wait_for_state(self, create_document_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.create_document_job` and waits for the :py:class:`~oci.ai_vision.models.DocumentJob` acted upon + to enter the given state(s). + + :param oci.ai_vision.models.CreateDocumentJobDetails create_document_job_details: (required) + Details about the batch document analysis. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_vision.models.DocumentJob.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.create_document_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_document_job(create_document_job_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_document_job(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_image_job_and_wait_for_state(self, create_image_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.create_image_job` and waits for the :py:class:`~oci.ai_vision.models.ImageJob` acted upon + to enter the given state(s). + + :param oci.ai_vision.models.CreateImageJobDetails create_image_job_details: (required) + Details about the batch image analysis. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_vision.models.ImageJob.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.create_image_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_image_job(create_image_job_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_image_job(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_model_and_wait_for_state(self, create_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.create_model` and waits for the :py:class:`~oci.ai_vision.models.WorkRequest` + to enter the given state(s). + + :param oci.ai_vision.models.CreateModelDetails create_model_details: (required) + Metadata about the new model. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_vision.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.create_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_model(create_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_project_and_wait_for_state(self, create_project_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.create_project` and waits for the :py:class:`~oci.ai_vision.models.WorkRequest` + to enter the given state(s). + + :param oci.ai_vision.models.CreateProjectDetails create_project_details: (required) + Details for the new Project. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_vision.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.create_project` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.create_project(create_project_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_model_and_wait_for_state(self, model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.delete_model` and waits for the :py:class:`~oci.ai_vision.models.WorkRequest` + to enter the given state(s). + + :param str model_id: (required) + unique model identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_vision.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.delete_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_model(model_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_project_and_wait_for_state(self, project_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.delete_project` and waits for the :py:class:`~oci.ai_vision.models.WorkRequest` + to enter the given state(s). + + :param str project_id: (required) + unique project identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.ai_vision.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.delete_project` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_project(project_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_model_and_wait_for_state(self, model_id, update_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.update_model` and waits for the :py:class:`~oci.ai_vision.models.WorkRequest` + to enter the given state(s). + + :param str model_id: (required) + unique model identifier. + + :param oci.ai_vision.models.UpdateModelDetails update_model_details: (required) + Model metadata 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_vision.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.update_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_model(model_id, update_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_project_and_wait_for_state(self, project_id, update_project_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.ai_vision.AIServiceVisionClient.update_project` and waits for the :py:class:`~oci.ai_vision.models.WorkRequest` + to enter the given state(s). + + :param str project_id: (required) + unique project identifier. + + :param oci.ai_vision.models.UpdateProjectDetails update_project_details: (required) + Project metadata 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_vision.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.ai_vision.AIServiceVisionClient.update_project` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_project(project_id, update_project_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/ai_vision/models/__init__.py b/src/oci/ai_vision/models/__init__.py new file mode 100644 index 0000000000..0c7426105a --- /dev/null +++ b/src/oci/ai_vision/models/__init__.py @@ -0,0 +1,168 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from .analyze_document_details import AnalyzeDocumentDetails +from .analyze_document_result import AnalyzeDocumentResult +from .analyze_image_details import AnalyzeImageDetails +from .analyze_image_result import AnalyzeImageResult +from .bounding_polygon import BoundingPolygon +from .cell import Cell +from .change_model_compartment_details import ChangeModelCompartmentDetails +from .change_project_compartment_details import ChangeProjectCompartmentDetails +from .create_document_job_details import CreateDocumentJobDetails +from .create_image_job_details import CreateImageJobDetails +from .create_model_details import CreateModelDetails +from .create_project_details import CreateProjectDetails +from .data_science_labeling_dataset import DataScienceLabelingDataset +from .dataset import Dataset +from .detected_document_type import DetectedDocumentType +from .detected_language import DetectedLanguage +from .dimensions import Dimensions +from .document_classification_feature import DocumentClassificationFeature +from .document_details import DocumentDetails +from .document_feature import DocumentFeature +from .document_field import DocumentField +from .document_job import DocumentJob +from .document_key_value_detection_feature import DocumentKeyValueDetectionFeature +from .document_language_classification_feature import DocumentLanguageClassificationFeature +from .document_metadata import DocumentMetadata +from .document_table_detection_feature import DocumentTableDetectionFeature +from .document_text_detection_feature import DocumentTextDetectionFeature +from .field_label import FieldLabel +from .field_name import FieldName +from .field_value import FieldValue +from .image_classification_feature import ImageClassificationFeature +from .image_details import ImageDetails +from .image_feature import ImageFeature +from .image_job import ImageJob +from .image_object import ImageObject +from .image_object_detection_feature import ImageObjectDetectionFeature +from .image_text import ImageText +from .image_text_detection_feature import ImageTextDetectionFeature +from .inline_document_details import InlineDocumentDetails +from .inline_image_details import InlineImageDetails +from .input_location import InputLocation +from .label import Label +from .line import Line +from .model import Model +from .model_collection import ModelCollection +from .model_summary import ModelSummary +from .normalized_vertex import NormalizedVertex +from .object_list_inline_input_location import ObjectListInlineInputLocation +from .object_location import ObjectLocation +from .object_storage_dataset import ObjectStorageDataset +from .object_storage_document_details import ObjectStorageDocumentDetails +from .object_storage_image_details import ObjectStorageImageDetails +from .ontology_class import OntologyClass +from .output_location import OutputLocation +from .page import Page +from .processing_error import ProcessingError +from .project import Project +from .project_collection import ProjectCollection +from .project_summary import ProjectSummary +from .table import Table +from .table_row import TableRow +from .update_model_details import UpdateModelDetails +from .update_project_details import UpdateProjectDetails +from .value_array import ValueArray +from .value_date import ValueDate +from .value_integer import ValueInteger +from .value_number import ValueNumber +from .value_phone_number import ValuePhoneNumber +from .value_string import ValueString +from .value_time import ValueTime +from .word import Word +from .work_request import WorkRequest +from .work_request_error import WorkRequestError +from .work_request_error_collection import WorkRequestErrorCollection +from .work_request_log_entry import WorkRequestLogEntry +from .work_request_log_entry_collection import WorkRequestLogEntryCollection +from .work_request_resource import WorkRequestResource +from .work_request_summary import WorkRequestSummary +from .work_request_summary_collection import WorkRequestSummaryCollection + +# Maps type names to classes for ai_vision services. +ai_vision_type_mapping = { + "AnalyzeDocumentDetails": AnalyzeDocumentDetails, + "AnalyzeDocumentResult": AnalyzeDocumentResult, + "AnalyzeImageDetails": AnalyzeImageDetails, + "AnalyzeImageResult": AnalyzeImageResult, + "BoundingPolygon": BoundingPolygon, + "Cell": Cell, + "ChangeModelCompartmentDetails": ChangeModelCompartmentDetails, + "ChangeProjectCompartmentDetails": ChangeProjectCompartmentDetails, + "CreateDocumentJobDetails": CreateDocumentJobDetails, + "CreateImageJobDetails": CreateImageJobDetails, + "CreateModelDetails": CreateModelDetails, + "CreateProjectDetails": CreateProjectDetails, + "DataScienceLabelingDataset": DataScienceLabelingDataset, + "Dataset": Dataset, + "DetectedDocumentType": DetectedDocumentType, + "DetectedLanguage": DetectedLanguage, + "Dimensions": Dimensions, + "DocumentClassificationFeature": DocumentClassificationFeature, + "DocumentDetails": DocumentDetails, + "DocumentFeature": DocumentFeature, + "DocumentField": DocumentField, + "DocumentJob": DocumentJob, + "DocumentKeyValueDetectionFeature": DocumentKeyValueDetectionFeature, + "DocumentLanguageClassificationFeature": DocumentLanguageClassificationFeature, + "DocumentMetadata": DocumentMetadata, + "DocumentTableDetectionFeature": DocumentTableDetectionFeature, + "DocumentTextDetectionFeature": DocumentTextDetectionFeature, + "FieldLabel": FieldLabel, + "FieldName": FieldName, + "FieldValue": FieldValue, + "ImageClassificationFeature": ImageClassificationFeature, + "ImageDetails": ImageDetails, + "ImageFeature": ImageFeature, + "ImageJob": ImageJob, + "ImageObject": ImageObject, + "ImageObjectDetectionFeature": ImageObjectDetectionFeature, + "ImageText": ImageText, + "ImageTextDetectionFeature": ImageTextDetectionFeature, + "InlineDocumentDetails": InlineDocumentDetails, + "InlineImageDetails": InlineImageDetails, + "InputLocation": InputLocation, + "Label": Label, + "Line": Line, + "Model": Model, + "ModelCollection": ModelCollection, + "ModelSummary": ModelSummary, + "NormalizedVertex": NormalizedVertex, + "ObjectListInlineInputLocation": ObjectListInlineInputLocation, + "ObjectLocation": ObjectLocation, + "ObjectStorageDataset": ObjectStorageDataset, + "ObjectStorageDocumentDetails": ObjectStorageDocumentDetails, + "ObjectStorageImageDetails": ObjectStorageImageDetails, + "OntologyClass": OntologyClass, + "OutputLocation": OutputLocation, + "Page": Page, + "ProcessingError": ProcessingError, + "Project": Project, + "ProjectCollection": ProjectCollection, + "ProjectSummary": ProjectSummary, + "Table": Table, + "TableRow": TableRow, + "UpdateModelDetails": UpdateModelDetails, + "UpdateProjectDetails": UpdateProjectDetails, + "ValueArray": ValueArray, + "ValueDate": ValueDate, + "ValueInteger": ValueInteger, + "ValueNumber": ValueNumber, + "ValuePhoneNumber": ValuePhoneNumber, + "ValueString": ValueString, + "ValueTime": ValueTime, + "Word": Word, + "WorkRequest": WorkRequest, + "WorkRequestError": WorkRequestError, + "WorkRequestErrorCollection": WorkRequestErrorCollection, + "WorkRequestLogEntry": WorkRequestLogEntry, + "WorkRequestLogEntryCollection": WorkRequestLogEntryCollection, + "WorkRequestResource": WorkRequestResource, + "WorkRequestSummary": WorkRequestSummary, + "WorkRequestSummaryCollection": WorkRequestSummaryCollection +} diff --git a/src/oci/ai_vision/models/analyze_document_details.py b/src/oci/ai_vision/models/analyze_document_details.py new file mode 100644 index 0000000000..9eb0505d96 --- /dev/null +++ b/src/oci/ai_vision/models/analyze_document_details.py @@ -0,0 +1,375 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnalyzeDocumentDetails(object): + """ + Details about how to analyze a document. + """ + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "ENG" + LANGUAGE_ENG = "ENG" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "CES" + LANGUAGE_CES = "CES" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "DAN" + LANGUAGE_DAN = "DAN" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "NLD" + LANGUAGE_NLD = "NLD" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "FIN" + LANGUAGE_FIN = "FIN" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "FRA" + LANGUAGE_FRA = "FRA" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "DEU" + LANGUAGE_DEU = "DEU" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "ELL" + LANGUAGE_ELL = "ELL" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "HUN" + LANGUAGE_HUN = "HUN" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "ITA" + LANGUAGE_ITA = "ITA" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "NOR" + LANGUAGE_NOR = "NOR" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "POL" + LANGUAGE_POL = "POL" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "POR" + LANGUAGE_POR = "POR" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "RON" + LANGUAGE_RON = "RON" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "RUS" + LANGUAGE_RUS = "RUS" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "SLK" + LANGUAGE_SLK = "SLK" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "SPA" + LANGUAGE_SPA = "SPA" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "SWE" + LANGUAGE_SWE = "SWE" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "TUR" + LANGUAGE_TUR = "TUR" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "ARA" + LANGUAGE_ARA = "ARA" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "CHI_SIM" + LANGUAGE_CHI_SIM = "CHI_SIM" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "HIN" + LANGUAGE_HIN = "HIN" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "JPN" + LANGUAGE_JPN = "JPN" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "KOR" + LANGUAGE_KOR = "KOR" + + #: A constant which can be used with the language property of a AnalyzeDocumentDetails. + #: This constant has a value of "OTHERS" + LANGUAGE_OTHERS = "OTHERS" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "INVOICE" + DOCUMENT_TYPE_INVOICE = "INVOICE" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "RECEIPT" + DOCUMENT_TYPE_RECEIPT = "RECEIPT" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "RESUME" + DOCUMENT_TYPE_RESUME = "RESUME" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "TAX_FORM" + DOCUMENT_TYPE_TAX_FORM = "TAX_FORM" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "DRIVER_LICENSE" + DOCUMENT_TYPE_DRIVER_LICENSE = "DRIVER_LICENSE" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "PASSPORT" + DOCUMENT_TYPE_PASSPORT = "PASSPORT" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "BANK_STATEMENT" + DOCUMENT_TYPE_BANK_STATEMENT = "BANK_STATEMENT" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "CHECK" + DOCUMENT_TYPE_CHECK = "CHECK" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "PAYSLIP" + DOCUMENT_TYPE_PAYSLIP = "PAYSLIP" + + #: A constant which can be used with the document_type property of a AnalyzeDocumentDetails. + #: This constant has a value of "OTHERS" + DOCUMENT_TYPE_OTHERS = "OTHERS" + + def __init__(self, **kwargs): + """ + Initializes a new AnalyzeDocumentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param features: + The value to assign to the features property of this AnalyzeDocumentDetails. + :type features: list[oci.ai_vision.models.DocumentFeature] + + :param document: + The value to assign to the document property of this AnalyzeDocumentDetails. + :type document: oci.ai_vision.models.DocumentDetails + + :param compartment_id: + The value to assign to the compartment_id property of this AnalyzeDocumentDetails. + :type compartment_id: str + + :param output_location: + The value to assign to the output_location property of this AnalyzeDocumentDetails. + :type output_location: oci.ai_vision.models.OutputLocation + + :param language: + The value to assign to the language property of this AnalyzeDocumentDetails. + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS" + :type language: str + + :param document_type: + The value to assign to the document_type property of this AnalyzeDocumentDetails. + Allowed values for this property are: "INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS" + :type document_type: str + + """ + self.swagger_types = { + 'features': 'list[DocumentFeature]', + 'document': 'DocumentDetails', + 'compartment_id': 'str', + 'output_location': 'OutputLocation', + 'language': 'str', + 'document_type': 'str' + } + + self.attribute_map = { + 'features': 'features', + 'document': 'document', + 'compartment_id': 'compartmentId', + 'output_location': 'outputLocation', + 'language': 'language', + 'document_type': 'documentType' + } + + self._features = None + self._document = None + self._compartment_id = None + self._output_location = None + self._language = None + self._document_type = None + + @property + def features(self): + """ + **[Required]** Gets the features of this AnalyzeDocumentDetails. + Types of document analysis requested. + + + :return: The features of this AnalyzeDocumentDetails. + :rtype: list[oci.ai_vision.models.DocumentFeature] + """ + return self._features + + @features.setter + def features(self, features): + """ + Sets the features of this AnalyzeDocumentDetails. + Types of document analysis requested. + + + :param features: The features of this AnalyzeDocumentDetails. + :type: list[oci.ai_vision.models.DocumentFeature] + """ + self._features = features + + @property + def document(self): + """ + **[Required]** Gets the document of this AnalyzeDocumentDetails. + + :return: The document of this AnalyzeDocumentDetails. + :rtype: oci.ai_vision.models.DocumentDetails + """ + return self._document + + @document.setter + def document(self, document): + """ + Sets the document of this AnalyzeDocumentDetails. + + :param document: The document of this AnalyzeDocumentDetails. + :type: oci.ai_vision.models.DocumentDetails + """ + self._document = document + + @property + def compartment_id(self): + """ + Gets the compartment_id of this AnalyzeDocumentDetails. + The OCID of the compartment that calls the API. + + + :return: The compartment_id of this AnalyzeDocumentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AnalyzeDocumentDetails. + The OCID of the compartment that calls the API. + + + :param compartment_id: The compartment_id of this AnalyzeDocumentDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def output_location(self): + """ + Gets the output_location of this AnalyzeDocumentDetails. + + :return: The output_location of this AnalyzeDocumentDetails. + :rtype: oci.ai_vision.models.OutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this AnalyzeDocumentDetails. + + :param output_location: The output_location of this AnalyzeDocumentDetails. + :type: oci.ai_vision.models.OutputLocation + """ + self._output_location = output_location + + @property + def language(self): + """ + Gets the language of this AnalyzeDocumentDetails. + Language of the document, abbreviated according to ISO 639-2. + + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS" + + + :return: The language of this AnalyzeDocumentDetails. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """ + Sets the language of this AnalyzeDocumentDetails. + Language of the document, abbreviated according to ISO 639-2. + + + :param language: The language of this AnalyzeDocumentDetails. + :type: str + """ + allowed_values = ["ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS"] + if not value_allowed_none_or_none_sentinel(language, allowed_values): + raise ValueError( + "Invalid value for `language`, must be None or one of {0}" + .format(allowed_values) + ) + self._language = language + + @property + def document_type(self): + """ + Gets the document_type of this AnalyzeDocumentDetails. + The type of document. + + Allowed values for this property are: "INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS" + + + :return: The document_type of this AnalyzeDocumentDetails. + :rtype: str + """ + return self._document_type + + @document_type.setter + def document_type(self, document_type): + """ + Sets the document_type of this AnalyzeDocumentDetails. + The type of document. + + + :param document_type: The document_type of this AnalyzeDocumentDetails. + :type: str + """ + allowed_values = ["INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS"] + if not value_allowed_none_or_none_sentinel(document_type, allowed_values): + raise ValueError( + "Invalid value for `document_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._document_type = document_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_vision/models/analyze_document_result.py b/src/oci/ai_vision/models/analyze_document_result.py new file mode 100644 index 0000000000..12cbab58b8 --- /dev/null +++ b/src/oci/ai_vision/models/analyze_document_result.py @@ -0,0 +1,376 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnalyzeDocumentResult(object): + """ + Document analysis results. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AnalyzeDocumentResult object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param document_metadata: + The value to assign to the document_metadata property of this AnalyzeDocumentResult. + :type document_metadata: oci.ai_vision.models.DocumentMetadata + + :param pages: + The value to assign to the pages property of this AnalyzeDocumentResult. + :type pages: list[oci.ai_vision.models.Page] + + :param detected_document_types: + The value to assign to the detected_document_types property of this AnalyzeDocumentResult. + :type detected_document_types: list[oci.ai_vision.models.DetectedDocumentType] + + :param detected_languages: + The value to assign to the detected_languages property of this AnalyzeDocumentResult. + :type detected_languages: list[oci.ai_vision.models.DetectedLanguage] + + :param document_classification_model_version: + The value to assign to the document_classification_model_version property of this AnalyzeDocumentResult. + :type document_classification_model_version: str + + :param language_classification_model_version: + The value to assign to the language_classification_model_version property of this AnalyzeDocumentResult. + :type language_classification_model_version: str + + :param text_detection_model_version: + The value to assign to the text_detection_model_version property of this AnalyzeDocumentResult. + :type text_detection_model_version: str + + :param key_value_detection_model_version: + The value to assign to the key_value_detection_model_version property of this AnalyzeDocumentResult. + :type key_value_detection_model_version: str + + :param table_detection_model_version: + The value to assign to the table_detection_model_version property of this AnalyzeDocumentResult. + :type table_detection_model_version: str + + :param errors: + The value to assign to the errors property of this AnalyzeDocumentResult. + :type errors: list[oci.ai_vision.models.ProcessingError] + + :param searchable_pdf: + The value to assign to the searchable_pdf property of this AnalyzeDocumentResult. + :type searchable_pdf: str + + """ + self.swagger_types = { + 'document_metadata': 'DocumentMetadata', + 'pages': 'list[Page]', + 'detected_document_types': 'list[DetectedDocumentType]', + 'detected_languages': 'list[DetectedLanguage]', + 'document_classification_model_version': 'str', + 'language_classification_model_version': 'str', + 'text_detection_model_version': 'str', + 'key_value_detection_model_version': 'str', + 'table_detection_model_version': 'str', + 'errors': 'list[ProcessingError]', + 'searchable_pdf': 'str' + } + + self.attribute_map = { + 'document_metadata': 'documentMetadata', + 'pages': 'pages', + 'detected_document_types': 'detectedDocumentTypes', + 'detected_languages': 'detectedLanguages', + 'document_classification_model_version': 'documentClassificationModelVersion', + 'language_classification_model_version': 'languageClassificationModelVersion', + 'text_detection_model_version': 'textDetectionModelVersion', + 'key_value_detection_model_version': 'keyValueDetectionModelVersion', + 'table_detection_model_version': 'tableDetectionModelVersion', + 'errors': 'errors', + 'searchable_pdf': 'searchablePdf' + } + + self._document_metadata = None + self._pages = None + self._detected_document_types = None + self._detected_languages = None + self._document_classification_model_version = None + self._language_classification_model_version = None + self._text_detection_model_version = None + self._key_value_detection_model_version = None + self._table_detection_model_version = None + self._errors = None + self._searchable_pdf = None + + @property + def document_metadata(self): + """ + **[Required]** Gets the document_metadata of this AnalyzeDocumentResult. + + :return: The document_metadata of this AnalyzeDocumentResult. + :rtype: oci.ai_vision.models.DocumentMetadata + """ + return self._document_metadata + + @document_metadata.setter + def document_metadata(self, document_metadata): + """ + Sets the document_metadata of this AnalyzeDocumentResult. + + :param document_metadata: The document_metadata of this AnalyzeDocumentResult. + :type: oci.ai_vision.models.DocumentMetadata + """ + self._document_metadata = document_metadata + + @property + def pages(self): + """ + **[Required]** Gets the pages of this AnalyzeDocumentResult. + Array of Page. + + + :return: The pages of this AnalyzeDocumentResult. + :rtype: list[oci.ai_vision.models.Page] + """ + return self._pages + + @pages.setter + def pages(self, pages): + """ + Sets the pages of this AnalyzeDocumentResult. + Array of Page. + + + :param pages: The pages of this AnalyzeDocumentResult. + :type: list[oci.ai_vision.models.Page] + """ + self._pages = pages + + @property + def detected_document_types(self): + """ + Gets the detected_document_types of this AnalyzeDocumentResult. + An array of detected document types. + + + :return: The detected_document_types of this AnalyzeDocumentResult. + :rtype: list[oci.ai_vision.models.DetectedDocumentType] + """ + return self._detected_document_types + + @detected_document_types.setter + def detected_document_types(self, detected_document_types): + """ + Sets the detected_document_types of this AnalyzeDocumentResult. + An array of detected document types. + + + :param detected_document_types: The detected_document_types of this AnalyzeDocumentResult. + :type: list[oci.ai_vision.models.DetectedDocumentType] + """ + self._detected_document_types = detected_document_types + + @property + def detected_languages(self): + """ + Gets the detected_languages of this AnalyzeDocumentResult. + An array of detected languages. + + + :return: The detected_languages of this AnalyzeDocumentResult. + :rtype: list[oci.ai_vision.models.DetectedLanguage] + """ + return self._detected_languages + + @detected_languages.setter + def detected_languages(self, detected_languages): + """ + Sets the detected_languages of this AnalyzeDocumentResult. + An array of detected languages. + + + :param detected_languages: The detected_languages of this AnalyzeDocumentResult. + :type: list[oci.ai_vision.models.DetectedLanguage] + """ + self._detected_languages = detected_languages + + @property + def document_classification_model_version(self): + """ + Gets the document_classification_model_version of this AnalyzeDocumentResult. + Document classification model version. + + + :return: The document_classification_model_version of this AnalyzeDocumentResult. + :rtype: str + """ + return self._document_classification_model_version + + @document_classification_model_version.setter + def document_classification_model_version(self, document_classification_model_version): + """ + Sets the document_classification_model_version of this AnalyzeDocumentResult. + Document classification model version. + + + :param document_classification_model_version: The document_classification_model_version of this AnalyzeDocumentResult. + :type: str + """ + self._document_classification_model_version = document_classification_model_version + + @property + def language_classification_model_version(self): + """ + Gets the language_classification_model_version of this AnalyzeDocumentResult. + Document language classification model version. + + + :return: The language_classification_model_version of this AnalyzeDocumentResult. + :rtype: str + """ + return self._language_classification_model_version + + @language_classification_model_version.setter + def language_classification_model_version(self, language_classification_model_version): + """ + Sets the language_classification_model_version of this AnalyzeDocumentResult. + Document language classification model version. + + + :param language_classification_model_version: The language_classification_model_version of this AnalyzeDocumentResult. + :type: str + """ + self._language_classification_model_version = language_classification_model_version + + @property + def text_detection_model_version(self): + """ + Gets the text_detection_model_version of this AnalyzeDocumentResult. + Document text detection model version. + + + :return: The text_detection_model_version of this AnalyzeDocumentResult. + :rtype: str + """ + return self._text_detection_model_version + + @text_detection_model_version.setter + def text_detection_model_version(self, text_detection_model_version): + """ + Sets the text_detection_model_version of this AnalyzeDocumentResult. + Document text detection model version. + + + :param text_detection_model_version: The text_detection_model_version of this AnalyzeDocumentResult. + :type: str + """ + self._text_detection_model_version = text_detection_model_version + + @property + def key_value_detection_model_version(self): + """ + Gets the key_value_detection_model_version of this AnalyzeDocumentResult. + Document keyValue detection model version. + + + :return: The key_value_detection_model_version of this AnalyzeDocumentResult. + :rtype: str + """ + return self._key_value_detection_model_version + + @key_value_detection_model_version.setter + def key_value_detection_model_version(self, key_value_detection_model_version): + """ + Sets the key_value_detection_model_version of this AnalyzeDocumentResult. + Document keyValue detection model version. + + + :param key_value_detection_model_version: The key_value_detection_model_version of this AnalyzeDocumentResult. + :type: str + """ + self._key_value_detection_model_version = key_value_detection_model_version + + @property + def table_detection_model_version(self): + """ + Gets the table_detection_model_version of this AnalyzeDocumentResult. + Document table detection model version. + + + :return: The table_detection_model_version of this AnalyzeDocumentResult. + :rtype: str + """ + return self._table_detection_model_version + + @table_detection_model_version.setter + def table_detection_model_version(self, table_detection_model_version): + """ + Sets the table_detection_model_version of this AnalyzeDocumentResult. + Document table detection model version. + + + :param table_detection_model_version: The table_detection_model_version of this AnalyzeDocumentResult. + :type: str + """ + self._table_detection_model_version = table_detection_model_version + + @property + def errors(self): + """ + Gets the errors of this AnalyzeDocumentResult. + Errors encountered during document analysis. + + + :return: The errors of this AnalyzeDocumentResult. + :rtype: list[oci.ai_vision.models.ProcessingError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """ + Sets the errors of this AnalyzeDocumentResult. + Errors encountered during document analysis. + + + :param errors: The errors of this AnalyzeDocumentResult. + :type: list[oci.ai_vision.models.ProcessingError] + """ + self._errors = errors + + @property + def searchable_pdf(self): + """ + Gets the searchable_pdf of this AnalyzeDocumentResult. + Generated searchable PDF file. + + + :return: The searchable_pdf of this AnalyzeDocumentResult. + :rtype: str + """ + return self._searchable_pdf + + @searchable_pdf.setter + def searchable_pdf(self, searchable_pdf): + """ + Sets the searchable_pdf of this AnalyzeDocumentResult. + Generated searchable PDF file. + + + :param searchable_pdf: The searchable_pdf of this AnalyzeDocumentResult. + :type: str + """ + self._searchable_pdf = searchable_pdf + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/analyze_image_details.py b/src/oci/ai_vision/models/analyze_image_details.py new file mode 100644 index 0000000000..4f678fa0fd --- /dev/null +++ b/src/oci/ai_vision/models/analyze_image_details.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnalyzeImageDetails(object): + """ + Details about how to analyze an image. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AnalyzeImageDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param features: + The value to assign to the features property of this AnalyzeImageDetails. + :type features: list[oci.ai_vision.models.ImageFeature] + + :param image: + The value to assign to the image property of this AnalyzeImageDetails. + :type image: oci.ai_vision.models.ImageDetails + + :param compartment_id: + The value to assign to the compartment_id property of this AnalyzeImageDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'features': 'list[ImageFeature]', + 'image': 'ImageDetails', + 'compartment_id': 'str' + } + + self.attribute_map = { + 'features': 'features', + 'image': 'image', + 'compartment_id': 'compartmentId' + } + + self._features = None + self._image = None + self._compartment_id = None + + @property + def features(self): + """ + **[Required]** Gets the features of this AnalyzeImageDetails. + Types of image analysis. + + + :return: The features of this AnalyzeImageDetails. + :rtype: list[oci.ai_vision.models.ImageFeature] + """ + return self._features + + @features.setter + def features(self, features): + """ + Sets the features of this AnalyzeImageDetails. + Types of image analysis. + + + :param features: The features of this AnalyzeImageDetails. + :type: list[oci.ai_vision.models.ImageFeature] + """ + self._features = features + + @property + def image(self): + """ + **[Required]** Gets the image of this AnalyzeImageDetails. + + :return: The image of this AnalyzeImageDetails. + :rtype: oci.ai_vision.models.ImageDetails + """ + return self._image + + @image.setter + def image(self, image): + """ + Sets the image of this AnalyzeImageDetails. + + :param image: The image of this AnalyzeImageDetails. + :type: oci.ai_vision.models.ImageDetails + """ + self._image = image + + @property + def compartment_id(self): + """ + Gets the compartment_id of this AnalyzeImageDetails. + The ocid of the compartment that calls the API. + + + :return: The compartment_id of this AnalyzeImageDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AnalyzeImageDetails. + The ocid of the compartment that calls the API. + + + :param compartment_id: The compartment_id of this AnalyzeImageDetails. + :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_vision/models/analyze_image_result.py b/src/oci/ai_vision/models/analyze_image_result.py new file mode 100644 index 0000000000..079c07fd29 --- /dev/null +++ b/src/oci/ai_vision/models/analyze_image_result.py @@ -0,0 +1,283 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnalyzeImageResult(object): + """ + Image analysis results. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AnalyzeImageResult object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param image_objects: + The value to assign to the image_objects property of this AnalyzeImageResult. + :type image_objects: list[oci.ai_vision.models.ImageObject] + + :param labels: + The value to assign to the labels property of this AnalyzeImageResult. + :type labels: list[oci.ai_vision.models.Label] + + :param ontology_classes: + The value to assign to the ontology_classes property of this AnalyzeImageResult. + :type ontology_classes: list[oci.ai_vision.models.OntologyClass] + + :param image_text: + The value to assign to the image_text property of this AnalyzeImageResult. + :type image_text: oci.ai_vision.models.ImageText + + :param image_classification_model_version: + The value to assign to the image_classification_model_version property of this AnalyzeImageResult. + :type image_classification_model_version: str + + :param object_detection_model_version: + The value to assign to the object_detection_model_version property of this AnalyzeImageResult. + :type object_detection_model_version: str + + :param text_detection_model_version: + The value to assign to the text_detection_model_version property of this AnalyzeImageResult. + :type text_detection_model_version: str + + :param errors: + The value to assign to the errors property of this AnalyzeImageResult. + :type errors: list[oci.ai_vision.models.ProcessingError] + + """ + self.swagger_types = { + 'image_objects': 'list[ImageObject]', + 'labels': 'list[Label]', + 'ontology_classes': 'list[OntologyClass]', + 'image_text': 'ImageText', + 'image_classification_model_version': 'str', + 'object_detection_model_version': 'str', + 'text_detection_model_version': 'str', + 'errors': 'list[ProcessingError]' + } + + self.attribute_map = { + 'image_objects': 'imageObjects', + 'labels': 'labels', + 'ontology_classes': 'ontologyClasses', + 'image_text': 'imageText', + 'image_classification_model_version': 'imageClassificationModelVersion', + 'object_detection_model_version': 'objectDetectionModelVersion', + 'text_detection_model_version': 'textDetectionModelVersion', + 'errors': 'errors' + } + + self._image_objects = None + self._labels = None + self._ontology_classes = None + self._image_text = None + self._image_classification_model_version = None + self._object_detection_model_version = None + self._text_detection_model_version = None + self._errors = None + + @property + def image_objects(self): + """ + Gets the image_objects of this AnalyzeImageResult. + Detected objects. + + + :return: The image_objects of this AnalyzeImageResult. + :rtype: list[oci.ai_vision.models.ImageObject] + """ + return self._image_objects + + @image_objects.setter + def image_objects(self, image_objects): + """ + Sets the image_objects of this AnalyzeImageResult. + Detected objects. + + + :param image_objects: The image_objects of this AnalyzeImageResult. + :type: list[oci.ai_vision.models.ImageObject] + """ + self._image_objects = image_objects + + @property + def labels(self): + """ + Gets the labels of this AnalyzeImageResult. + Image classification labels. + + + :return: The labels of this AnalyzeImageResult. + :rtype: list[oci.ai_vision.models.Label] + """ + return self._labels + + @labels.setter + def labels(self, labels): + """ + Sets the labels of this AnalyzeImageResult. + Image classification labels. + + + :param labels: The labels of this AnalyzeImageResult. + :type: list[oci.ai_vision.models.Label] + """ + self._labels = labels + + @property + def ontology_classes(self): + """ + Gets the ontology_classes of this AnalyzeImageResult. + ontologyClasses of image labels. + + + :return: The ontology_classes of this AnalyzeImageResult. + :rtype: list[oci.ai_vision.models.OntologyClass] + """ + return self._ontology_classes + + @ontology_classes.setter + def ontology_classes(self, ontology_classes): + """ + Sets the ontology_classes of this AnalyzeImageResult. + ontologyClasses of image labels. + + + :param ontology_classes: The ontology_classes of this AnalyzeImageResult. + :type: list[oci.ai_vision.models.OntologyClass] + """ + self._ontology_classes = ontology_classes + + @property + def image_text(self): + """ + Gets the image_text of this AnalyzeImageResult. + + :return: The image_text of this AnalyzeImageResult. + :rtype: oci.ai_vision.models.ImageText + """ + return self._image_text + + @image_text.setter + def image_text(self, image_text): + """ + Sets the image_text of this AnalyzeImageResult. + + :param image_text: The image_text of this AnalyzeImageResult. + :type: oci.ai_vision.models.ImageText + """ + self._image_text = image_text + + @property + def image_classification_model_version(self): + """ + Gets the image_classification_model_version of this AnalyzeImageResult. + Image classification model version. + + + :return: The image_classification_model_version of this AnalyzeImageResult. + :rtype: str + """ + return self._image_classification_model_version + + @image_classification_model_version.setter + def image_classification_model_version(self, image_classification_model_version): + """ + Sets the image_classification_model_version of this AnalyzeImageResult. + Image classification model version. + + + :param image_classification_model_version: The image_classification_model_version of this AnalyzeImageResult. + :type: str + """ + self._image_classification_model_version = image_classification_model_version + + @property + def object_detection_model_version(self): + """ + Gets the object_detection_model_version of this AnalyzeImageResult. + Object detection model version. + + + :return: The object_detection_model_version of this AnalyzeImageResult. + :rtype: str + """ + return self._object_detection_model_version + + @object_detection_model_version.setter + def object_detection_model_version(self, object_detection_model_version): + """ + Sets the object_detection_model_version of this AnalyzeImageResult. + Object detection model version. + + + :param object_detection_model_version: The object_detection_model_version of this AnalyzeImageResult. + :type: str + """ + self._object_detection_model_version = object_detection_model_version + + @property + def text_detection_model_version(self): + """ + Gets the text_detection_model_version of this AnalyzeImageResult. + Text detection model version. + + + :return: The text_detection_model_version of this AnalyzeImageResult. + :rtype: str + """ + return self._text_detection_model_version + + @text_detection_model_version.setter + def text_detection_model_version(self, text_detection_model_version): + """ + Sets the text_detection_model_version of this AnalyzeImageResult. + Text detection model version. + + + :param text_detection_model_version: The text_detection_model_version of this AnalyzeImageResult. + :type: str + """ + self._text_detection_model_version = text_detection_model_version + + @property + def errors(self): + """ + Gets the errors of this AnalyzeImageResult. + Errors encountered during image analysis. + + + :return: The errors of this AnalyzeImageResult. + :rtype: list[oci.ai_vision.models.ProcessingError] + """ + return self._errors + + @errors.setter + def errors(self, errors): + """ + Sets the errors of this AnalyzeImageResult. + Errors encountered during image analysis. + + + :param errors: The errors of this AnalyzeImageResult. + :type: list[oci.ai_vision.models.ProcessingError] + """ + self._errors = errors + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/bounding_polygon.py b/src/oci/ai_vision/models/bounding_polygon.py new file mode 100644 index 0000000000..0a5885ea43 --- /dev/null +++ b/src/oci/ai_vision/models/bounding_polygon.py @@ -0,0 +1,72 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class BoundingPolygon(object): + """ + Object bounding polygon box. + """ + + def __init__(self, **kwargs): + """ + Initializes a new BoundingPolygon object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param normalized_vertices: + The value to assign to the normalized_vertices property of this BoundingPolygon. + :type normalized_vertices: list[oci.ai_vision.models.NormalizedVertex] + + """ + self.swagger_types = { + 'normalized_vertices': 'list[NormalizedVertex]' + } + + self.attribute_map = { + 'normalized_vertices': 'normalizedVertices' + } + + self._normalized_vertices = None + + @property + def normalized_vertices(self): + """ + **[Required]** Gets the normalized_vertices of this BoundingPolygon. + An array of normalized points defining the polygon's perimeter, with an implicit segment between subsequent points and between the first and last point. + Rectangles are defined with four points, e.g. `[{\"x\": 0, \"y\": 0}, {\"x\": 1, \"y\": 0}, {\"x\": 1, \"y\": 0.5}, {\"x\": 0, \"y\": 0.5}]` represents the top half of an image. + + + :return: The normalized_vertices of this BoundingPolygon. + :rtype: list[oci.ai_vision.models.NormalizedVertex] + """ + return self._normalized_vertices + + @normalized_vertices.setter + def normalized_vertices(self, normalized_vertices): + """ + Sets the normalized_vertices of this BoundingPolygon. + An array of normalized points defining the polygon's perimeter, with an implicit segment between subsequent points and between the first and last point. + Rectangles are defined with four points, e.g. `[{\"x\": 0, \"y\": 0}, {\"x\": 1, \"y\": 0}, {\"x\": 1, \"y\": 0.5}, {\"x\": 0, \"y\": 0.5}]` represents the top half of an image. + + + :param normalized_vertices: The normalized_vertices of this BoundingPolygon. + :type: list[oci.ai_vision.models.NormalizedVertex] + """ + self._normalized_vertices = normalized_vertices + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/cell.py b/src/oci/ai_vision/models/cell.py new file mode 100644 index 0000000000..6a3d2d7782 --- /dev/null +++ b/src/oci/ai_vision/models/cell.py @@ -0,0 +1,221 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Cell(object): + """ + A single cell in a table. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Cell object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param text: + The value to assign to the text property of this Cell. + :type text: str + + :param row_index: + The value to assign to the row_index property of this Cell. + :type row_index: int + + :param column_index: + The value to assign to the column_index property of this Cell. + :type column_index: int + + :param confidence: + The value to assign to the confidence property of this Cell. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this Cell. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this Cell. + :type word_indexes: list[int] + + """ + self.swagger_types = { + 'text': 'str', + 'row_index': 'int', + 'column_index': 'int', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]' + } + + self.attribute_map = { + 'text': 'text', + 'row_index': 'rowIndex', + 'column_index': 'columnIndex', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes' + } + + self._text = None + self._row_index = None + self._column_index = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + + @property + def text(self): + """ + **[Required]** Gets the text of this Cell. + Text recognized in the cell. + + + :return: The text of this Cell. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """ + Sets the text of this Cell. + Text recognized in the cell. + + + :param text: The text of this Cell. + :type: str + """ + self._text = text + + @property + def row_index(self): + """ + **[Required]** Gets the row_index of this Cell. + Index of the cell inside the row. + + + :return: The row_index of this Cell. + :rtype: int + """ + return self._row_index + + @row_index.setter + def row_index(self, row_index): + """ + Sets the row_index of this Cell. + Index of the cell inside the row. + + + :param row_index: The row_index of this Cell. + :type: int + """ + self._row_index = row_index + + @property + def column_index(self): + """ + **[Required]** Gets the column_index of this Cell. + Index of the cell inside the column. + + + :return: The column_index of this Cell. + :rtype: int + """ + return self._column_index + + @column_index.setter + def column_index(self, column_index): + """ + Sets the column_index of this Cell. + Index of the cell inside the column. + + + :param column_index: The column_index of this Cell. + :type: int + """ + self._column_index = column_index + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this Cell. + Confidence score between 0 to 1. + + + :return: The confidence of this Cell. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this Cell. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this Cell. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + **[Required]** Gets the bounding_polygon of this Cell. + + :return: The bounding_polygon of this Cell. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this Cell. + + :param bounding_polygon: The bounding_polygon of this Cell. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + @property + def word_indexes(self): + """ + **[Required]** Gets the word_indexes of this Cell. + Words detected in the cell. + + + :return: The word_indexes of this Cell. + :rtype: list[int] + """ + return self._word_indexes + + @word_indexes.setter + def word_indexes(self, word_indexes): + """ + Sets the word_indexes of this Cell. + Words detected in the cell. + + + :param word_indexes: The word_indexes of this Cell. + :type: list[int] + """ + self._word_indexes = word_indexes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/change_model_compartment_details.py b/src/oci/ai_vision/models/change_model_compartment_details.py new file mode 100644 index 0000000000..56125e2841 --- /dev/null +++ b/src/oci/ai_vision/models/change_model_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeModelCompartmentDetails(object): + """ + Which compartment the model should be moved to. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeModelCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeModelCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeModelCompartmentDetails. + The `OCID`__ of the compartment + into which the model should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeModelCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeModelCompartmentDetails. + The `OCID`__ of the compartment + into which the model should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeModelCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/change_project_compartment_details.py b/src/oci/ai_vision/models/change_project_compartment_details.py new file mode 100644 index 0000000000..2be50aea47 --- /dev/null +++ b/src/oci/ai_vision/models/change_project_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeProjectCompartmentDetails(object): + """ + Which compartment the project should be moved to. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeProjectCompartmentDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param compartment_id: + The value to assign to the compartment_id property of this ChangeProjectCompartmentDetails. + :type compartment_id: str + + """ + self.swagger_types = { + 'compartment_id': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId' + } + + self._compartment_id = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ChangeProjectCompartmentDetails. + The `OCID`__ of the compartment + into which the project should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeProjectCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeProjectCompartmentDetails. + The `OCID`__ of the compartment + into which the project should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeProjectCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/create_document_job_details.py b/src/oci/ai_vision/models/create_document_job_details.py new file mode 100644 index 0000000000..d067817fcb --- /dev/null +++ b/src/oci/ai_vision/models/create_document_job_details.py @@ -0,0 +1,437 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateDocumentJobDetails(object): + """ + Details about the batch document analysis. + """ + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "ENG" + LANGUAGE_ENG = "ENG" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "CES" + LANGUAGE_CES = "CES" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "DAN" + LANGUAGE_DAN = "DAN" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "NLD" + LANGUAGE_NLD = "NLD" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "FIN" + LANGUAGE_FIN = "FIN" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "FRA" + LANGUAGE_FRA = "FRA" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "DEU" + LANGUAGE_DEU = "DEU" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "ELL" + LANGUAGE_ELL = "ELL" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "HUN" + LANGUAGE_HUN = "HUN" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "ITA" + LANGUAGE_ITA = "ITA" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "NOR" + LANGUAGE_NOR = "NOR" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "POL" + LANGUAGE_POL = "POL" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "POR" + LANGUAGE_POR = "POR" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "RON" + LANGUAGE_RON = "RON" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "RUS" + LANGUAGE_RUS = "RUS" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "SLK" + LANGUAGE_SLK = "SLK" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "SPA" + LANGUAGE_SPA = "SPA" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "SWE" + LANGUAGE_SWE = "SWE" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "TUR" + LANGUAGE_TUR = "TUR" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "ARA" + LANGUAGE_ARA = "ARA" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "CHI_SIM" + LANGUAGE_CHI_SIM = "CHI_SIM" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "HIN" + LANGUAGE_HIN = "HIN" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "JPN" + LANGUAGE_JPN = "JPN" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "KOR" + LANGUAGE_KOR = "KOR" + + #: A constant which can be used with the language property of a CreateDocumentJobDetails. + #: This constant has a value of "OTHERS" + LANGUAGE_OTHERS = "OTHERS" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "INVOICE" + DOCUMENT_TYPE_INVOICE = "INVOICE" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "RECEIPT" + DOCUMENT_TYPE_RECEIPT = "RECEIPT" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "RESUME" + DOCUMENT_TYPE_RESUME = "RESUME" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "TAX_FORM" + DOCUMENT_TYPE_TAX_FORM = "TAX_FORM" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "DRIVER_LICENSE" + DOCUMENT_TYPE_DRIVER_LICENSE = "DRIVER_LICENSE" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "PASSPORT" + DOCUMENT_TYPE_PASSPORT = "PASSPORT" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "BANK_STATEMENT" + DOCUMENT_TYPE_BANK_STATEMENT = "BANK_STATEMENT" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "CHECK" + DOCUMENT_TYPE_CHECK = "CHECK" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "PAYSLIP" + DOCUMENT_TYPE_PAYSLIP = "PAYSLIP" + + #: A constant which can be used with the document_type property of a CreateDocumentJobDetails. + #: This constant has a value of "OTHERS" + DOCUMENT_TYPE_OTHERS = "OTHERS" + + def __init__(self, **kwargs): + """ + Initializes a new CreateDocumentJobDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param input_location: + The value to assign to the input_location property of this CreateDocumentJobDetails. + :type input_location: oci.ai_vision.models.InputLocation + + :param features: + The value to assign to the features property of this CreateDocumentJobDetails. + :type features: list[oci.ai_vision.models.DocumentFeature] + + :param output_location: + The value to assign to the output_location property of this CreateDocumentJobDetails. + :type output_location: oci.ai_vision.models.OutputLocation + + :param compartment_id: + The value to assign to the compartment_id property of this CreateDocumentJobDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateDocumentJobDetails. + :type display_name: str + + :param language: + The value to assign to the language property of this CreateDocumentJobDetails. + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS" + :type language: str + + :param document_type: + The value to assign to the document_type property of this CreateDocumentJobDetails. + Allowed values for this property are: "INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS" + :type document_type: str + + :param is_zip_output_enabled: + The value to assign to the is_zip_output_enabled property of this CreateDocumentJobDetails. + :type is_zip_output_enabled: bool + + """ + self.swagger_types = { + 'input_location': 'InputLocation', + 'features': 'list[DocumentFeature]', + 'output_location': 'OutputLocation', + 'compartment_id': 'str', + 'display_name': 'str', + 'language': 'str', + 'document_type': 'str', + 'is_zip_output_enabled': 'bool' + } + + self.attribute_map = { + 'input_location': 'inputLocation', + 'features': 'features', + 'output_location': 'outputLocation', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'language': 'language', + 'document_type': 'documentType', + 'is_zip_output_enabled': 'isZipOutputEnabled' + } + + self._input_location = None + self._features = None + self._output_location = None + self._compartment_id = None + self._display_name = None + self._language = None + self._document_type = None + self._is_zip_output_enabled = None + + @property + def input_location(self): + """ + **[Required]** Gets the input_location of this CreateDocumentJobDetails. + + :return: The input_location of this CreateDocumentJobDetails. + :rtype: oci.ai_vision.models.InputLocation + """ + return self._input_location + + @input_location.setter + def input_location(self, input_location): + """ + Sets the input_location of this CreateDocumentJobDetails. + + :param input_location: The input_location of this CreateDocumentJobDetails. + :type: oci.ai_vision.models.InputLocation + """ + self._input_location = input_location + + @property + def features(self): + """ + **[Required]** Gets the features of this CreateDocumentJobDetails. + List of document analysis types requested. + + + :return: The features of this CreateDocumentJobDetails. + :rtype: list[oci.ai_vision.models.DocumentFeature] + """ + return self._features + + @features.setter + def features(self, features): + """ + Sets the features of this CreateDocumentJobDetails. + List of document analysis types requested. + + + :param features: The features of this CreateDocumentJobDetails. + :type: list[oci.ai_vision.models.DocumentFeature] + """ + self._features = features + + @property + def output_location(self): + """ + **[Required]** Gets the output_location of this CreateDocumentJobDetails. + + :return: The output_location of this CreateDocumentJobDetails. + :rtype: oci.ai_vision.models.OutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this CreateDocumentJobDetails. + + :param output_location: The output_location of this CreateDocumentJobDetails. + :type: oci.ai_vision.models.OutputLocation + """ + self._output_location = output_location + + @property + def compartment_id(self): + """ + Gets the compartment_id of this CreateDocumentJobDetails. + Compartment identifier from the requester. + + + :return: The compartment_id of this CreateDocumentJobDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateDocumentJobDetails. + Compartment identifier from the requester. + + + :param compartment_id: The compartment_id of this CreateDocumentJobDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateDocumentJobDetails. + Document job display name. + + + :return: The display_name of this CreateDocumentJobDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateDocumentJobDetails. + Document job display name. + + + :param display_name: The display_name of this CreateDocumentJobDetails. + :type: str + """ + self._display_name = display_name + + @property + def language(self): + """ + Gets the language of this CreateDocumentJobDetails. + Language of the document, abbreviated according to ISO 639-2. + + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS" + + + :return: The language of this CreateDocumentJobDetails. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """ + Sets the language of this CreateDocumentJobDetails. + Language of the document, abbreviated according to ISO 639-2. + + + :param language: The language of this CreateDocumentJobDetails. + :type: str + """ + allowed_values = ["ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS"] + if not value_allowed_none_or_none_sentinel(language, allowed_values): + raise ValueError( + "Invalid value for `language`, must be None or one of {0}" + .format(allowed_values) + ) + self._language = language + + @property + def document_type(self): + """ + Gets the document_type of this CreateDocumentJobDetails. + The type of documents. + + Allowed values for this property are: "INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS" + + + :return: The document_type of this CreateDocumentJobDetails. + :rtype: str + """ + return self._document_type + + @document_type.setter + def document_type(self, document_type): + """ + Sets the document_type of this CreateDocumentJobDetails. + The type of documents. + + + :param document_type: The document_type of this CreateDocumentJobDetails. + :type: str + """ + allowed_values = ["INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS"] + if not value_allowed_none_or_none_sentinel(document_type, allowed_values): + raise ValueError( + "Invalid value for `document_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._document_type = document_type + + @property + def is_zip_output_enabled(self): + """ + Gets the is_zip_output_enabled of this CreateDocumentJobDetails. + Whether to generate a Zip file containing the results. + + + :return: The is_zip_output_enabled of this CreateDocumentJobDetails. + :rtype: bool + """ + return self._is_zip_output_enabled + + @is_zip_output_enabled.setter + def is_zip_output_enabled(self, is_zip_output_enabled): + """ + Sets the is_zip_output_enabled of this CreateDocumentJobDetails. + Whether to generate a Zip file containing the results. + + + :param is_zip_output_enabled: The is_zip_output_enabled of this CreateDocumentJobDetails. + :type: bool + """ + self._is_zip_output_enabled = is_zip_output_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/create_image_job_details.py b/src/oci/ai_vision/models/create_image_job_details.py new file mode 100644 index 0000000000..75259be077 --- /dev/null +++ b/src/oci/ai_vision/models/create_image_job_details.py @@ -0,0 +1,217 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateImageJobDetails(object): + """ + Details about the batch image analysis. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateImageJobDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param input_location: + The value to assign to the input_location property of this CreateImageJobDetails. + :type input_location: oci.ai_vision.models.InputLocation + + :param features: + The value to assign to the features property of this CreateImageJobDetails. + :type features: list[oci.ai_vision.models.ImageFeature] + + :param output_location: + The value to assign to the output_location property of this CreateImageJobDetails. + :type output_location: oci.ai_vision.models.OutputLocation + + :param compartment_id: + The value to assign to the compartment_id property of this CreateImageJobDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateImageJobDetails. + :type display_name: str + + :param is_zip_output_enabled: + The value to assign to the is_zip_output_enabled property of this CreateImageJobDetails. + :type is_zip_output_enabled: bool + + """ + self.swagger_types = { + 'input_location': 'InputLocation', + 'features': 'list[ImageFeature]', + 'output_location': 'OutputLocation', + 'compartment_id': 'str', + 'display_name': 'str', + 'is_zip_output_enabled': 'bool' + } + + self.attribute_map = { + 'input_location': 'inputLocation', + 'features': 'features', + 'output_location': 'outputLocation', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'is_zip_output_enabled': 'isZipOutputEnabled' + } + + self._input_location = None + self._features = None + self._output_location = None + self._compartment_id = None + self._display_name = None + self._is_zip_output_enabled = None + + @property + def input_location(self): + """ + **[Required]** Gets the input_location of this CreateImageJobDetails. + + :return: The input_location of this CreateImageJobDetails. + :rtype: oci.ai_vision.models.InputLocation + """ + return self._input_location + + @input_location.setter + def input_location(self, input_location): + """ + Sets the input_location of this CreateImageJobDetails. + + :param input_location: The input_location of this CreateImageJobDetails. + :type: oci.ai_vision.models.InputLocation + """ + self._input_location = input_location + + @property + def features(self): + """ + **[Required]** Gets the features of this CreateImageJobDetails. + List of image analysis types requested. + + + :return: The features of this CreateImageJobDetails. + :rtype: list[oci.ai_vision.models.ImageFeature] + """ + return self._features + + @features.setter + def features(self, features): + """ + Sets the features of this CreateImageJobDetails. + List of image analysis types requested. + + + :param features: The features of this CreateImageJobDetails. + :type: list[oci.ai_vision.models.ImageFeature] + """ + self._features = features + + @property + def output_location(self): + """ + **[Required]** Gets the output_location of this CreateImageJobDetails. + + :return: The output_location of this CreateImageJobDetails. + :rtype: oci.ai_vision.models.OutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this CreateImageJobDetails. + + :param output_location: The output_location of this CreateImageJobDetails. + :type: oci.ai_vision.models.OutputLocation + """ + self._output_location = output_location + + @property + def compartment_id(self): + """ + Gets the compartment_id of this CreateImageJobDetails. + Compartment identifier from the requester. + + + :return: The compartment_id of this CreateImageJobDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateImageJobDetails. + Compartment identifier from the requester. + + + :param compartment_id: The compartment_id of this CreateImageJobDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateImageJobDetails. + Image job display name. + + + :return: The display_name of this CreateImageJobDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateImageJobDetails. + Image job display name. + + + :param display_name: The display_name of this CreateImageJobDetails. + :type: str + """ + self._display_name = display_name + + @property + def is_zip_output_enabled(self): + """ + Gets the is_zip_output_enabled of this CreateImageJobDetails. + Whether to generate a Zip file containing the results. + + + :return: The is_zip_output_enabled of this CreateImageJobDetails. + :rtype: bool + """ + return self._is_zip_output_enabled + + @is_zip_output_enabled.setter + def is_zip_output_enabled(self, is_zip_output_enabled): + """ + Sets the is_zip_output_enabled of this CreateImageJobDetails. + Whether to generate a Zip file containing the results. + + + :param is_zip_output_enabled: The is_zip_output_enabled of this CreateImageJobDetails. + :type: bool + """ + self._is_zip_output_enabled = is_zip_output_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/create_model_details.py b/src/oci/ai_vision/models/create_model_details.py new file mode 100644 index 0000000000..a786dd16d1 --- /dev/null +++ b/src/oci/ai_vision/models/create_model_details.py @@ -0,0 +1,438 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateModelDetails(object): + """ + Information needed to create a new model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this CreateModelDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateModelDetails. + :type description: str + + :param model_version: + The value to assign to the model_version property of this CreateModelDetails. + :type model_version: str + + :param model_type: + The value to assign to the model_type property of this CreateModelDetails. + :type model_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateModelDetails. + :type compartment_id: str + + :param is_quick_mode: + The value to assign to the is_quick_mode property of this CreateModelDetails. + :type is_quick_mode: bool + + :param max_training_duration_in_hours: + The value to assign to the max_training_duration_in_hours property of this CreateModelDetails. + :type max_training_duration_in_hours: float + + :param training_dataset: + The value to assign to the training_dataset property of this CreateModelDetails. + :type training_dataset: oci.ai_vision.models.Dataset + + :param testing_dataset: + The value to assign to the testing_dataset property of this CreateModelDetails. + :type testing_dataset: oci.ai_vision.models.Dataset + + :param validation_dataset: + The value to assign to the validation_dataset property of this CreateModelDetails. + :type validation_dataset: oci.ai_vision.models.Dataset + + :param project_id: + The value to assign to the project_id property of this CreateModelDetails. + :type project_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'model_version': 'str', + 'model_type': 'str', + 'compartment_id': 'str', + 'is_quick_mode': 'bool', + 'max_training_duration_in_hours': 'float', + 'training_dataset': 'Dataset', + 'testing_dataset': 'Dataset', + 'validation_dataset': 'Dataset', + 'project_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'model_version': 'modelVersion', + 'model_type': 'modelType', + 'compartment_id': 'compartmentId', + 'is_quick_mode': 'isQuickMode', + 'max_training_duration_in_hours': 'maxTrainingDurationInHours', + 'training_dataset': 'trainingDataset', + 'testing_dataset': 'testingDataset', + 'validation_dataset': 'validationDataset', + 'project_id': 'projectId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._model_version = None + self._model_type = None + self._compartment_id = None + self._is_quick_mode = None + self._max_training_duration_in_hours = None + self._training_dataset = None + self._testing_dataset = None + self._validation_dataset = None + self._project_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateModelDetails. + Human-friendly name for the model, which can be changed. + + + :return: The display_name of this CreateModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateModelDetails. + Human-friendly name for the model, which can be changed. + + + :param display_name: The display_name of this CreateModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateModelDetails. + Optional description of the model. + + + :return: The description of this CreateModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateModelDetails. + Optional description of the model. + + + :param description: The description of this CreateModelDetails. + :type: str + """ + self._description = description + + @property + def model_version(self): + """ + Gets the model_version of this CreateModelDetails. + Model version + + + :return: The model_version of this CreateModelDetails. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this CreateModelDetails. + Model version + + + :param model_version: The model_version of this CreateModelDetails. + :type: str + """ + self._model_version = model_version + + @property + def model_type(self): + """ + **[Required]** Gets the model_type of this CreateModelDetails. + What type of Vision model this is. + + + :return: The model_type of this CreateModelDetails. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this CreateModelDetails. + What type of Vision model this is. + + + :param model_type: The model_type of this CreateModelDetails. + :type: str + """ + self._model_type = model_type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateModelDetails. + Compartment identifier. + + + :return: The compartment_id of this CreateModelDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateModelDetails. + Compartment identifier. + + + :param compartment_id: The compartment_id of this CreateModelDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def is_quick_mode(self): + """ + Gets the is_quick_mode of this CreateModelDetails. + Set to true when experimenting with a new model type or dataset so model training is quick, with a predefined low number of passes through the training data. + + + :return: The is_quick_mode of this CreateModelDetails. + :rtype: bool + """ + return self._is_quick_mode + + @is_quick_mode.setter + def is_quick_mode(self, is_quick_mode): + """ + Sets the is_quick_mode of this CreateModelDetails. + Set to true when experimenting with a new model type or dataset so model training is quick, with a predefined low number of passes through the training data. + + + :param is_quick_mode: The is_quick_mode of this CreateModelDetails. + :type: bool + """ + self._is_quick_mode = is_quick_mode + + @property + def max_training_duration_in_hours(self): + """ + Gets the max_training_duration_in_hours of this CreateModelDetails. + Maximum model training duration in hours, expressed as a decimal fraction. + + + :return: The max_training_duration_in_hours of this CreateModelDetails. + :rtype: float + """ + return self._max_training_duration_in_hours + + @max_training_duration_in_hours.setter + def max_training_duration_in_hours(self, max_training_duration_in_hours): + """ + Sets the max_training_duration_in_hours of this CreateModelDetails. + Maximum model training duration in hours, expressed as a decimal fraction. + + + :param max_training_duration_in_hours: The max_training_duration_in_hours of this CreateModelDetails. + :type: float + """ + self._max_training_duration_in_hours = max_training_duration_in_hours + + @property + def training_dataset(self): + """ + **[Required]** Gets the training_dataset of this CreateModelDetails. + + :return: The training_dataset of this CreateModelDetails. + :rtype: oci.ai_vision.models.Dataset + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this CreateModelDetails. + + :param training_dataset: The training_dataset of this CreateModelDetails. + :type: oci.ai_vision.models.Dataset + """ + self._training_dataset = training_dataset + + @property + def testing_dataset(self): + """ + Gets the testing_dataset of this CreateModelDetails. + + :return: The testing_dataset of this CreateModelDetails. + :rtype: oci.ai_vision.models.Dataset + """ + return self._testing_dataset + + @testing_dataset.setter + def testing_dataset(self, testing_dataset): + """ + Sets the testing_dataset of this CreateModelDetails. + + :param testing_dataset: The testing_dataset of this CreateModelDetails. + :type: oci.ai_vision.models.Dataset + """ + self._testing_dataset = testing_dataset + + @property + def validation_dataset(self): + """ + Gets the validation_dataset of this CreateModelDetails. + + :return: The validation_dataset of this CreateModelDetails. + :rtype: oci.ai_vision.models.Dataset + """ + return self._validation_dataset + + @validation_dataset.setter + def validation_dataset(self, validation_dataset): + """ + Sets the validation_dataset of this CreateModelDetails. + + :param validation_dataset: The validation_dataset of this CreateModelDetails. + :type: oci.ai_vision.models.Dataset + """ + self._validation_dataset = validation_dataset + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this CreateModelDetails. + The `OCID`__ of the project which contains the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this CreateModelDetails. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this CreateModelDetails. + The `OCID`__ of the project which contains the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this CreateModelDetails. + :type: str + """ + self._project_id = project_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateModelDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CreateModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateModelDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CreateModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CreateModelDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CreateModelDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/create_project_details.py b/src/oci/ai_vision/models/create_project_details.py new file mode 100644 index 0000000000..40d7381a1f --- /dev/null +++ b/src/oci/ai_vision/models/create_project_details.py @@ -0,0 +1,198 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateProjectDetails(object): + """ + Information needed to create a new project. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateProjectDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this CreateProjectDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateProjectDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateProjectDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateProjectDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateProjectDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateProjectDetails. + Human-friendly name for the project, which can be changed. + + + :return: The display_name of this CreateProjectDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateProjectDetails. + Human-friendly name for the project, which can be changed. + + + :param display_name: The display_name of this CreateProjectDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateProjectDetails. + Optional description of the project. + + + :return: The description of this CreateProjectDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateProjectDetails. + Optional description of the project. + + + :param description: The description of this CreateProjectDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateProjectDetails. + Compartment identifier. + + + :return: The compartment_id of this CreateProjectDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateProjectDetails. + Compartment identifier. + + + :param compartment_id: The compartment_id of this CreateProjectDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateProjectDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CreateProjectDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateProjectDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CreateProjectDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CreateProjectDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CreateProjectDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/data_science_labeling_dataset.py b/src/oci/ai_vision/models/data_science_labeling_dataset.py new file mode 100644 index 0000000000..7da2e7bf93 --- /dev/null +++ b/src/oci/ai_vision/models/data_science_labeling_dataset.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .dataset import Dataset +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DataScienceLabelingDataset(Dataset): + """ + Dataset created by the Data Labeling Service. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DataScienceLabelingDataset object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.DataScienceLabelingDataset.dataset_type` attribute + of this class is ``DATA_SCIENCE_LABELING`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dataset_type: + The value to assign to the dataset_type property of this DataScienceLabelingDataset. + Allowed values for this property are: "DATA_SCIENCE_LABELING", "OBJECT_STORAGE" + :type dataset_type: str + + :param dataset_id: + The value to assign to the dataset_id property of this DataScienceLabelingDataset. + :type dataset_id: str + + """ + self.swagger_types = { + 'dataset_type': 'str', + 'dataset_id': 'str' + } + + self.attribute_map = { + 'dataset_type': 'datasetType', + 'dataset_id': 'datasetId' + } + + self._dataset_type = None + self._dataset_id = None + self._dataset_type = 'DATA_SCIENCE_LABELING' + + @property + def dataset_id(self): + """ + Gets the dataset_id of this DataScienceLabelingDataset. + OCID of the Data Labeling dataset. + + + :return: The dataset_id of this DataScienceLabelingDataset. + :rtype: str + """ + return self._dataset_id + + @dataset_id.setter + def dataset_id(self, dataset_id): + """ + Sets the dataset_id of this DataScienceLabelingDataset. + OCID of the Data Labeling dataset. + + + :param dataset_id: The dataset_id of this DataScienceLabelingDataset. + :type: str + """ + self._dataset_id = dataset_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_vision/models/dataset.py b/src/oci/ai_vision/models/dataset.py new file mode 100644 index 0000000000..7fa1948b17 --- /dev/null +++ b/src/oci/ai_vision/models/dataset.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Dataset(object): + """ + The base entity which is the input for creating and training a model. + """ + + #: A constant which can be used with the dataset_type property of a Dataset. + #: This constant has a value of "DATA_SCIENCE_LABELING" + DATASET_TYPE_DATA_SCIENCE_LABELING = "DATA_SCIENCE_LABELING" + + #: A constant which can be used with the dataset_type property of a Dataset. + #: This constant has a value of "OBJECT_STORAGE" + DATASET_TYPE_OBJECT_STORAGE = "OBJECT_STORAGE" + + def __init__(self, **kwargs): + """ + Initializes a new Dataset 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_vision.models.DataScienceLabelingDataset` + * :class:`~oci.ai_vision.models.ObjectStorageDataset` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dataset_type: + The value to assign to the dataset_type property of this Dataset. + Allowed values for this property are: "DATA_SCIENCE_LABELING", "OBJECT_STORAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type dataset_type: str + + """ + self.swagger_types = { + 'dataset_type': 'str' + } + + self.attribute_map = { + 'dataset_type': 'datasetType' + } + + self._dataset_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['datasetType'] + + if type == 'DATA_SCIENCE_LABELING': + return 'DataScienceLabelingDataset' + + if type == 'OBJECT_STORAGE': + return 'ObjectStorageDataset' + else: + return 'Dataset' + + @property + def dataset_type(self): + """ + **[Required]** Gets the dataset_type of this Dataset. + Type of the dataset based on where it is stored. + + Allowed values for this property are: "DATA_SCIENCE_LABELING", "OBJECT_STORAGE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The dataset_type of this Dataset. + :rtype: str + """ + return self._dataset_type + + @dataset_type.setter + def dataset_type(self, dataset_type): + """ + Sets the dataset_type of this Dataset. + Type of the dataset based on where it is stored. + + + :param dataset_type: The dataset_type of this Dataset. + :type: str + """ + allowed_values = ["DATA_SCIENCE_LABELING", "OBJECT_STORAGE"] + if not value_allowed_none_or_none_sentinel(dataset_type, allowed_values): + dataset_type = 'UNKNOWN_ENUM_VALUE' + self._dataset_type = dataset_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_vision/models/detected_document_type.py b/src/oci/ai_vision/models/detected_document_type.py new file mode 100644 index 0000000000..a57486a56b --- /dev/null +++ b/src/oci/ai_vision/models/detected_document_type.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DetectedDocumentType(object): + """ + Detected document type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DetectedDocumentType object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param document_type: + The value to assign to the document_type property of this DetectedDocumentType. + :type document_type: str + + :param confidence: + The value to assign to the confidence property of this DetectedDocumentType. + :type confidence: float + + """ + self.swagger_types = { + 'document_type': 'str', + 'confidence': 'float' + } + + self.attribute_map = { + 'document_type': 'documentType', + 'confidence': 'confidence' + } + + self._document_type = None + self._confidence = None + + @property + def document_type(self): + """ + **[Required]** Gets the document_type of this DetectedDocumentType. + Type of the document. + + + :return: The document_type of this DetectedDocumentType. + :rtype: str + """ + return self._document_type + + @document_type.setter + def document_type(self, document_type): + """ + Sets the document_type of this DetectedDocumentType. + Type of the document. + + + :param document_type: The document_type of this DetectedDocumentType. + :type: str + """ + self._document_type = document_type + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this DetectedDocumentType. + Confidence score between 0 to 1. + + + :return: The confidence of this DetectedDocumentType. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this DetectedDocumentType. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this DetectedDocumentType. + :type: float + """ + self._confidence = confidence + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/detected_language.py b/src/oci/ai_vision/models/detected_language.py new file mode 100644 index 0000000000..501610d9ff --- /dev/null +++ b/src/oci/ai_vision/models/detected_language.py @@ -0,0 +1,209 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DetectedLanguage(object): + """ + Language detected in a document. + """ + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "ENG" + LANGUAGE_CODE_ENG = "ENG" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "CES" + LANGUAGE_CODE_CES = "CES" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "DAN" + LANGUAGE_CODE_DAN = "DAN" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "NLD" + LANGUAGE_CODE_NLD = "NLD" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "FIN" + LANGUAGE_CODE_FIN = "FIN" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "FRA" + LANGUAGE_CODE_FRA = "FRA" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "DEU" + LANGUAGE_CODE_DEU = "DEU" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "ELL" + LANGUAGE_CODE_ELL = "ELL" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "HUN" + LANGUAGE_CODE_HUN = "HUN" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "ITA" + LANGUAGE_CODE_ITA = "ITA" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "NOR" + LANGUAGE_CODE_NOR = "NOR" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "POL" + LANGUAGE_CODE_POL = "POL" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "POR" + LANGUAGE_CODE_POR = "POR" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "RON" + LANGUAGE_CODE_RON = "RON" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "RUS" + LANGUAGE_CODE_RUS = "RUS" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "SLK" + LANGUAGE_CODE_SLK = "SLK" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "SPA" + LANGUAGE_CODE_SPA = "SPA" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "SWE" + LANGUAGE_CODE_SWE = "SWE" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "TUR" + LANGUAGE_CODE_TUR = "TUR" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "ARA" + LANGUAGE_CODE_ARA = "ARA" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "CHI_SIM" + LANGUAGE_CODE_CHI_SIM = "CHI_SIM" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "HIN" + LANGUAGE_CODE_HIN = "HIN" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "JPN" + LANGUAGE_CODE_JPN = "JPN" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "KOR" + LANGUAGE_CODE_KOR = "KOR" + + #: A constant which can be used with the language_code property of a DetectedLanguage. + #: This constant has a value of "OTHERS" + LANGUAGE_CODE_OTHERS = "OTHERS" + + def __init__(self, **kwargs): + """ + Initializes a new DetectedLanguage object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param language_code: + The value to assign to the language_code property of this DetectedLanguage. + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type language_code: str + + :param confidence: + The value to assign to the confidence property of this DetectedLanguage. + :type confidence: float + + """ + self.swagger_types = { + 'language_code': 'str', + 'confidence': 'float' + } + + self.attribute_map = { + 'language_code': 'languageCode', + 'confidence': 'confidence' + } + + self._language_code = None + self._confidence = None + + @property + def language_code(self): + """ + **[Required]** Gets the language_code of this DetectedLanguage. + Language of the document, abbreviated according to ISO 639-2. + + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The language_code of this DetectedLanguage. + :rtype: str + """ + return self._language_code + + @language_code.setter + def language_code(self, language_code): + """ + Sets the language_code of this DetectedLanguage. + Language of the document, abbreviated according to ISO 639-2. + + + :param language_code: The language_code of this DetectedLanguage. + :type: str + """ + allowed_values = ["ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS"] + if not value_allowed_none_or_none_sentinel(language_code, allowed_values): + language_code = 'UNKNOWN_ENUM_VALUE' + self._language_code = language_code + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this DetectedLanguage. + Confidence score between 0 to 1. + + + :return: The confidence of this DetectedLanguage. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this DetectedLanguage. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this DetectedLanguage. + :type: float + """ + self._confidence = confidence + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/dimensions.py b/src/oci/ai_vision/models/dimensions.py new file mode 100644 index 0000000000..1e6d617e40 --- /dev/null +++ b/src/oci/ai_vision/models/dimensions.py @@ -0,0 +1,148 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Dimensions(object): + """ + Width and height of a page. + """ + + #: A constant which can be used with the unit property of a Dimensions. + #: This constant has a value of "PIXEL" + UNIT_PIXEL = "PIXEL" + + #: A constant which can be used with the unit property of a Dimensions. + #: This constant has a value of "INCH" + UNIT_INCH = "INCH" + + def __init__(self, **kwargs): + """ + Initializes a new Dimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param width: + The value to assign to the width property of this Dimensions. + :type width: float + + :param height: + The value to assign to the height property of this Dimensions. + :type height: float + + :param unit: + The value to assign to the unit property of this Dimensions. + Allowed values for this property are: "PIXEL", "INCH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type unit: str + + """ + self.swagger_types = { + 'width': 'float', + 'height': 'float', + 'unit': 'str' + } + + self.attribute_map = { + 'width': 'width', + 'height': 'height', + 'unit': 'unit' + } + + self._width = None + self._height = None + self._unit = None + + @property + def width(self): + """ + **[Required]** Gets the width of this Dimensions. + Width of a page. + + + :return: The width of this Dimensions. + :rtype: float + """ + return self._width + + @width.setter + def width(self, width): + """ + Sets the width of this Dimensions. + Width of a page. + + + :param width: The width of this Dimensions. + :type: float + """ + self._width = width + + @property + def height(self): + """ + **[Required]** Gets the height of this Dimensions. + Height of a page. + + + :return: The height of this Dimensions. + :rtype: float + """ + return self._height + + @height.setter + def height(self, height): + """ + Sets the height of this Dimensions. + Height of a page. + + + :param height: The height of this Dimensions. + :type: float + """ + self._height = height + + @property + def unit(self): + """ + **[Required]** Gets the unit of this Dimensions. + Unit of length. + + Allowed values for this property are: "PIXEL", "INCH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The unit of this Dimensions. + :rtype: str + """ + return self._unit + + @unit.setter + def unit(self, unit): + """ + Sets the unit of this Dimensions. + Unit of length. + + + :param unit: The unit of this Dimensions. + :type: str + """ + allowed_values = ["PIXEL", "INCH"] + if not value_allowed_none_or_none_sentinel(unit, allowed_values): + unit = 'UNKNOWN_ENUM_VALUE' + self._unit = 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/ai_vision/models/document_classification_feature.py b/src/oci/ai_vision/models/document_classification_feature.py new file mode 100644 index 0000000000..2e8a936a25 --- /dev/null +++ b/src/oci/ai_vision/models/document_classification_feature.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_feature import DocumentFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentClassificationFeature(DocumentFeature): + """ + Identifying the type of the document. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentClassificationFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.DocumentClassificationFeature.feature_type` attribute + of this class is ``DOCUMENT_CLASSIFICATION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this DocumentClassificationFeature. + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION" + :type feature_type: str + + :param max_results: + The value to assign to the max_results property of this DocumentClassificationFeature. + :type max_results: int + + :param model_id: + The value to assign to the model_id property of this DocumentClassificationFeature. + :type model_id: str + + """ + self.swagger_types = { + 'feature_type': 'str', + 'max_results': 'int', + 'model_id': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType', + 'max_results': 'maxResults', + 'model_id': 'modelId' + } + + self._feature_type = None + self._max_results = None + self._model_id = None + self._feature_type = 'DOCUMENT_CLASSIFICATION' + + @property + def max_results(self): + """ + Gets the max_results of this DocumentClassificationFeature. + The maximum number of results to return. + + + :return: The max_results of this DocumentClassificationFeature. + :rtype: int + """ + return self._max_results + + @max_results.setter + def max_results(self, max_results): + """ + Sets the max_results of this DocumentClassificationFeature. + The maximum number of results to return. + + + :param max_results: The max_results of this DocumentClassificationFeature. + :type: int + """ + self._max_results = max_results + + @property + def model_id(self): + """ + Gets the model_id of this DocumentClassificationFeature. + Custom model id. + + + :return: The model_id of this DocumentClassificationFeature. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this DocumentClassificationFeature. + Custom model id. + + + :param model_id: The model_id of this DocumentClassificationFeature. + :type: str + """ + self._model_id = model_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_vision/models/document_details.py b/src/oci/ai_vision/models/document_details.py new file mode 100644 index 0000000000..ad4388ee0a --- /dev/null +++ b/src/oci/ai_vision/models/document_details.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentDetails(object): + """ + Details about a document to analyze. + """ + + #: A constant which can be used with the source property of a DocumentDetails. + #: This constant has a value of "INLINE" + SOURCE_INLINE = "INLINE" + + #: A constant which can be used with the source property of a DocumentDetails. + #: This constant has a value of "OBJECT_STORAGE" + SOURCE_OBJECT_STORAGE = "OBJECT_STORAGE" + + def __init__(self, **kwargs): + """ + Initializes a new DocumentDetails 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_vision.models.ObjectStorageDocumentDetails` + * :class:`~oci.ai_vision.models.InlineDocumentDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source: + The value to assign to the source property of this DocumentDetails. + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + :type source: str + + """ + self.swagger_types = { + 'source': 'str' + } + + self.attribute_map = { + 'source': 'source' + } + + self._source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['source'] + + if type == 'OBJECT_STORAGE': + return 'ObjectStorageDocumentDetails' + + if type == 'INLINE': + return 'InlineDocumentDetails' + else: + return 'DocumentDetails' + + @property + def source(self): + """ + **[Required]** Gets the source of this DocumentDetails. + The location of document data. + Allowed values are: + - `INLINE`: Data is included directly in the request payload. + - `OBJECT_STORAGE`: The document is in OCI Object Storage. + + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + + + :return: The source of this DocumentDetails. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this DocumentDetails. + The location of document data. + Allowed values are: + - `INLINE`: Data is included directly in the request payload. + - `OBJECT_STORAGE`: The document is in OCI Object Storage. + + + :param source: The source of this DocumentDetails. + :type: str + """ + allowed_values = ["INLINE", "OBJECT_STORAGE"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + raise ValueError( + "Invalid value for `source`, must be None or one of {0}" + .format(allowed_values) + ) + self._source = source + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/document_feature.py b/src/oci/ai_vision/models/document_feature.py new file mode 100644 index 0000000000..cf2b1f4f94 --- /dev/null +++ b/src/oci/ai_vision/models/document_feature.py @@ -0,0 +1,143 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentFeature(object): + """ + Type of document analysis. + """ + + #: A constant which can be used with the feature_type property of a DocumentFeature. + #: This constant has a value of "LANGUAGE_CLASSIFICATION" + FEATURE_TYPE_LANGUAGE_CLASSIFICATION = "LANGUAGE_CLASSIFICATION" + + #: A constant which can be used with the feature_type property of a DocumentFeature. + #: This constant has a value of "TEXT_DETECTION" + FEATURE_TYPE_TEXT_DETECTION = "TEXT_DETECTION" + + #: A constant which can be used with the feature_type property of a DocumentFeature. + #: This constant has a value of "TABLE_DETECTION" + FEATURE_TYPE_TABLE_DETECTION = "TABLE_DETECTION" + + #: A constant which can be used with the feature_type property of a DocumentFeature. + #: This constant has a value of "KEY_VALUE_DETECTION" + FEATURE_TYPE_KEY_VALUE_DETECTION = "KEY_VALUE_DETECTION" + + #: A constant which can be used with the feature_type property of a DocumentFeature. + #: This constant has a value of "DOCUMENT_CLASSIFICATION" + FEATURE_TYPE_DOCUMENT_CLASSIFICATION = "DOCUMENT_CLASSIFICATION" + + def __init__(self, **kwargs): + """ + Initializes a new DocumentFeature 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_vision.models.DocumentTableDetectionFeature` + * :class:`~oci.ai_vision.models.DocumentKeyValueDetectionFeature` + * :class:`~oci.ai_vision.models.DocumentClassificationFeature` + * :class:`~oci.ai_vision.models.DocumentTextDetectionFeature` + * :class:`~oci.ai_vision.models.DocumentLanguageClassificationFeature` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this DocumentFeature. + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type feature_type: str + + """ + self.swagger_types = { + 'feature_type': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType' + } + + self._feature_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['featureType'] + + if type == 'TABLE_DETECTION': + return 'DocumentTableDetectionFeature' + + if type == 'KEY_VALUE_DETECTION': + return 'DocumentKeyValueDetectionFeature' + + if type == 'DOCUMENT_CLASSIFICATION': + return 'DocumentClassificationFeature' + + if type == 'TEXT_DETECTION': + return 'DocumentTextDetectionFeature' + + if type == 'LANGUAGE_CLASSIFICATION': + return 'DocumentLanguageClassificationFeature' + else: + return 'DocumentFeature' + + @property + def feature_type(self): + """ + **[Required]** Gets the feature_type of this DocumentFeature. + Type of document analysis requested + Allowed values are: + - `LANGUAGE_CLASSIFICATION`: Detect the language. + - `TEXT_DETECTION`: Recognize text. + - `TABLE_DETECTION`: Detect and extract data in tables. + - `KEY_VALUE_DETECTION`: Extract form fields. + - `DOCUMENT_CLASSIFICATION`: Identify the type of document. + + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The feature_type of this DocumentFeature. + :rtype: str + """ + return self._feature_type + + @feature_type.setter + def feature_type(self, feature_type): + """ + Sets the feature_type of this DocumentFeature. + Type of document analysis requested + Allowed values are: + - `LANGUAGE_CLASSIFICATION`: Detect the language. + - `TEXT_DETECTION`: Recognize text. + - `TABLE_DETECTION`: Detect and extract data in tables. + - `KEY_VALUE_DETECTION`: Extract form fields. + - `DOCUMENT_CLASSIFICATION`: Identify the type of document. + + + :param feature_type: The feature_type of this DocumentFeature. + :type: str + """ + allowed_values = ["LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION"] + if not value_allowed_none_or_none_sentinel(feature_type, allowed_values): + feature_type = 'UNKNOWN_ENUM_VALUE' + self._feature_type = feature_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_vision/models/document_field.py b/src/oci/ai_vision/models/document_field.py new file mode 100644 index 0000000000..4228ee40f5 --- /dev/null +++ b/src/oci/ai_vision/models/document_field.py @@ -0,0 +1,175 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentField(object): + """ + Form field. + """ + + #: A constant which can be used with the field_type property of a DocumentField. + #: This constant has a value of "LINE_ITEM_GROUP" + FIELD_TYPE_LINE_ITEM_GROUP = "LINE_ITEM_GROUP" + + #: A constant which can be used with the field_type property of a DocumentField. + #: This constant has a value of "LINE_ITEM" + FIELD_TYPE_LINE_ITEM = "LINE_ITEM" + + #: A constant which can be used with the field_type property of a DocumentField. + #: This constant has a value of "LINE_ITEM_FIELD" + FIELD_TYPE_LINE_ITEM_FIELD = "LINE_ITEM_FIELD" + + #: A constant which can be used with the field_type property of a DocumentField. + #: This constant has a value of "KEY_VALUE" + FIELD_TYPE_KEY_VALUE = "KEY_VALUE" + + def __init__(self, **kwargs): + """ + Initializes a new DocumentField object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param field_type: + The value to assign to the field_type property of this DocumentField. + Allowed values for this property are: "LINE_ITEM_GROUP", "LINE_ITEM", "LINE_ITEM_FIELD", "KEY_VALUE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type field_type: str + + :param field_label: + The value to assign to the field_label property of this DocumentField. + :type field_label: oci.ai_vision.models.FieldLabel + + :param field_name: + The value to assign to the field_name property of this DocumentField. + :type field_name: oci.ai_vision.models.FieldName + + :param field_value: + The value to assign to the field_value property of this DocumentField. + :type field_value: oci.ai_vision.models.FieldValue + + """ + self.swagger_types = { + 'field_type': 'str', + 'field_label': 'FieldLabel', + 'field_name': 'FieldName', + 'field_value': 'FieldValue' + } + + self.attribute_map = { + 'field_type': 'fieldType', + 'field_label': 'fieldLabel', + 'field_name': 'fieldName', + 'field_value': 'fieldValue' + } + + self._field_type = None + self._field_label = None + self._field_name = None + self._field_value = None + + @property + def field_type(self): + """ + **[Required]** Gets the field_type of this DocumentField. + Field type. + + Allowed values for this property are: "LINE_ITEM_GROUP", "LINE_ITEM", "LINE_ITEM_FIELD", "KEY_VALUE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The field_type of this DocumentField. + :rtype: str + """ + return self._field_type + + @field_type.setter + def field_type(self, field_type): + """ + Sets the field_type of this DocumentField. + Field type. + + + :param field_type: The field_type of this DocumentField. + :type: str + """ + allowed_values = ["LINE_ITEM_GROUP", "LINE_ITEM", "LINE_ITEM_FIELD", "KEY_VALUE"] + if not value_allowed_none_or_none_sentinel(field_type, allowed_values): + field_type = 'UNKNOWN_ENUM_VALUE' + self._field_type = field_type + + @property + def field_label(self): + """ + Gets the field_label of this DocumentField. + + :return: The field_label of this DocumentField. + :rtype: oci.ai_vision.models.FieldLabel + """ + return self._field_label + + @field_label.setter + def field_label(self, field_label): + """ + Sets the field_label of this DocumentField. + + :param field_label: The field_label of this DocumentField. + :type: oci.ai_vision.models.FieldLabel + """ + self._field_label = field_label + + @property + def field_name(self): + """ + Gets the field_name of this DocumentField. + + :return: The field_name of this DocumentField. + :rtype: oci.ai_vision.models.FieldName + """ + return self._field_name + + @field_name.setter + def field_name(self, field_name): + """ + Sets the field_name of this DocumentField. + + :param field_name: The field_name of this DocumentField. + :type: oci.ai_vision.models.FieldName + """ + self._field_name = field_name + + @property + def field_value(self): + """ + **[Required]** Gets the field_value of this DocumentField. + + :return: The field_value of this DocumentField. + :rtype: oci.ai_vision.models.FieldValue + """ + return self._field_value + + @field_value.setter + def field_value(self, field_value): + """ + Sets the field_value of this DocumentField. + + :param field_value: The field_value of this DocumentField. + :type: oci.ai_vision.models.FieldValue + """ + self._field_value = field_value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/document_job.py b/src/oci/ai_vision/models/document_job.py new file mode 100644 index 0000000000..8103d8fe3e --- /dev/null +++ b/src/oci/ai_vision/models/document_job.py @@ -0,0 +1,700 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentJob(object): + """ + Job details for a batch document analysis. + """ + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "ENG" + LANGUAGE_ENG = "ENG" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "CES" + LANGUAGE_CES = "CES" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "DAN" + LANGUAGE_DAN = "DAN" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "NLD" + LANGUAGE_NLD = "NLD" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "FIN" + LANGUAGE_FIN = "FIN" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "FRA" + LANGUAGE_FRA = "FRA" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "DEU" + LANGUAGE_DEU = "DEU" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "ELL" + LANGUAGE_ELL = "ELL" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "HUN" + LANGUAGE_HUN = "HUN" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "ITA" + LANGUAGE_ITA = "ITA" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "NOR" + LANGUAGE_NOR = "NOR" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "POL" + LANGUAGE_POL = "POL" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "POR" + LANGUAGE_POR = "POR" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "RON" + LANGUAGE_RON = "RON" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "RUS" + LANGUAGE_RUS = "RUS" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "SLK" + LANGUAGE_SLK = "SLK" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "SPA" + LANGUAGE_SPA = "SPA" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "SWE" + LANGUAGE_SWE = "SWE" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "TUR" + LANGUAGE_TUR = "TUR" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "ARA" + LANGUAGE_ARA = "ARA" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "CHI_SIM" + LANGUAGE_CHI_SIM = "CHI_SIM" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "HIN" + LANGUAGE_HIN = "HIN" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "JPN" + LANGUAGE_JPN = "JPN" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "KOR" + LANGUAGE_KOR = "KOR" + + #: A constant which can be used with the language property of a DocumentJob. + #: This constant has a value of "OTHERS" + LANGUAGE_OTHERS = "OTHERS" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "INVOICE" + DOCUMENT_TYPE_INVOICE = "INVOICE" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "RECEIPT" + DOCUMENT_TYPE_RECEIPT = "RECEIPT" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "RESUME" + DOCUMENT_TYPE_RESUME = "RESUME" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "TAX_FORM" + DOCUMENT_TYPE_TAX_FORM = "TAX_FORM" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "DRIVER_LICENSE" + DOCUMENT_TYPE_DRIVER_LICENSE = "DRIVER_LICENSE" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "PASSPORT" + DOCUMENT_TYPE_PASSPORT = "PASSPORT" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "BANK_STATEMENT" + DOCUMENT_TYPE_BANK_STATEMENT = "BANK_STATEMENT" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "CHECK" + DOCUMENT_TYPE_CHECK = "CHECK" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "PAYSLIP" + DOCUMENT_TYPE_PAYSLIP = "PAYSLIP" + + #: A constant which can be used with the document_type property of a DocumentJob. + #: This constant has a value of "OTHERS" + DOCUMENT_TYPE_OTHERS = "OTHERS" + + #: A constant which can be used with the lifecycle_state property of a DocumentJob. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a DocumentJob. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a DocumentJob. + #: This constant has a value of "ACCEPTED" + LIFECYCLE_STATE_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the lifecycle_state property of a DocumentJob. + #: This constant has a value of "CANCELED" + LIFECYCLE_STATE_CANCELED = "CANCELED" + + #: A constant which can be used with the lifecycle_state property of a DocumentJob. + #: 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 DocumentJob. + #: This constant has a value of "CANCELING" + LIFECYCLE_STATE_CANCELING = "CANCELING" + + #: A constant which can be used with the lifecycle_details property of a DocumentJob. + #: This constant has a value of "PARTIALLY_SUCCEEDED" + LIFECYCLE_DETAILS_PARTIALLY_SUCCEEDED = "PARTIALLY_SUCCEEDED" + + #: A constant which can be used with the lifecycle_details property of a DocumentJob. + #: This constant has a value of "COMPLETELY_FAILED" + LIFECYCLE_DETAILS_COMPLETELY_FAILED = "COMPLETELY_FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new DocumentJob 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 DocumentJob. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this DocumentJob. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this DocumentJob. + :type display_name: str + + :param features: + The value to assign to the features property of this DocumentJob. + :type features: list[oci.ai_vision.models.DocumentFeature] + + :param language: + The value to assign to the language property of this DocumentJob. + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type language: str + + :param document_type: + The value to assign to the document_type property of this DocumentJob. + Allowed values for this property are: "INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type document_type: str + + :param input_location: + The value to assign to the input_location property of this DocumentJob. + :type input_location: oci.ai_vision.models.InputLocation + + :param time_accepted: + The value to assign to the time_accepted property of this DocumentJob. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this DocumentJob. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this DocumentJob. + :type time_finished: datetime + + :param percent_complete: + The value to assign to the percent_complete property of this DocumentJob. + :type percent_complete: float + + :param output_location: + The value to assign to the output_location property of this DocumentJob. + :type output_location: oci.ai_vision.models.OutputLocation + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DocumentJob. + Allowed values for this property are: "SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param is_zip_output_enabled: + The value to assign to the is_zip_output_enabled property of this DocumentJob. + :type is_zip_output_enabled: bool + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this DocumentJob. + Allowed values for this property are: "PARTIALLY_SUCCEEDED", "COMPLETELY_FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_details: str + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'features': 'list[DocumentFeature]', + 'language': 'str', + 'document_type': 'str', + 'input_location': 'InputLocation', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'percent_complete': 'float', + 'output_location': 'OutputLocation', + 'lifecycle_state': 'str', + 'is_zip_output_enabled': 'bool', + 'lifecycle_details': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'features': 'features', + 'language': 'language', + 'document_type': 'documentType', + 'input_location': 'inputLocation', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'percent_complete': 'percentComplete', + 'output_location': 'outputLocation', + 'lifecycle_state': 'lifecycleState', + 'is_zip_output_enabled': 'isZipOutputEnabled', + 'lifecycle_details': 'lifecycleDetails' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._features = None + self._language = None + self._document_type = None + self._input_location = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + self._percent_complete = None + self._output_location = None + self._lifecycle_state = None + self._is_zip_output_enabled = None + self._lifecycle_details = None + + @property + def id(self): + """ + **[Required]** Gets the id of this DocumentJob. + Job id. + + + :return: The id of this DocumentJob. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this DocumentJob. + Job id. + + + :param id: The id of this DocumentJob. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this DocumentJob. + The OCID of the compartment that starts the job. + + + :return: The compartment_id of this DocumentJob. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this DocumentJob. + The OCID of the compartment that starts the job. + + + :param compartment_id: The compartment_id of this DocumentJob. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this DocumentJob. + Document job display name. + + + :return: The display_name of this DocumentJob. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this DocumentJob. + Document job display name. + + + :param display_name: The display_name of this DocumentJob. + :type: str + """ + self._display_name = display_name + + @property + def features(self): + """ + **[Required]** Gets the features of this DocumentJob. + List of document analysis types requested. + + + :return: The features of this DocumentJob. + :rtype: list[oci.ai_vision.models.DocumentFeature] + """ + return self._features + + @features.setter + def features(self, features): + """ + Sets the features of this DocumentJob. + List of document analysis types requested. + + + :param features: The features of this DocumentJob. + :type: list[oci.ai_vision.models.DocumentFeature] + """ + self._features = features + + @property + def language(self): + """ + Gets the language of this DocumentJob. + Language of the document, abbreviated according to ISO 639-2. + + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The language of this DocumentJob. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """ + Sets the language of this DocumentJob. + Language of the document, abbreviated according to ISO 639-2. + + + :param language: The language of this DocumentJob. + :type: str + """ + allowed_values = ["ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS"] + if not value_allowed_none_or_none_sentinel(language, allowed_values): + language = 'UNKNOWN_ENUM_VALUE' + self._language = language + + @property + def document_type(self): + """ + Gets the document_type of this DocumentJob. + The type of documents. + + Allowed values for this property are: "INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The document_type of this DocumentJob. + :rtype: str + """ + return self._document_type + + @document_type.setter + def document_type(self, document_type): + """ + Sets the document_type of this DocumentJob. + The type of documents. + + + :param document_type: The document_type of this DocumentJob. + :type: str + """ + allowed_values = ["INVOICE", "RECEIPT", "RESUME", "TAX_FORM", "DRIVER_LICENSE", "PASSPORT", "BANK_STATEMENT", "CHECK", "PAYSLIP", "OTHERS"] + if not value_allowed_none_or_none_sentinel(document_type, allowed_values): + document_type = 'UNKNOWN_ENUM_VALUE' + self._document_type = document_type + + @property + def input_location(self): + """ + Gets the input_location of this DocumentJob. + + :return: The input_location of this DocumentJob. + :rtype: oci.ai_vision.models.InputLocation + """ + return self._input_location + + @input_location.setter + def input_location(self, input_location): + """ + Sets the input_location of this DocumentJob. + + :param input_location: The input_location of this DocumentJob. + :type: oci.ai_vision.models.InputLocation + """ + self._input_location = input_location + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this DocumentJob. + Job accepted time. + + + :return: The time_accepted of this DocumentJob. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this DocumentJob. + Job accepted time. + + + :param time_accepted: The time_accepted of this DocumentJob. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this DocumentJob. + Job started time. + + + :return: The time_started of this DocumentJob. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this DocumentJob. + Job started time. + + + :param time_started: The time_started of this DocumentJob. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this DocumentJob. + Job finished time. + + + :return: The time_finished of this DocumentJob. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this DocumentJob. + Job finished time. + + + :param time_finished: The time_finished of this DocumentJob. + :type: datetime + """ + self._time_finished = time_finished + + @property + def percent_complete(self): + """ + Gets the percent_complete of this DocumentJob. + How much progress the operation has made, vs the total amount of work that must be performed. + + + :return: The percent_complete of this DocumentJob. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this DocumentJob. + 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 DocumentJob. + :type: float + """ + self._percent_complete = percent_complete + + @property + def output_location(self): + """ + **[Required]** Gets the output_location of this DocumentJob. + + :return: The output_location of this DocumentJob. + :rtype: oci.ai_vision.models.OutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this DocumentJob. + + :param output_location: The output_location of this DocumentJob. + :type: oci.ai_vision.models.OutputLocation + """ + self._output_location = output_location + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this DocumentJob. + The current state of the batch document job. + + Allowed values for this property are: "SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this DocumentJob. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this DocumentJob. + The current state of the batch document job. + + + :param lifecycle_state: The lifecycle_state of this DocumentJob. + :type: str + """ + allowed_values = ["SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def is_zip_output_enabled(self): + """ + Gets the is_zip_output_enabled of this DocumentJob. + Whether to generate a Zip file containing the results. + + + :return: The is_zip_output_enabled of this DocumentJob. + :rtype: bool + """ + return self._is_zip_output_enabled + + @is_zip_output_enabled.setter + def is_zip_output_enabled(self, is_zip_output_enabled): + """ + Sets the is_zip_output_enabled of this DocumentJob. + Whether to generate a Zip file containing the results. + + + :param is_zip_output_enabled: The is_zip_output_enabled of this DocumentJob. + :type: bool + """ + self._is_zip_output_enabled = is_zip_output_enabled + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this DocumentJob. + Detailed status of FAILED state. + + Allowed values for this property are: "PARTIALLY_SUCCEEDED", "COMPLETELY_FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_details of this DocumentJob. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this DocumentJob. + Detailed status of FAILED state. + + + :param lifecycle_details: The lifecycle_details of this DocumentJob. + :type: str + """ + allowed_values = ["PARTIALLY_SUCCEEDED", "COMPLETELY_FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_details, allowed_values): + lifecycle_details = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_details = lifecycle_details + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/document_key_value_detection_feature.py b/src/oci/ai_vision/models/document_key_value_detection_feature.py new file mode 100644 index 0000000000..14006abba5 --- /dev/null +++ b/src/oci/ai_vision/models/document_key_value_detection_feature.py @@ -0,0 +1,49 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_feature import DocumentFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentKeyValueDetectionFeature(DocumentFeature): + """ + Extracting form fields. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentKeyValueDetectionFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.DocumentKeyValueDetectionFeature.feature_type` attribute + of this class is ``KEY_VALUE_DETECTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this DocumentKeyValueDetectionFeature. + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION" + :type feature_type: str + + """ + self.swagger_types = { + 'feature_type': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType' + } + + self._feature_type = None + self._feature_type = 'KEY_VALUE_DETECTION' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/document_language_classification_feature.py b/src/oci/ai_vision/models/document_language_classification_feature.py new file mode 100644 index 0000000000..4f29b67bb9 --- /dev/null +++ b/src/oci/ai_vision/models/document_language_classification_feature.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_feature import DocumentFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentLanguageClassificationFeature(DocumentFeature): + """ + Detecting the language of the document. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentLanguageClassificationFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.DocumentLanguageClassificationFeature.feature_type` attribute + of this class is ``LANGUAGE_CLASSIFICATION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this DocumentLanguageClassificationFeature. + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION" + :type feature_type: str + + :param max_results: + The value to assign to the max_results property of this DocumentLanguageClassificationFeature. + :type max_results: int + + """ + self.swagger_types = { + 'feature_type': 'str', + 'max_results': 'int' + } + + self.attribute_map = { + 'feature_type': 'featureType', + 'max_results': 'maxResults' + } + + self._feature_type = None + self._max_results = None + self._feature_type = 'LANGUAGE_CLASSIFICATION' + + @property + def max_results(self): + """ + Gets the max_results of this DocumentLanguageClassificationFeature. + The maximum number of results to return. + + + :return: The max_results of this DocumentLanguageClassificationFeature. + :rtype: int + """ + return self._max_results + + @max_results.setter + def max_results(self, max_results): + """ + Sets the max_results of this DocumentLanguageClassificationFeature. + The maximum number of results to return. + + + :param max_results: The max_results of this DocumentLanguageClassificationFeature. + :type: int + """ + self._max_results = max_results + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/document_metadata.py b/src/oci/ai_vision/models/document_metadata.py new file mode 100644 index 0000000000..29a605f6ef --- /dev/null +++ b/src/oci/ai_vision/models/document_metadata.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentMetadata(object): + """ + Document information. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentMetadata object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param page_count: + The value to assign to the page_count property of this DocumentMetadata. + :type page_count: int + + :param mime_type: + The value to assign to the mime_type property of this DocumentMetadata. + :type mime_type: str + + """ + self.swagger_types = { + 'page_count': 'int', + 'mime_type': 'str' + } + + self.attribute_map = { + 'page_count': 'pageCount', + 'mime_type': 'mimeType' + } + + self._page_count = None + self._mime_type = None + + @property + def page_count(self): + """ + **[Required]** Gets the page_count of this DocumentMetadata. + Number of pages in the document. + + + :return: The page_count of this DocumentMetadata. + :rtype: int + """ + return self._page_count + + @page_count.setter + def page_count(self, page_count): + """ + Sets the page_count of this DocumentMetadata. + Number of pages in the document. + + + :param page_count: The page_count of this DocumentMetadata. + :type: int + """ + self._page_count = page_count + + @property + def mime_type(self): + """ + **[Required]** Gets the mime_type of this DocumentMetadata. + Result data format. + + + :return: The mime_type of this DocumentMetadata. + :rtype: str + """ + return self._mime_type + + @mime_type.setter + def mime_type(self, mime_type): + """ + Sets the mime_type of this DocumentMetadata. + Result data format. + + + :param mime_type: The mime_type of this DocumentMetadata. + :type: str + """ + self._mime_type = mime_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_vision/models/document_table_detection_feature.py b/src/oci/ai_vision/models/document_table_detection_feature.py new file mode 100644 index 0000000000..4f79d3828d --- /dev/null +++ b/src/oci/ai_vision/models/document_table_detection_feature.py @@ -0,0 +1,49 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_feature import DocumentFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentTableDetectionFeature(DocumentFeature): + """ + Detecting and extracting data in tables. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentTableDetectionFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.DocumentTableDetectionFeature.feature_type` attribute + of this class is ``TABLE_DETECTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this DocumentTableDetectionFeature. + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION" + :type feature_type: str + + """ + self.swagger_types = { + 'feature_type': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType' + } + + self._feature_type = None + self._feature_type = 'TABLE_DETECTION' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/document_text_detection_feature.py b/src/oci/ai_vision/models/document_text_detection_feature.py new file mode 100644 index 0000000000..9e90ffef59 --- /dev/null +++ b/src/oci/ai_vision/models/document_text_detection_feature.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_feature import DocumentFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DocumentTextDetectionFeature(DocumentFeature): + """ + Text recognition + """ + + def __init__(self, **kwargs): + """ + Initializes a new DocumentTextDetectionFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.DocumentTextDetectionFeature.feature_type` attribute + of this class is ``TEXT_DETECTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this DocumentTextDetectionFeature. + Allowed values for this property are: "LANGUAGE_CLASSIFICATION", "TEXT_DETECTION", "TABLE_DETECTION", "KEY_VALUE_DETECTION", "DOCUMENT_CLASSIFICATION" + :type feature_type: str + + :param generate_searchable_pdf: + The value to assign to the generate_searchable_pdf property of this DocumentTextDetectionFeature. + :type generate_searchable_pdf: bool + + """ + self.swagger_types = { + 'feature_type': 'str', + 'generate_searchable_pdf': 'bool' + } + + self.attribute_map = { + 'feature_type': 'featureType', + 'generate_searchable_pdf': 'generateSearchablePdf' + } + + self._feature_type = None + self._generate_searchable_pdf = None + self._feature_type = 'TEXT_DETECTION' + + @property + def generate_searchable_pdf(self): + """ + Gets the generate_searchable_pdf of this DocumentTextDetectionFeature. + Whether to generate a searchable PDF file. + + + :return: The generate_searchable_pdf of this DocumentTextDetectionFeature. + :rtype: bool + """ + return self._generate_searchable_pdf + + @generate_searchable_pdf.setter + def generate_searchable_pdf(self, generate_searchable_pdf): + """ + Sets the generate_searchable_pdf of this DocumentTextDetectionFeature. + Whether to generate a searchable PDF file. + + + :param generate_searchable_pdf: The generate_searchable_pdf of this DocumentTextDetectionFeature. + :type: bool + """ + self._generate_searchable_pdf = generate_searchable_pdf + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/field_label.py b/src/oci/ai_vision/models/field_label.py new file mode 100644 index 0000000000..8fdddfe23d --- /dev/null +++ b/src/oci/ai_vision/models/field_label.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FieldLabel(object): + """ + Label in a field. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FieldLabel object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this FieldLabel. + :type name: str + + :param confidence: + The value to assign to the confidence property of this FieldLabel. + :type confidence: float + + """ + self.swagger_types = { + 'name': 'str', + 'confidence': 'float' + } + + self.attribute_map = { + 'name': 'name', + 'confidence': 'confidence' + } + + self._name = None + self._confidence = None + + @property + def name(self): + """ + **[Required]** Gets the name of this FieldLabel. + Name of the field label. + + + :return: The name of this FieldLabel. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FieldLabel. + Name of the field label. + + + :param name: The name of this FieldLabel. + :type: str + """ + self._name = name + + @property + def confidence(self): + """ + Gets the confidence of this FieldLabel. + Confidence score between 0 to 1. + + + :return: The confidence of this FieldLabel. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this FieldLabel. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this FieldLabel. + :type: float + """ + self._confidence = confidence + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/field_name.py b/src/oci/ai_vision/models/field_name.py new file mode 100644 index 0000000000..76f6b2882b --- /dev/null +++ b/src/oci/ai_vision/models/field_name.py @@ -0,0 +1,159 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FieldName(object): + """ + Name of a form field. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FieldName object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this FieldName. + :type name: str + + :param confidence: + The value to assign to the confidence property of this FieldName. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this FieldName. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this FieldName. + :type word_indexes: list[int] + + """ + self.swagger_types = { + 'name': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]' + } + + self.attribute_map = { + 'name': 'name', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes' + } + + self._name = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + + @property + def name(self): + """ + **[Required]** Gets the name of this FieldName. + Name of the field. + + + :return: The name of this FieldName. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FieldName. + Name of the field. + + + :param name: The name of this FieldName. + :type: str + """ + self._name = name + + @property + def confidence(self): + """ + Gets the confidence of this FieldName. + Confidence score between 0 to 1. + + + :return: The confidence of this FieldName. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this FieldName. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this FieldName. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + Gets the bounding_polygon of this FieldName. + + :return: The bounding_polygon of this FieldName. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this FieldName. + + :param bounding_polygon: The bounding_polygon of this FieldName. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + @property + def word_indexes(self): + """ + Gets the word_indexes of this FieldName. + Indexes of the words in the field name. + + + :return: The word_indexes of this FieldName. + :rtype: list[int] + """ + return self._word_indexes + + @word_indexes.setter + def word_indexes(self, word_indexes): + """ + Sets the word_indexes of this FieldName. + Indexes of the words in the field name. + + + :param word_indexes: The word_indexes of this FieldName. + :type: list[int] + """ + self._word_indexes = word_indexes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/field_value.py b/src/oci/ai_vision/models/field_value.py new file mode 100644 index 0000000000..826b9f3d1c --- /dev/null +++ b/src/oci/ai_vision/models/field_value.py @@ -0,0 +1,267 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FieldValue(object): + """ + Value of a form field. + """ + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "STRING" + VALUE_TYPE_STRING = "STRING" + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "DATE" + VALUE_TYPE_DATE = "DATE" + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "TIME" + VALUE_TYPE_TIME = "TIME" + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "PHONE_NUMBER" + VALUE_TYPE_PHONE_NUMBER = "PHONE_NUMBER" + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "NUMBER" + VALUE_TYPE_NUMBER = "NUMBER" + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "INTEGER" + VALUE_TYPE_INTEGER = "INTEGER" + + #: A constant which can be used with the value_type property of a FieldValue. + #: This constant has a value of "ARRAY" + VALUE_TYPE_ARRAY = "ARRAY" + + def __init__(self, **kwargs): + """ + Initializes a new FieldValue 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_vision.models.ValueTime` + * :class:`~oci.ai_vision.models.ValueInteger` + * :class:`~oci.ai_vision.models.ValueDate` + * :class:`~oci.ai_vision.models.ValueNumber` + * :class:`~oci.ai_vision.models.ValueString` + * :class:`~oci.ai_vision.models.ValuePhoneNumber` + * :class:`~oci.ai_vision.models.ValueArray` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this FieldValue. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type value_type: str + + :param text: + The value to assign to the text property of this FieldValue. + :type text: str + + :param confidence: + The value to assign to the confidence property of this FieldValue. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this FieldValue. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this FieldValue. + :type word_indexes: list[int] + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = 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['valueType'] + + if type == 'TIME': + return 'ValueTime' + + if type == 'INTEGER': + return 'ValueInteger' + + if type == 'DATE': + return 'ValueDate' + + if type == 'NUMBER': + return 'ValueNumber' + + if type == 'STRING': + return 'ValueString' + + if type == 'PHONE_NUMBER': + return 'ValuePhoneNumber' + + if type == 'ARRAY': + return 'ValueArray' + else: + return 'FieldValue' + + @property + def value_type(self): + """ + **[Required]** Gets the value_type of this FieldValue. + Type of data detected. + + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The value_type of this FieldValue. + :rtype: str + """ + return self._value_type + + @value_type.setter + def value_type(self, value_type): + """ + Sets the value_type of this FieldValue. + Type of data detected. + + + :param value_type: The value_type of this FieldValue. + :type: str + """ + allowed_values = ["STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY"] + if not value_allowed_none_or_none_sentinel(value_type, allowed_values): + value_type = 'UNKNOWN_ENUM_VALUE' + self._value_type = value_type + + @property + def text(self): + """ + Gets the text of this FieldValue. + Detected text of a field. + + + :return: The text of this FieldValue. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """ + Sets the text of this FieldValue. + Detected text of a field. + + + :param text: The text of this FieldValue. + :type: str + """ + self._text = text + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this FieldValue. + Confidence score between 0 to 1. + + + :return: The confidence of this FieldValue. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this FieldValue. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this FieldValue. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + **[Required]** Gets the bounding_polygon of this FieldValue. + + :return: The bounding_polygon of this FieldValue. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this FieldValue. + + :param bounding_polygon: The bounding_polygon of this FieldValue. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + @property + def word_indexes(self): + """ + **[Required]** Gets the word_indexes of this FieldValue. + Indexes of the words in the field value. + + + :return: The word_indexes of this FieldValue. + :rtype: list[int] + """ + return self._word_indexes + + @word_indexes.setter + def word_indexes(self, word_indexes): + """ + Sets the word_indexes of this FieldValue. + Indexes of the words in the field value. + + + :param word_indexes: The word_indexes of this FieldValue. + :type: list[int] + """ + self._word_indexes = word_indexes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/image_classification_feature.py b/src/oci/ai_vision/models/image_classification_feature.py new file mode 100644 index 0000000000..67c9279deb --- /dev/null +++ b/src/oci/ai_vision/models/image_classification_feature.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .image_feature import ImageFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageClassificationFeature(ImageFeature): + """ + Image classification parameters. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ImageClassificationFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ImageClassificationFeature.feature_type` attribute + of this class is ``IMAGE_CLASSIFICATION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this ImageClassificationFeature. + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_DETECTION" + :type feature_type: str + + :param max_results: + The value to assign to the max_results property of this ImageClassificationFeature. + :type max_results: int + + :param model_id: + The value to assign to the model_id property of this ImageClassificationFeature. + :type model_id: str + + """ + self.swagger_types = { + 'feature_type': 'str', + 'max_results': 'int', + 'model_id': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType', + 'max_results': 'maxResults', + 'model_id': 'modelId' + } + + self._feature_type = None + self._max_results = None + self._model_id = None + self._feature_type = 'IMAGE_CLASSIFICATION' + + @property + def max_results(self): + """ + Gets the max_results of this ImageClassificationFeature. + The maximum number of results to return. + + + :return: The max_results of this ImageClassificationFeature. + :rtype: int + """ + return self._max_results + + @max_results.setter + def max_results(self, max_results): + """ + Sets the max_results of this ImageClassificationFeature. + The maximum number of results to return. + + + :param max_results: The max_results of this ImageClassificationFeature. + :type: int + """ + self._max_results = max_results + + @property + def model_id(self): + """ + Gets the model_id of this ImageClassificationFeature. + Custom model id. + + + :return: The model_id of this ImageClassificationFeature. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this ImageClassificationFeature. + Custom model id. + + + :param model_id: The model_id of this ImageClassificationFeature. + :type: str + """ + self._model_id = model_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_vision/models/image_details.py b/src/oci/ai_vision/models/image_details.py new file mode 100644 index 0000000000..02082d4e60 --- /dev/null +++ b/src/oci/ai_vision/models/image_details.py @@ -0,0 +1,114 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageDetails(object): + """ + Details about an image to analyze. + """ + + #: A constant which can be used with the source property of a ImageDetails. + #: This constant has a value of "INLINE" + SOURCE_INLINE = "INLINE" + + #: A constant which can be used with the source property of a ImageDetails. + #: This constant has a value of "OBJECT_STORAGE" + SOURCE_OBJECT_STORAGE = "OBJECT_STORAGE" + + def __init__(self, **kwargs): + """ + Initializes a new ImageDetails 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_vision.models.ObjectStorageImageDetails` + * :class:`~oci.ai_vision.models.InlineImageDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source: + The value to assign to the source property of this ImageDetails. + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + :type source: str + + """ + self.swagger_types = { + 'source': 'str' + } + + self.attribute_map = { + 'source': 'source' + } + + self._source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['source'] + + if type == 'OBJECT_STORAGE': + return 'ObjectStorageImageDetails' + + if type == 'INLINE': + return 'InlineImageDetails' + else: + return 'ImageDetails' + + @property + def source(self): + """ + **[Required]** Gets the source of this ImageDetails. + The location of image data + Allowed values are: + - `INLINE`: Data is included directly in the request payload. + - `OBJECT_STORAGE`: The image is in OCI Object Storage. + + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + + + :return: The source of this ImageDetails. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this ImageDetails. + The location of image data + Allowed values are: + - `INLINE`: Data is included directly in the request payload. + - `OBJECT_STORAGE`: The image is in OCI Object Storage. + + + :param source: The source of this ImageDetails. + :type: str + """ + allowed_values = ["INLINE", "OBJECT_STORAGE"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + raise ValueError( + "Invalid value for `source`, must be None or one of {0}" + .format(allowed_values) + ) + self._source = source + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/image_feature.py b/src/oci/ai_vision/models/image_feature.py new file mode 100644 index 0000000000..df2644d51e --- /dev/null +++ b/src/oci/ai_vision/models/image_feature.py @@ -0,0 +1,123 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageFeature(object): + """ + Type of image analysis. + """ + + #: A constant which can be used with the feature_type property of a ImageFeature. + #: This constant has a value of "IMAGE_CLASSIFICATION" + FEATURE_TYPE_IMAGE_CLASSIFICATION = "IMAGE_CLASSIFICATION" + + #: A constant which can be used with the feature_type property of a ImageFeature. + #: This constant has a value of "OBJECT_DETECTION" + FEATURE_TYPE_OBJECT_DETECTION = "OBJECT_DETECTION" + + #: A constant which can be used with the feature_type property of a ImageFeature. + #: This constant has a value of "TEXT_DETECTION" + FEATURE_TYPE_TEXT_DETECTION = "TEXT_DETECTION" + + def __init__(self, **kwargs): + """ + Initializes a new ImageFeature 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_vision.models.ImageTextDetectionFeature` + * :class:`~oci.ai_vision.models.ImageObjectDetectionFeature` + * :class:`~oci.ai_vision.models.ImageClassificationFeature` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this ImageFeature. + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_DETECTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type feature_type: str + + """ + self.swagger_types = { + 'feature_type': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType' + } + + self._feature_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['featureType'] + + if type == 'TEXT_DETECTION': + return 'ImageTextDetectionFeature' + + if type == 'OBJECT_DETECTION': + return 'ImageObjectDetectionFeature' + + if type == 'IMAGE_CLASSIFICATION': + return 'ImageClassificationFeature' + else: + return 'ImageFeature' + + @property + def feature_type(self): + """ + **[Required]** Gets the feature_type of this ImageFeature. + Type of image analysis requested. + Allowed values are: + - `IMAGE_CLASSIFICATION`: Label the image. + - `OBJECT_DETECTION`: Identify objects in the image with bounding boxes. + - `TEXT_DETECTION`: Recognize text in the image. + + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_DETECTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The feature_type of this ImageFeature. + :rtype: str + """ + return self._feature_type + + @feature_type.setter + def feature_type(self, feature_type): + """ + Sets the feature_type of this ImageFeature. + Type of image analysis requested. + Allowed values are: + - `IMAGE_CLASSIFICATION`: Label the image. + - `OBJECT_DETECTION`: Identify objects in the image with bounding boxes. + - `TEXT_DETECTION`: Recognize text in the image. + + + :param feature_type: The feature_type of this ImageFeature. + :type: str + """ + allowed_values = ["IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_DETECTION"] + if not value_allowed_none_or_none_sentinel(feature_type, allowed_values): + feature_type = 'UNKNOWN_ENUM_VALUE' + self._feature_type = feature_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_vision/models/image_job.py b/src/oci/ai_vision/models/image_job.py new file mode 100644 index 0000000000..34e2027f96 --- /dev/null +++ b/src/oci/ai_vision/models/image_job.py @@ -0,0 +1,482 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageJob(object): + """ + Job details for a batch image analysis. + """ + + #: A constant which can be used with the lifecycle_state property of a ImageJob. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a ImageJob. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a ImageJob. + #: This constant has a value of "ACCEPTED" + LIFECYCLE_STATE_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the lifecycle_state property of a ImageJob. + #: This constant has a value of "CANCELED" + LIFECYCLE_STATE_CANCELED = "CANCELED" + + #: A constant which can be used with the lifecycle_state property of a ImageJob. + #: 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 ImageJob. + #: This constant has a value of "CANCELING" + LIFECYCLE_STATE_CANCELING = "CANCELING" + + #: A constant which can be used with the lifecycle_details property of a ImageJob. + #: This constant has a value of "PARTIALLY_SUCCEEDED" + LIFECYCLE_DETAILS_PARTIALLY_SUCCEEDED = "PARTIALLY_SUCCEEDED" + + #: A constant which can be used with the lifecycle_details property of a ImageJob. + #: This constant has a value of "COMPLETELY_FAILED" + LIFECYCLE_DETAILS_COMPLETELY_FAILED = "COMPLETELY_FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new ImageJob 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 ImageJob. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this ImageJob. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this ImageJob. + :type display_name: str + + :param features: + The value to assign to the features property of this ImageJob. + :type features: list[oci.ai_vision.models.ImageFeature] + + :param input_location: + The value to assign to the input_location property of this ImageJob. + :type input_location: oci.ai_vision.models.InputLocation + + :param time_accepted: + The value to assign to the time_accepted property of this ImageJob. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this ImageJob. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this ImageJob. + :type time_finished: datetime + + :param percent_complete: + The value to assign to the percent_complete property of this ImageJob. + :type percent_complete: float + + :param output_location: + The value to assign to the output_location property of this ImageJob. + :type output_location: oci.ai_vision.models.OutputLocation + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ImageJob. + Allowed values for this property are: "SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING", '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 ImageJob. + Allowed values for this property are: "PARTIALLY_SUCCEEDED", "COMPLETELY_FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_details: str + + :param is_zip_output_enabled: + The value to assign to the is_zip_output_enabled property of this ImageJob. + :type is_zip_output_enabled: bool + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'features': 'list[ImageFeature]', + 'input_location': 'InputLocation', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'percent_complete': 'float', + 'output_location': 'OutputLocation', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'is_zip_output_enabled': 'bool' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'features': 'features', + 'input_location': 'inputLocation', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'percent_complete': 'percentComplete', + 'output_location': 'outputLocation', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'is_zip_output_enabled': 'isZipOutputEnabled' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._features = None + self._input_location = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + self._percent_complete = None + self._output_location = None + self._lifecycle_state = None + self._lifecycle_details = None + self._is_zip_output_enabled = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ImageJob. + Job id + + + :return: The id of this ImageJob. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ImageJob. + Job id + + + :param id: The id of this ImageJob. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ImageJob. + The OCID of the compartment that starts the job. + + + :return: The compartment_id of this ImageJob. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ImageJob. + The OCID of the compartment that starts the job. + + + :param compartment_id: The compartment_id of this ImageJob. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this ImageJob. + Image job display name. + + + :return: The display_name of this ImageJob. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ImageJob. + Image job display name. + + + :param display_name: The display_name of this ImageJob. + :type: str + """ + self._display_name = display_name + + @property + def features(self): + """ + **[Required]** Gets the features of this ImageJob. + List of document analysis types requested. + + + :return: The features of this ImageJob. + :rtype: list[oci.ai_vision.models.ImageFeature] + """ + return self._features + + @features.setter + def features(self, features): + """ + Sets the features of this ImageJob. + List of document analysis types requested. + + + :param features: The features of this ImageJob. + :type: list[oci.ai_vision.models.ImageFeature] + """ + self._features = features + + @property + def input_location(self): + """ + Gets the input_location of this ImageJob. + + :return: The input_location of this ImageJob. + :rtype: oci.ai_vision.models.InputLocation + """ + return self._input_location + + @input_location.setter + def input_location(self, input_location): + """ + Sets the input_location of this ImageJob. + + :param input_location: The input_location of this ImageJob. + :type: oci.ai_vision.models.InputLocation + """ + self._input_location = input_location + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this ImageJob. + Job accepted time. + + + :return: The time_accepted of this ImageJob. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this ImageJob. + Job accepted time. + + + :param time_accepted: The time_accepted of this ImageJob. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this ImageJob. + Job started time. + + + :return: The time_started of this ImageJob. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this ImageJob. + Job started time. + + + :param time_started: The time_started of this ImageJob. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this ImageJob. + Job finished time. + + + :return: The time_finished of this ImageJob. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this ImageJob. + Job finished time. + + + :param time_finished: The time_finished of this ImageJob. + :type: datetime + """ + self._time_finished = time_finished + + @property + def percent_complete(self): + """ + Gets the percent_complete of this ImageJob. + How much progress the operation has made, vs the total amount of work that must be performed. + + + :return: The percent_complete of this ImageJob. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this ImageJob. + 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 ImageJob. + :type: float + """ + self._percent_complete = percent_complete + + @property + def output_location(self): + """ + **[Required]** Gets the output_location of this ImageJob. + + :return: The output_location of this ImageJob. + :rtype: oci.ai_vision.models.OutputLocation + """ + return self._output_location + + @output_location.setter + def output_location(self, output_location): + """ + Sets the output_location of this ImageJob. + + :param output_location: The output_location of this ImageJob. + :type: oci.ai_vision.models.OutputLocation + """ + self._output_location = output_location + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ImageJob. + The current state of the batch image job. + + Allowed values for this property are: "SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ImageJob. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ImageJob. + The current state of the batch image job. + + + :param lifecycle_state: The lifecycle_state of this ImageJob. + :type: str + """ + allowed_values = ["SUCCEEDED", "FAILED", "ACCEPTED", "CANCELED", "IN_PROGRESS", "CANCELING"] + 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 ImageJob. + Detailed status of FAILED state. + + Allowed values for this property are: "PARTIALLY_SUCCEEDED", "COMPLETELY_FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_details of this ImageJob. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ImageJob. + Detailed status of FAILED state. + + + :param lifecycle_details: The lifecycle_details of this ImageJob. + :type: str + """ + allowed_values = ["PARTIALLY_SUCCEEDED", "COMPLETELY_FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_details, allowed_values): + lifecycle_details = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_details = lifecycle_details + + @property + def is_zip_output_enabled(self): + """ + Gets the is_zip_output_enabled of this ImageJob. + Whether to generate a Zip file containing the results. + + + :return: The is_zip_output_enabled of this ImageJob. + :rtype: bool + """ + return self._is_zip_output_enabled + + @is_zip_output_enabled.setter + def is_zip_output_enabled(self, is_zip_output_enabled): + """ + Sets the is_zip_output_enabled of this ImageJob. + Whether to generate a Zip file containing the results. + + + :param is_zip_output_enabled: The is_zip_output_enabled of this ImageJob. + :type: bool + """ + self._is_zip_output_enabled = is_zip_output_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/image_object.py b/src/oci/ai_vision/models/image_object.py new file mode 100644 index 0000000000..1ac9f3a66c --- /dev/null +++ b/src/oci/ai_vision/models/image_object.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageObject(object): + """ + Detected object in image. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ImageObject object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this ImageObject. + :type name: str + + :param confidence: + The value to assign to the confidence property of this ImageObject. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ImageObject. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + """ + self.swagger_types = { + 'name': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon' + } + + self.attribute_map = { + 'name': 'name', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon' + } + + self._name = None + self._confidence = None + self._bounding_polygon = None + + @property + def name(self): + """ + **[Required]** Gets the name of this ImageObject. + Object category name. Every value returned by the pre-deployed model will be in English. + + + :return: The name of this ImageObject. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ImageObject. + Object category name. Every value returned by the pre-deployed model will be in English. + + + :param name: The name of this ImageObject. + :type: str + """ + self._name = name + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this ImageObject. + Confidence score between 0 to 1. + + + :return: The confidence of this ImageObject. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this ImageObject. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this ImageObject. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + **[Required]** Gets the bounding_polygon of this ImageObject. + + :return: The bounding_polygon of this ImageObject. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this ImageObject. + + :param bounding_polygon: The bounding_polygon of this ImageObject. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/image_object_detection_feature.py b/src/oci/ai_vision/models/image_object_detection_feature.py new file mode 100644 index 0000000000..76370b45c9 --- /dev/null +++ b/src/oci/ai_vision/models/image_object_detection_feature.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .image_feature import ImageFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageObjectDetectionFeature(ImageFeature): + """ + Object detection parameters. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ImageObjectDetectionFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ImageObjectDetectionFeature.feature_type` attribute + of this class is ``OBJECT_DETECTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this ImageObjectDetectionFeature. + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_DETECTION" + :type feature_type: str + + :param max_results: + The value to assign to the max_results property of this ImageObjectDetectionFeature. + :type max_results: int + + :param model_id: + The value to assign to the model_id property of this ImageObjectDetectionFeature. + :type model_id: str + + """ + self.swagger_types = { + 'feature_type': 'str', + 'max_results': 'int', + 'model_id': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType', + 'max_results': 'maxResults', + 'model_id': 'modelId' + } + + self._feature_type = None + self._max_results = None + self._model_id = None + self._feature_type = 'OBJECT_DETECTION' + + @property + def max_results(self): + """ + Gets the max_results of this ImageObjectDetectionFeature. + The maximum number of results to return. + + + :return: The max_results of this ImageObjectDetectionFeature. + :rtype: int + """ + return self._max_results + + @max_results.setter + def max_results(self, max_results): + """ + Sets the max_results of this ImageObjectDetectionFeature. + The maximum number of results to return. + + + :param max_results: The max_results of this ImageObjectDetectionFeature. + :type: int + """ + self._max_results = max_results + + @property + def model_id(self): + """ + Gets the model_id of this ImageObjectDetectionFeature. + Custom model id. + + + :return: The model_id of this ImageObjectDetectionFeature. + :rtype: str + """ + return self._model_id + + @model_id.setter + def model_id(self, model_id): + """ + Sets the model_id of this ImageObjectDetectionFeature. + Custom model id. + + + :param model_id: The model_id of this ImageObjectDetectionFeature. + :type: str + """ + self._model_id = model_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_vision/models/image_text.py b/src/oci/ai_vision/models/image_text.py new file mode 100644 index 0000000000..f686cda6ab --- /dev/null +++ b/src/oci/ai_vision/models/image_text.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageText(object): + """ + Detected text. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ImageText object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param words: + The value to assign to the words property of this ImageText. + :type words: list[oci.ai_vision.models.Word] + + :param lines: + The value to assign to the lines property of this ImageText. + :type lines: list[oci.ai_vision.models.Line] + + """ + self.swagger_types = { + 'words': 'list[Word]', + 'lines': 'list[Line]' + } + + self.attribute_map = { + 'words': 'words', + 'lines': 'lines' + } + + self._words = None + self._lines = None + + @property + def words(self): + """ + **[Required]** Gets the words of this ImageText. + Words recognized in the image. + + + :return: The words of this ImageText. + :rtype: list[oci.ai_vision.models.Word] + """ + return self._words + + @words.setter + def words(self, words): + """ + Sets the words of this ImageText. + Words recognized in the image. + + + :param words: The words of this ImageText. + :type: list[oci.ai_vision.models.Word] + """ + self._words = words + + @property + def lines(self): + """ + **[Required]** Gets the lines of this ImageText. + Lines of text recognized in the image. + + + :return: The lines of this ImageText. + :rtype: list[oci.ai_vision.models.Line] + """ + return self._lines + + @lines.setter + def lines(self, lines): + """ + Sets the lines of this ImageText. + Lines of text recognized in the image. + + + :param lines: The lines of this ImageText. + :type: list[oci.ai_vision.models.Line] + """ + self._lines = lines + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/image_text_detection_feature.py b/src/oci/ai_vision/models/image_text_detection_feature.py new file mode 100644 index 0000000000..a451582f7c --- /dev/null +++ b/src/oci/ai_vision/models/image_text_detection_feature.py @@ -0,0 +1,189 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .image_feature import ImageFeature +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ImageTextDetectionFeature(ImageFeature): + """ + Text detection parameters. + """ + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "ENG" + LANGUAGE_ENG = "ENG" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "CES" + LANGUAGE_CES = "CES" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "DAN" + LANGUAGE_DAN = "DAN" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "NLD" + LANGUAGE_NLD = "NLD" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "FIN" + LANGUAGE_FIN = "FIN" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "FRA" + LANGUAGE_FRA = "FRA" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "DEU" + LANGUAGE_DEU = "DEU" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "ELL" + LANGUAGE_ELL = "ELL" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "HUN" + LANGUAGE_HUN = "HUN" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "ITA" + LANGUAGE_ITA = "ITA" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "NOR" + LANGUAGE_NOR = "NOR" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "POL" + LANGUAGE_POL = "POL" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "POR" + LANGUAGE_POR = "POR" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "RON" + LANGUAGE_RON = "RON" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "RUS" + LANGUAGE_RUS = "RUS" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "SLK" + LANGUAGE_SLK = "SLK" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "SPA" + LANGUAGE_SPA = "SPA" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "SWE" + LANGUAGE_SWE = "SWE" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "TUR" + LANGUAGE_TUR = "TUR" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "ARA" + LANGUAGE_ARA = "ARA" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "CHI_SIM" + LANGUAGE_CHI_SIM = "CHI_SIM" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "HIN" + LANGUAGE_HIN = "HIN" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "JPN" + LANGUAGE_JPN = "JPN" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "KOR" + LANGUAGE_KOR = "KOR" + + #: A constant which can be used with the language property of a ImageTextDetectionFeature. + #: This constant has a value of "OTHERS" + LANGUAGE_OTHERS = "OTHERS" + + def __init__(self, **kwargs): + """ + Initializes a new ImageTextDetectionFeature object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ImageTextDetectionFeature.feature_type` attribute + of this class is ``TEXT_DETECTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param feature_type: + The value to assign to the feature_type property of this ImageTextDetectionFeature. + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", "TEXT_DETECTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type feature_type: str + + :param language: + The value to assign to the language property of this ImageTextDetectionFeature. + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type language: str + + """ + self.swagger_types = { + 'feature_type': 'str', + 'language': 'str' + } + + self.attribute_map = { + 'feature_type': 'featureType', + 'language': 'language' + } + + self._feature_type = None + self._language = None + self._feature_type = 'TEXT_DETECTION' + + @property + def language(self): + """ + Gets the language of this ImageTextDetectionFeature. + Language of the document image, abbreviated according to ISO 639-2. + + Allowed values for this property are: "ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The language of this ImageTextDetectionFeature. + :rtype: str + """ + return self._language + + @language.setter + def language(self, language): + """ + Sets the language of this ImageTextDetectionFeature. + Language of the document image, abbreviated according to ISO 639-2. + + + :param language: The language of this ImageTextDetectionFeature. + :type: str + """ + allowed_values = ["ENG", "CES", "DAN", "NLD", "FIN", "FRA", "DEU", "ELL", "HUN", "ITA", "NOR", "POL", "POR", "RON", "RUS", "SLK", "SPA", "SWE", "TUR", "ARA", "CHI_SIM", "HIN", "JPN", "KOR", "OTHERS"] + if not value_allowed_none_or_none_sentinel(language, allowed_values): + language = 'UNKNOWN_ENUM_VALUE' + self._language = language + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/inline_document_details.py b/src/oci/ai_vision/models/inline_document_details.py new file mode 100644 index 0000000000..a7362b5e71 --- /dev/null +++ b/src/oci/ai_vision/models/inline_document_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_details import DocumentDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InlineDocumentDetails(DocumentDetails): + """ + Document incorporated in the request payload. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InlineDocumentDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.InlineDocumentDetails.source` attribute + of this class is ``INLINE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source: + The value to assign to the source property of this InlineDocumentDetails. + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + :type source: str + + :param data: + The value to assign to the data property of this InlineDocumentDetails. + :type data: str + + """ + self.swagger_types = { + 'source': 'str', + 'data': 'str' + } + + self.attribute_map = { + 'source': 'source', + 'data': 'data' + } + + self._source = None + self._data = None + self._source = 'INLINE' + + @property + def data(self): + """ + **[Required]** Gets the data of this InlineDocumentDetails. + Document raw data. + + + :return: The data of this InlineDocumentDetails. + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this InlineDocumentDetails. + Document raw data. + + + :param data: The data of this InlineDocumentDetails. + :type: str + """ + self._data = data + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/inline_image_details.py b/src/oci/ai_vision/models/inline_image_details.py new file mode 100644 index 0000000000..2d8af502ae --- /dev/null +++ b/src/oci/ai_vision/models/inline_image_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .image_details import ImageDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InlineImageDetails(ImageDetails): + """ + Image incorporated in the request payload. + """ + + def __init__(self, **kwargs): + """ + Initializes a new InlineImageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.InlineImageDetails.source` attribute + of this class is ``INLINE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source: + The value to assign to the source property of this InlineImageDetails. + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + :type source: str + + :param data: + The value to assign to the data property of this InlineImageDetails. + :type data: str + + """ + self.swagger_types = { + 'source': 'str', + 'data': 'str' + } + + self.attribute_map = { + 'source': 'source', + 'data': 'data' + } + + self._source = None + self._data = None + self._source = 'INLINE' + + @property + def data(self): + """ + **[Required]** Gets the data of this InlineImageDetails. + Image raw data. + + + :return: The data of this InlineImageDetails. + :rtype: str + """ + return self._data + + @data.setter + def data(self, data): + """ + Sets the data of this InlineImageDetails. + Image raw data. + + + :param data: The data of this InlineImageDetails. + :type: str + """ + self._data = data + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/input_location.py b/src/oci/ai_vision/models/input_location.py new file mode 100644 index 0000000000..5664f5b7d1 --- /dev/null +++ b/src/oci/ai_vision/models/input_location.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class InputLocation(object): + """ + The location of the input(s). + """ + + #: A constant which can be used with the source_type property of a InputLocation. + #: This constant has a value of "OBJECT_LIST_INLINE_INPUT_LOCATION" + SOURCE_TYPE_OBJECT_LIST_INLINE_INPUT_LOCATION = "OBJECT_LIST_INLINE_INPUT_LOCATION" + + 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_vision.models.ObjectListInlineInputLocation` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this InputLocation. + Allowed values for this property are: "OBJECT_LIST_INLINE_INPUT_LOCATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source_type: str + + """ + self.swagger_types = { + 'source_type': 'str' + } + + self.attribute_map = { + 'source_type': 'sourceType' + } + + self._source_type = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['sourceType'] + + if type == 'OBJECT_LIST_INLINE_INPUT_LOCATION': + return 'ObjectListInlineInputLocation' + else: + return 'InputLocation' + + @property + def source_type(self): + """ + **[Required]** Gets the source_type of this InputLocation. + The type of input location + Allowed values are: + - `OBJECT_LIST_INLINE_INPUT_LOCATION`: A list of object locations in Object Storage. + + Allowed values for this property are: "OBJECT_LIST_INLINE_INPUT_LOCATION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source_type of this InputLocation. + :rtype: str + """ + return self._source_type + + @source_type.setter + def source_type(self, source_type): + """ + Sets the source_type of this InputLocation. + The type of input location + Allowed values are: + - `OBJECT_LIST_INLINE_INPUT_LOCATION`: A list of object locations in Object Storage. + + + :param source_type: The source_type of this InputLocation. + :type: str + """ + allowed_values = ["OBJECT_LIST_INLINE_INPUT_LOCATION"] + if not value_allowed_none_or_none_sentinel(source_type, allowed_values): + source_type = 'UNKNOWN_ENUM_VALUE' + self._source_type = source_type + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/label.py b/src/oci/ai_vision/models/label.py new file mode 100644 index 0000000000..5719e305a3 --- /dev/null +++ b/src/oci/ai_vision/models/label.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Label(object): + """ + A label describing an image. Every label returned by the pre-deployed model will be in English. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Label object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this Label. + :type name: str + + :param confidence: + The value to assign to the confidence property of this Label. + :type confidence: float + + """ + self.swagger_types = { + 'name': 'str', + 'confidence': 'float' + } + + self.attribute_map = { + 'name': 'name', + 'confidence': 'confidence' + } + + self._name = None + self._confidence = None + + @property + def name(self): + """ + **[Required]** Gets the name of this Label. + Classification catagory label name. + + + :return: The name of this Label. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Label. + Classification catagory label name. + + + :param name: The name of this Label. + :type: str + """ + self._name = name + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this Label. + Confidence score between 0 to 1. + + + :return: The confidence of this Label. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this Label. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this Label. + :type: float + """ + self._confidence = confidence + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/line.py b/src/oci/ai_vision/models/line.py new file mode 100644 index 0000000000..4aef51f8ae --- /dev/null +++ b/src/oci/ai_vision/models/line.py @@ -0,0 +1,159 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Line(object): + """ + Line of text. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Line object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param text: + The value to assign to the text property of this Line. + :type text: str + + :param confidence: + The value to assign to the confidence property of this Line. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this Line. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this Line. + :type word_indexes: list[int] + + """ + self.swagger_types = { + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]' + } + + self.attribute_map = { + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes' + } + + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + + @property + def text(self): + """ + **[Required]** Gets the text of this Line. + Text recognized. + + + :return: The text of this Line. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """ + Sets the text of this Line. + Text recognized. + + + :param text: The text of this Line. + :type: str + """ + self._text = text + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this Line. + Confidence score between 0 to 1. + + + :return: The confidence of this Line. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this Line. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this Line. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + **[Required]** Gets the bounding_polygon of this Line. + + :return: The bounding_polygon of this Line. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this Line. + + :param bounding_polygon: The bounding_polygon of this Line. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + @property + def word_indexes(self): + """ + **[Required]** Gets the word_indexes of this Line. + Array of words. + + + :return: The word_indexes of this Line. + :rtype: list[int] + """ + return self._word_indexes + + @word_indexes.setter + def word_indexes(self, word_indexes): + """ + Sets the word_indexes of this Line. + Array of words. + + + :param word_indexes: The word_indexes of this Line. + :type: list[int] + """ + self._word_indexes = word_indexes + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/model.py b/src/oci/ai_vision/models/model.py new file mode 100644 index 0000000000..e6c3dd1517 --- /dev/null +++ b/src/oci/ai_vision/models/model.py @@ -0,0 +1,922 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Model(object): + """ + Machine-learned Model. + """ + + #: A constant which can be used with the model_type property of a Model. + #: This constant has a value of "IMAGE_CLASSIFICATION" + MODEL_TYPE_IMAGE_CLASSIFICATION = "IMAGE_CLASSIFICATION" + + #: A constant which can be used with the model_type property of a Model. + #: This constant has a value of "OBJECT_DETECTION" + MODEL_TYPE_OBJECT_DETECTION = "OBJECT_DETECTION" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Model. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Model object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this Model. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Model. + :type display_name: str + + :param description: + The value to assign to the description property of this Model. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this Model. + :type compartment_id: str + + :param model_type: + The value to assign to the model_type property of this Model. + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type model_type: str + + :param is_quick_mode: + The value to assign to the is_quick_mode property of this Model. + :type is_quick_mode: bool + + :param max_training_duration_in_hours: + The value to assign to the max_training_duration_in_hours property of this Model. + :type max_training_duration_in_hours: float + + :param trained_duration_in_hours: + The value to assign to the trained_duration_in_hours property of this Model. + :type trained_duration_in_hours: float + + :param training_dataset: + The value to assign to the training_dataset property of this Model. + :type training_dataset: oci.ai_vision.models.Dataset + + :param testing_dataset: + The value to assign to the testing_dataset property of this Model. + :type testing_dataset: oci.ai_vision.models.Dataset + + :param validation_dataset: + The value to assign to the validation_dataset property of this Model. + :type validation_dataset: oci.ai_vision.models.Dataset + + :param model_version: + The value to assign to the model_version property of this Model. + :type model_version: str + + :param project_id: + The value to assign to the project_id property of this Model. + :type project_id: str + + :param time_created: + The value to assign to the time_created property of this Model. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Model. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Model. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Model. + :type lifecycle_details: str + + :param precision: + The value to assign to the precision property of this Model. + :type precision: float + + :param recall: + The value to assign to the recall property of this Model. + :type recall: float + + :param average_precision: + The value to assign to the average_precision property of this Model. + :type average_precision: float + + :param confidence_threshold: + The value to assign to the confidence_threshold property of this Model. + :type confidence_threshold: float + + :param total_image_count: + The value to assign to the total_image_count property of this Model. + :type total_image_count: int + + :param test_image_count: + The value to assign to the test_image_count property of this Model. + :type test_image_count: int + + :param metrics: + The value to assign to the metrics property of this Model. + :type metrics: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Model. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Model. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Model. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'model_type': 'str', + 'is_quick_mode': 'bool', + 'max_training_duration_in_hours': 'float', + 'trained_duration_in_hours': 'float', + 'training_dataset': 'Dataset', + 'testing_dataset': 'Dataset', + 'validation_dataset': 'Dataset', + 'model_version': 'str', + 'project_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'precision': 'float', + 'recall': 'float', + 'average_precision': 'float', + 'confidence_threshold': 'float', + 'total_image_count': 'int', + 'test_image_count': 'int', + 'metrics': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'model_type': 'modelType', + 'is_quick_mode': 'isQuickMode', + 'max_training_duration_in_hours': 'maxTrainingDurationInHours', + 'trained_duration_in_hours': 'trainedDurationInHours', + 'training_dataset': 'trainingDataset', + 'testing_dataset': 'testingDataset', + 'validation_dataset': 'validationDataset', + 'model_version': 'modelVersion', + 'project_id': 'projectId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'precision': 'precision', + 'recall': 'recall', + 'average_precision': 'averagePrecision', + 'confidence_threshold': 'confidenceThreshold', + 'total_image_count': 'totalImageCount', + 'test_image_count': 'testImageCount', + 'metrics': 'metrics', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._model_type = None + self._is_quick_mode = None + self._max_training_duration_in_hours = None + self._trained_duration_in_hours = None + self._training_dataset = None + self._testing_dataset = None + self._validation_dataset = None + self._model_version = None + self._project_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._precision = None + self._recall = None + self._average_precision = None + self._confidence_threshold = None + self._total_image_count = None + self._test_image_count = None + self._metrics = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Model. + Unique identifier that is immutable after creation. + + + :return: The id of this Model. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Model. + Unique identifier that is immutable after creation. + + + :param id: The id of this Model. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Model. + Human-friendly name for the model, which can be changed. + + + :return: The display_name of this Model. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Model. + Human-friendly name for the model, which can be changed. + + + :param display_name: The display_name of this Model. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Model. + Optional description of the model. + + + :return: The description of this Model. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Model. + Optional description of the model. + + + :param description: The description of this Model. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Model. + Compartment identifier. + + + :return: The compartment_id of this Model. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Model. + Compartment identifier. + + + :param compartment_id: The compartment_id of this Model. + :type: str + """ + self._compartment_id = compartment_id + + @property + def model_type(self): + """ + **[Required]** Gets the model_type of this Model. + What type of Vision model this is. + + Allowed values for this property are: "IMAGE_CLASSIFICATION", "OBJECT_DETECTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The model_type of this Model. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this Model. + What type of Vision model this is. + + + :param model_type: The model_type of this Model. + :type: str + """ + allowed_values = ["IMAGE_CLASSIFICATION", "OBJECT_DETECTION"] + if not value_allowed_none_or_none_sentinel(model_type, allowed_values): + model_type = 'UNKNOWN_ENUM_VALUE' + self._model_type = model_type + + @property + def is_quick_mode(self): + """ + Gets the is_quick_mode of this Model. + Set to true when experimenting with a new model type or dataset so model training is quick, with a predefined low number of passes through the training data. + + + :return: The is_quick_mode of this Model. + :rtype: bool + """ + return self._is_quick_mode + + @is_quick_mode.setter + def is_quick_mode(self, is_quick_mode): + """ + Sets the is_quick_mode of this Model. + Set to true when experimenting with a new model type or dataset so model training is quick, with a predefined low number of passes through the training data. + + + :param is_quick_mode: The is_quick_mode of this Model. + :type: bool + """ + self._is_quick_mode = is_quick_mode + + @property + def max_training_duration_in_hours(self): + """ + Gets the max_training_duration_in_hours of this Model. + Maximum model training duration in hours, expressed as a decimal fraction. + + + :return: The max_training_duration_in_hours of this Model. + :rtype: float + """ + return self._max_training_duration_in_hours + + @max_training_duration_in_hours.setter + def max_training_duration_in_hours(self, max_training_duration_in_hours): + """ + Sets the max_training_duration_in_hours of this Model. + Maximum model training duration in hours, expressed as a decimal fraction. + + + :param max_training_duration_in_hours: The max_training_duration_in_hours of this Model. + :type: float + """ + self._max_training_duration_in_hours = max_training_duration_in_hours + + @property + def trained_duration_in_hours(self): + """ + Gets the trained_duration_in_hours of this Model. + Total hours actually used for model training. + + + :return: The trained_duration_in_hours of this Model. + :rtype: float + """ + return self._trained_duration_in_hours + + @trained_duration_in_hours.setter + def trained_duration_in_hours(self, trained_duration_in_hours): + """ + Sets the trained_duration_in_hours of this Model. + Total hours actually used for model training. + + + :param trained_duration_in_hours: The trained_duration_in_hours of this Model. + :type: float + """ + self._trained_duration_in_hours = trained_duration_in_hours + + @property + def training_dataset(self): + """ + **[Required]** Gets the training_dataset of this Model. + + :return: The training_dataset of this Model. + :rtype: oci.ai_vision.models.Dataset + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this Model. + + :param training_dataset: The training_dataset of this Model. + :type: oci.ai_vision.models.Dataset + """ + self._training_dataset = training_dataset + + @property + def testing_dataset(self): + """ + Gets the testing_dataset of this Model. + + :return: The testing_dataset of this Model. + :rtype: oci.ai_vision.models.Dataset + """ + return self._testing_dataset + + @testing_dataset.setter + def testing_dataset(self, testing_dataset): + """ + Sets the testing_dataset of this Model. + + :param testing_dataset: The testing_dataset of this Model. + :type: oci.ai_vision.models.Dataset + """ + self._testing_dataset = testing_dataset + + @property + def validation_dataset(self): + """ + Gets the validation_dataset of this Model. + + :return: The validation_dataset of this Model. + :rtype: oci.ai_vision.models.Dataset + """ + return self._validation_dataset + + @validation_dataset.setter + def validation_dataset(self, validation_dataset): + """ + Sets the validation_dataset of this Model. + + :param validation_dataset: The validation_dataset of this Model. + :type: oci.ai_vision.models.Dataset + """ + self._validation_dataset = validation_dataset + + @property + def model_version(self): + """ + **[Required]** Gets the model_version of this Model. + The version of the model. + + + :return: The model_version of this Model. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this Model. + The version of the model. + + + :param model_version: The model_version of this Model. + :type: str + """ + self._model_version = model_version + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this Model. + The `OCID`__ of the project which contains the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this Model. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this Model. + The `OCID`__ of the project which contains the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this Model. + :type: str + """ + self._project_id = project_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Model. + When the model was created, as an RFC3339 datetime string. + + + :return: The time_created of this Model. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Model. + When the model was created, as an RFC3339 datetime string. + + + :param time_created: The time_created of this Model. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Model. + When the model was updated, as an RFC3339 datetime string. + + + :return: The time_updated of this Model. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Model. + When the model was updated, as an RFC3339 datetime string. + + + :param time_updated: The time_updated of this Model. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Model. + Current state of the model. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Model. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Model. + Current state of the model. + + + :param lifecycle_state: The lifecycle_state of this Model. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Model. + A message describing the current state in more detail which can provide actionable information if training failed. + + + :return: The lifecycle_details of this Model. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Model. + A message describing the current state in more detail which can provide actionable information if training failed. + + + :param lifecycle_details: The lifecycle_details of this Model. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def precision(self): + """ + Gets the precision of this Model. + Precision of the trained model. + + + :return: The precision of this Model. + :rtype: float + """ + return self._precision + + @precision.setter + def precision(self, precision): + """ + Sets the precision of this Model. + Precision of the trained model. + + + :param precision: The precision of this Model. + :type: float + """ + self._precision = precision + + @property + def recall(self): + """ + Gets the recall of this Model. + Recall of the trained model. + + + :return: The recall of this Model. + :rtype: float + """ + return self._recall + + @recall.setter + def recall(self, recall): + """ + Sets the recall of this Model. + Recall of the trained model. + + + :param recall: The recall of this Model. + :type: float + """ + self._recall = recall + + @property + def average_precision(self): + """ + Gets the average_precision of this Model. + Mean average precision of the trained model. + + + :return: The average_precision of this Model. + :rtype: float + """ + return self._average_precision + + @average_precision.setter + def average_precision(self, average_precision): + """ + Sets the average_precision of this Model. + Mean average precision of the trained model. + + + :param average_precision: The average_precision of this Model. + :type: float + """ + self._average_precision = average_precision + + @property + def confidence_threshold(self): + """ + Gets the confidence_threshold of this Model. + Intersection over union threshold used for calculating precision and recall. + + + :return: The confidence_threshold of this Model. + :rtype: float + """ + return self._confidence_threshold + + @confidence_threshold.setter + def confidence_threshold(self, confidence_threshold): + """ + Sets the confidence_threshold of this Model. + Intersection over union threshold used for calculating precision and recall. + + + :param confidence_threshold: The confidence_threshold of this Model. + :type: float + """ + self._confidence_threshold = confidence_threshold + + @property + def total_image_count(self): + """ + Gets the total_image_count of this Model. + Number of images in the dataset used to train, validate, and test the model. + + + :return: The total_image_count of this Model. + :rtype: int + """ + return self._total_image_count + + @total_image_count.setter + def total_image_count(self, total_image_count): + """ + Sets the total_image_count of this Model. + Number of images in the dataset used to train, validate, and test the model. + + + :param total_image_count: The total_image_count of this Model. + :type: int + """ + self._total_image_count = total_image_count + + @property + def test_image_count(self): + """ + Gets the test_image_count of this Model. + Number of images set aside for evaluating model performance metrics after training. + + + :return: The test_image_count of this Model. + :rtype: int + """ + return self._test_image_count + + @test_image_count.setter + def test_image_count(self, test_image_count): + """ + Sets the test_image_count of this Model. + Number of images set aside for evaluating model performance metrics after training. + + + :param test_image_count: The test_image_count of this Model. + :type: int + """ + self._test_image_count = test_image_count + + @property + def metrics(self): + """ + Gets the metrics of this Model. + Complete set of per-label metrics for successfully trained model. + + + :return: The metrics of this Model. + :rtype: str + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """ + Sets the metrics of this Model. + Complete set of per-label metrics for successfully trained model. + + + :param metrics: The metrics of this Model. + :type: str + """ + self._metrics = metrics + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Model. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this Model. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Model. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this Model. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Model. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this Model. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Model. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this Model. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Model. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this Model. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Model. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this Model. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/model_collection.py b/src/oci/ai_vision/models/model_collection.py new file mode 100644 index 0000000000..4c3cd0f9ae --- /dev/null +++ b/src/oci/ai_vision/models/model_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModelCollection(object): + """ + Results of a model search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelCollection 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 ModelCollection. + :type items: list[oci.ai_vision.models.ModelSummary] + + """ + self.swagger_types = { + 'items': 'list[ModelSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ModelCollection. + List of models. + + + :return: The items of this ModelCollection. + :rtype: list[oci.ai_vision.models.ModelSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ModelCollection. + List of models. + + + :param items: The items of this ModelCollection. + :type: list[oci.ai_vision.models.ModelSummary] + """ + 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_vision/models/model_summary.py b/src/oci/ai_vision/models/model_summary.py new file mode 100644 index 0000000000..a8ad9d21f5 --- /dev/null +++ b/src/oci/ai_vision/models/model_summary.py @@ -0,0 +1,595 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModelSummary(object): + """ + Metadata about the model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModelSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this ModelSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this ModelSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this ModelSummary. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this ModelSummary. + :type compartment_id: str + + :param model_type: + The value to assign to the model_type property of this ModelSummary. + :type model_type: str + + :param model_version: + The value to assign to the model_version property of this ModelSummary. + :type model_version: str + + :param project_id: + The value to assign to the project_id property of this ModelSummary. + :type project_id: str + + :param time_created: + The value to assign to the time_created property of this ModelSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ModelSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ModelSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ModelSummary. + :type lifecycle_details: str + + :param precision: + The value to assign to the precision property of this ModelSummary. + :type precision: float + + :param training_dataset: + The value to assign to the training_dataset property of this ModelSummary. + :type training_dataset: oci.ai_vision.models.Dataset + + :param testing_dataset: + The value to assign to the testing_dataset property of this ModelSummary. + :type testing_dataset: oci.ai_vision.models.Dataset + + :param validation_dataset: + The value to assign to the validation_dataset property of this ModelSummary. + :type validation_dataset: oci.ai_vision.models.Dataset + + :param freeform_tags: + The value to assign to the freeform_tags property of this ModelSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ModelSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ModelSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'model_type': 'str', + 'model_version': 'str', + 'project_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'precision': 'float', + 'training_dataset': 'Dataset', + 'testing_dataset': 'Dataset', + 'validation_dataset': 'Dataset', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'model_type': 'modelType', + 'model_version': 'modelVersion', + 'project_id': 'projectId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'precision': 'precision', + 'training_dataset': 'trainingDataset', + 'testing_dataset': 'testingDataset', + 'validation_dataset': 'validationDataset', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._model_type = None + self._model_version = None + self._project_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._precision = None + self._training_dataset = None + self._testing_dataset = None + self._validation_dataset = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ModelSummary. + Unique identifier that is immutable after creation. + + + :return: The id of this ModelSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ModelSummary. + Unique identifier that is immutable after creation. + + + :param id: The id of this ModelSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this ModelSummary. + Human-friendly name for the model, which can be changed. + + + :return: The display_name of this ModelSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ModelSummary. + Human-friendly name for the model, which can be changed. + + + :param display_name: The display_name of this ModelSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this ModelSummary. + Optional description of the model. + + + :return: The description of this ModelSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ModelSummary. + Optional description of the model. + + + :param description: The description of this ModelSummary. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ModelSummary. + Compartment identifier. + + + :return: The compartment_id of this ModelSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ModelSummary. + Compartment identifier. + + + :param compartment_id: The compartment_id of this ModelSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def model_type(self): + """ + **[Required]** Gets the model_type of this ModelSummary. + What type of Vision model this is. + + + :return: The model_type of this ModelSummary. + :rtype: str + """ + return self._model_type + + @model_type.setter + def model_type(self, model_type): + """ + Sets the model_type of this ModelSummary. + What type of Vision model this is. + + + :param model_type: The model_type of this ModelSummary. + :type: str + """ + self._model_type = model_type + + @property + def model_version(self): + """ + **[Required]** Gets the model_version of this ModelSummary. + The version of the model. + + + :return: The model_version of this ModelSummary. + :rtype: str + """ + return self._model_version + + @model_version.setter + def model_version(self, model_version): + """ + Sets the model_version of this ModelSummary. + The version of the model. + + + :param model_version: The model_version of this ModelSummary. + :type: str + """ + self._model_version = model_version + + @property + def project_id(self): + """ + **[Required]** Gets the project_id of this ModelSummary. + The `OCID`__ of the project which contains the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :return: The project_id of this ModelSummary. + :rtype: str + """ + return self._project_id + + @project_id.setter + def project_id(self, project_id): + """ + Sets the project_id of this ModelSummary. + The `OCID`__ of the project which contains the model. + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm + + + :param project_id: The project_id of this ModelSummary. + :type: str + """ + self._project_id = project_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ModelSummary. + When the model was created, as an RFC3339 datetime string. + + + :return: The time_created of this ModelSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ModelSummary. + When the model was created, as an RFC3339 datetime string. + + + :param time_created: The time_created of this ModelSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ModelSummary. + When the model was modified, as an RFC3339 datetime string. + + + :return: The time_updated of this ModelSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ModelSummary. + When the model was modified, as an RFC3339 datetime string. + + + :param time_updated: The time_updated of this ModelSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ModelSummary. + The current state of the model. + + + :return: The lifecycle_state of this ModelSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ModelSummary. + The current state of the model. + + + :param lifecycle_state: The lifecycle_state of this ModelSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ModelSummary. + A message describing the current state in more detail which can provide actionable information if training failed. + + + :return: The lifecycle_details of this ModelSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ModelSummary. + A message describing the current state in more detail which can provide actionable information if training failed. + + + :param lifecycle_details: The lifecycle_details of this ModelSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def precision(self): + """ + Gets the precision of this ModelSummary. + Precision of the trained model. + + + :return: The precision of this ModelSummary. + :rtype: float + """ + return self._precision + + @precision.setter + def precision(self, precision): + """ + Sets the precision of this ModelSummary. + Precision of the trained model. + + + :param precision: The precision of this ModelSummary. + :type: float + """ + self._precision = precision + + @property + def training_dataset(self): + """ + Gets the training_dataset of this ModelSummary. + + :return: The training_dataset of this ModelSummary. + :rtype: oci.ai_vision.models.Dataset + """ + return self._training_dataset + + @training_dataset.setter + def training_dataset(self, training_dataset): + """ + Sets the training_dataset of this ModelSummary. + + :param training_dataset: The training_dataset of this ModelSummary. + :type: oci.ai_vision.models.Dataset + """ + self._training_dataset = training_dataset + + @property + def testing_dataset(self): + """ + Gets the testing_dataset of this ModelSummary. + + :return: The testing_dataset of this ModelSummary. + :rtype: oci.ai_vision.models.Dataset + """ + return self._testing_dataset + + @testing_dataset.setter + def testing_dataset(self, testing_dataset): + """ + Sets the testing_dataset of this ModelSummary. + + :param testing_dataset: The testing_dataset of this ModelSummary. + :type: oci.ai_vision.models.Dataset + """ + self._testing_dataset = testing_dataset + + @property + def validation_dataset(self): + """ + Gets the validation_dataset of this ModelSummary. + + :return: The validation_dataset of this ModelSummary. + :rtype: oci.ai_vision.models.Dataset + """ + return self._validation_dataset + + @validation_dataset.setter + def validation_dataset(self, validation_dataset): + """ + Sets the validation_dataset of this ModelSummary. + + :param validation_dataset: The validation_dataset of this ModelSummary. + :type: oci.ai_vision.models.Dataset + """ + self._validation_dataset = validation_dataset + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ModelSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this ModelSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ModelSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this ModelSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this ModelSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this ModelSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ModelSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ModelSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ModelSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ModelSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/normalized_vertex.py b/src/oci/ai_vision/models/normalized_vertex.py new file mode 100644 index 0000000000..7c2394b307 --- /dev/null +++ b/src/oci/ai_vision/models/normalized_vertex.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NormalizedVertex(object): + """ + An (x, y) coordinate in the image with dimensions normalized from zero to one. + The origin is at top left, with the positive x-axis pointing right and the positive y-axis pointing down. + The bottom right corner is at (1, 1). + """ + + def __init__(self, **kwargs): + """ + Initializes a new NormalizedVertex object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param x: + The value to assign to the x property of this NormalizedVertex. + :type x: float + + :param y: + The value to assign to the y property of this NormalizedVertex. + :type y: float + + """ + self.swagger_types = { + 'x': 'float', + 'y': 'float' + } + + self.attribute_map = { + 'x': 'x', + 'y': 'y' + } + + self._x = None + self._y = None + + @property + def x(self): + """ + **[Required]** Gets the x of this NormalizedVertex. + X axis normalized coordinate. + + + :return: The x of this NormalizedVertex. + :rtype: float + """ + return self._x + + @x.setter + def x(self, x): + """ + Sets the x of this NormalizedVertex. + X axis normalized coordinate. + + + :param x: The x of this NormalizedVertex. + :type: float + """ + self._x = x + + @property + def y(self): + """ + **[Required]** Gets the y of this NormalizedVertex. + Y axis normalized coordinate. + + + :return: The y of this NormalizedVertex. + :rtype: float + """ + return self._y + + @y.setter + def y(self, y): + """ + Sets the y of this NormalizedVertex. + Y axis normalized coordinate. + + + :param y: The y of this NormalizedVertex. + :type: float + """ + self._y = y + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/object_list_inline_input_location.py b/src/oci/ai_vision/models/object_list_inline_input_location.py new file mode 100644 index 0000000000..708c7e0ab7 --- /dev/null +++ b/src/oci/ai_vision/models/object_list_inline_input_location.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +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 ObjectListInlineInputLocation(InputLocation): + """ + A list of object locations in Object Storage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectListInlineInputLocation object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ObjectListInlineInputLocation.source_type` attribute + of this class is ``OBJECT_LIST_INLINE_INPUT_LOCATION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source_type: + The value to assign to the source_type property of this ObjectListInlineInputLocation. + Allowed values for this property are: "OBJECT_LIST_INLINE_INPUT_LOCATION" + :type source_type: str + + :param object_locations: + The value to assign to the object_locations property of this ObjectListInlineInputLocation. + :type object_locations: list[oci.ai_vision.models.ObjectLocation] + + """ + self.swagger_types = { + 'source_type': 'str', + 'object_locations': 'list[ObjectLocation]' + } + + self.attribute_map = { + 'source_type': 'sourceType', + 'object_locations': 'objectLocations' + } + + self._source_type = None + self._object_locations = None + self._source_type = 'OBJECT_LIST_INLINE_INPUT_LOCATION' + + @property + def object_locations(self): + """ + **[Required]** Gets the object_locations of this ObjectListInlineInputLocation. + List of ObjectLocations. + + + :return: The object_locations of this ObjectListInlineInputLocation. + :rtype: list[oci.ai_vision.models.ObjectLocation] + """ + return self._object_locations + + @object_locations.setter + def object_locations(self, object_locations): + """ + Sets the object_locations of this ObjectListInlineInputLocation. + List of ObjectLocations. + + + :param object_locations: The object_locations of this ObjectListInlineInputLocation. + :type: list[oci.ai_vision.models.ObjectLocation] + """ + self._object_locations = object_locations + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/object_location.py b/src/oci/ai_vision/models/object_location.py new file mode 100644 index 0000000000..3f403752f4 --- /dev/null +++ b/src/oci/ai_vision/models/object_location.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectLocation(object): + """ + A location in Object Storage that is uniquely identified by namespace name, bucket name and object name. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectLocation 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 ObjectLocation. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectLocation. + :type bucket_name: str + + :param object_name: + The value to assign to the object_name property of this ObjectLocation. + :type object_name: str + + """ + self.swagger_types = { + 'namespace_name': 'str', + 'bucket_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'object_name': 'objectName' + } + + self._namespace_name = None + self._bucket_name = None + self._object_name = None + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectLocation. + Object Storage namespace name. + + + :return: The namespace_name of this ObjectLocation. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectLocation. + Object Storage namespace name. + + + :param namespace_name: The namespace_name of this ObjectLocation. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectLocation. + Object Storage bucket name. + + + :return: The bucket_name of this ObjectLocation. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectLocation. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectLocation. + :type: str + """ + self._bucket_name = bucket_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this ObjectLocation. + Object Storage object name. + + + :return: The object_name of this ObjectLocation. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ObjectLocation. + Object Storage object name. + + + :param object_name: The object_name of this ObjectLocation. + :type: str + """ + self._object_name = object_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/ai_vision/models/object_storage_dataset.py b/src/oci/ai_vision/models/object_storage_dataset.py new file mode 100644 index 0000000000..5260f73e1c --- /dev/null +++ b/src/oci/ai_vision/models/object_storage_dataset.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .dataset import Dataset +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectStorageDataset(Dataset): + """ + Dataset that resides in OCI Object Storage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageDataset object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ObjectStorageDataset.dataset_type` attribute + of this class is ``OBJECT_STORAGE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dataset_type: + The value to assign to the dataset_type property of this ObjectStorageDataset. + Allowed values for this property are: "DATA_SCIENCE_LABELING", "OBJECT_STORAGE" + :type dataset_type: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectStorageDataset. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectStorageDataset. + :type bucket_name: str + + :param object_name: + The value to assign to the object_name property of this ObjectStorageDataset. + :type object_name: str + + """ + self.swagger_types = { + 'dataset_type': 'str', + 'namespace_name': 'str', + 'bucket_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'dataset_type': 'datasetType', + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'object_name': 'objectName' + } + + self._dataset_type = None + self._namespace_name = None + self._bucket_name = None + self._object_name = None + self._dataset_type = 'OBJECT_STORAGE' + + @property + def namespace_name(self): + """ + Gets the namespace_name of this ObjectStorageDataset. + The namespace name of the Object Storage bucket that contains the input data file. + + + :return: The namespace_name of this ObjectStorageDataset. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectStorageDataset. + The namespace name of the Object Storage bucket that contains the input data file. + + + :param namespace_name: The namespace_name of this ObjectStorageDataset. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + Gets the bucket_name of this ObjectStorageDataset. + The name of the Object Storage bucket that contains the input data file. + + + :return: The bucket_name of this ObjectStorageDataset. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectStorageDataset. + The name of the Object Storage bucket that contains the input data file. + + + :param bucket_name: The bucket_name of this ObjectStorageDataset. + :type: str + """ + self._bucket_name = bucket_name + + @property + def object_name(self): + """ + Gets the object_name of this ObjectStorageDataset. + The object name of the input data file. + + + :return: The object_name of this ObjectStorageDataset. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ObjectStorageDataset. + The object name of the input data file. + + + :param object_name: The object_name of this ObjectStorageDataset. + :type: str + """ + self._object_name = object_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/ai_vision/models/object_storage_document_details.py b/src/oci/ai_vision/models/object_storage_document_details.py new file mode 100644 index 0000000000..44353c8bd8 --- /dev/null +++ b/src/oci/ai_vision/models/object_storage_document_details.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .document_details import DocumentDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectStorageDocumentDetails(DocumentDetails): + """ + A document in OCI Object Storage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageDocumentDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ObjectStorageDocumentDetails.source` attribute + of this class is ``OBJECT_STORAGE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source: + The value to assign to the source property of this ObjectStorageDocumentDetails. + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + :type source: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectStorageDocumentDetails. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectStorageDocumentDetails. + :type bucket_name: str + + :param object_name: + The value to assign to the object_name property of this ObjectStorageDocumentDetails. + :type object_name: str + + """ + self.swagger_types = { + 'source': 'str', + 'namespace_name': 'str', + 'bucket_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'source': 'source', + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'object_name': 'objectName' + } + + self._source = None + self._namespace_name = None + self._bucket_name = None + self._object_name = None + self._source = 'OBJECT_STORAGE' + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectStorageDocumentDetails. + Object Storage namespace. + + + :return: The namespace_name of this ObjectStorageDocumentDetails. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectStorageDocumentDetails. + Object Storage namespace. + + + :param namespace_name: The namespace_name of this ObjectStorageDocumentDetails. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectStorageDocumentDetails. + Object Storage bucket name. + + + :return: The bucket_name of this ObjectStorageDocumentDetails. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectStorageDocumentDetails. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectStorageDocumentDetails. + :type: str + """ + self._bucket_name = bucket_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this ObjectStorageDocumentDetails. + Object Storage object name. + + + :return: The object_name of this ObjectStorageDocumentDetails. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ObjectStorageDocumentDetails. + Object Storage object name. + + + :param object_name: The object_name of this ObjectStorageDocumentDetails. + :type: str + """ + self._object_name = object_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/ai_vision/models/object_storage_image_details.py b/src/oci/ai_vision/models/object_storage_image_details.py new file mode 100644 index 0000000000..f4b5459806 --- /dev/null +++ b/src/oci/ai_vision/models/object_storage_image_details.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .image_details import ImageDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ObjectStorageImageDetails(ImageDetails): + """ + Image residing in OCI Object Storage. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ObjectStorageImageDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ObjectStorageImageDetails.source` attribute + of this class is ``OBJECT_STORAGE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param source: + The value to assign to the source property of this ObjectStorageImageDetails. + Allowed values for this property are: "INLINE", "OBJECT_STORAGE" + :type source: str + + :param namespace_name: + The value to assign to the namespace_name property of this ObjectStorageImageDetails. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this ObjectStorageImageDetails. + :type bucket_name: str + + :param object_name: + The value to assign to the object_name property of this ObjectStorageImageDetails. + :type object_name: str + + """ + self.swagger_types = { + 'source': 'str', + 'namespace_name': 'str', + 'bucket_name': 'str', + 'object_name': 'str' + } + + self.attribute_map = { + 'source': 'source', + 'namespace_name': 'namespaceName', + 'bucket_name': 'bucketName', + 'object_name': 'objectName' + } + + self._source = None + self._namespace_name = None + self._bucket_name = None + self._object_name = None + self._source = 'OBJECT_STORAGE' + + @property + def namespace_name(self): + """ + **[Required]** Gets the namespace_name of this ObjectStorageImageDetails. + Object Storage namespace. + + + :return: The namespace_name of this ObjectStorageImageDetails. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this ObjectStorageImageDetails. + Object Storage namespace. + + + :param namespace_name: The namespace_name of this ObjectStorageImageDetails. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this ObjectStorageImageDetails. + Object Storage bucket name. + + + :return: The bucket_name of this ObjectStorageImageDetails. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this ObjectStorageImageDetails. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this ObjectStorageImageDetails. + :type: str + """ + self._bucket_name = bucket_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this ObjectStorageImageDetails. + Object Storage object name. + + + :return: The object_name of this ObjectStorageImageDetails. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this ObjectStorageImageDetails. + Object Storage object name. + + + :param object_name: The object_name of this ObjectStorageImageDetails. + :type: str + """ + self._object_name = object_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/ai_vision/models/ontology_class.py b/src/oci/ai_vision/models/ontology_class.py new file mode 100644 index 0000000000..dfa840e405 --- /dev/null +++ b/src/oci/ai_vision/models/ontology_class.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class OntologyClass(object): + """ + Images and ImageObjects can be labeled with an OntologyClass. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OntologyClass object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this OntologyClass. + :type name: str + + :param parent_names: + The value to assign to the parent_names property of this OntologyClass. + :type parent_names: list[str] + + :param synonym_names: + The value to assign to the synonym_names property of this OntologyClass. + :type synonym_names: list[str] + + """ + self.swagger_types = { + 'name': 'str', + 'parent_names': 'list[str]', + 'synonym_names': 'list[str]' + } + + self.attribute_map = { + 'name': 'name', + 'parent_names': 'parentNames', + 'synonym_names': 'synonymNames' + } + + self._name = None + self._parent_names = None + self._synonym_names = None + + @property + def name(self): + """ + **[Required]** Gets the name of this OntologyClass. + Name of the label. + + + :return: The name of this OntologyClass. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this OntologyClass. + Name of the label. + + + :param name: The name of this OntologyClass. + :type: str + """ + self._name = name + + @property + def parent_names(self): + """ + Gets the parent_names of this OntologyClass. + Parents of the label. + + + :return: The parent_names of this OntologyClass. + :rtype: list[str] + """ + return self._parent_names + + @parent_names.setter + def parent_names(self, parent_names): + """ + Sets the parent_names of this OntologyClass. + Parents of the label. + + + :param parent_names: The parent_names of this OntologyClass. + :type: list[str] + """ + self._parent_names = parent_names + + @property + def synonym_names(self): + """ + Gets the synonym_names of this OntologyClass. + Synonyms of the label. + + + :return: The synonym_names of this OntologyClass. + :rtype: list[str] + """ + return self._synonym_names + + @synonym_names.setter + def synonym_names(self, synonym_names): + """ + Sets the synonym_names of this OntologyClass. + Synonyms of the label. + + + :param synonym_names: The synonym_names of this OntologyClass. + :type: list[str] + """ + self._synonym_names = synonym_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_vision/models/output_location.py b/src/oci/ai_vision/models/output_location.py new file mode 100644 index 0000000000..aadfd10771 --- /dev/null +++ b/src/oci/ai_vision/models/output_location.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class OutputLocation(object): + """ + OCI Object Storage Location. + """ + + def __init__(self, **kwargs): + """ + Initializes a new OutputLocation 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 OutputLocation. + :type namespace_name: str + + :param bucket_name: + The value to assign to the bucket_name property of this OutputLocation. + :type bucket_name: str + + :param prefix: + The value to assign to the prefix property of this OutputLocation. + :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 OutputLocation. + Object Storage namespace. + + + :return: The namespace_name of this OutputLocation. + :rtype: str + """ + return self._namespace_name + + @namespace_name.setter + def namespace_name(self, namespace_name): + """ + Sets the namespace_name of this OutputLocation. + Object Storage namespace. + + + :param namespace_name: The namespace_name of this OutputLocation. + :type: str + """ + self._namespace_name = namespace_name + + @property + def bucket_name(self): + """ + **[Required]** Gets the bucket_name of this OutputLocation. + Object Storage bucket name. + + + :return: The bucket_name of this OutputLocation. + :rtype: str + """ + return self._bucket_name + + @bucket_name.setter + def bucket_name(self, bucket_name): + """ + Sets the bucket_name of this OutputLocation. + Object Storage bucket name. + + + :param bucket_name: The bucket_name of this OutputLocation. + :type: str + """ + self._bucket_name = bucket_name + + @property + def prefix(self): + """ + **[Required]** Gets the prefix of this OutputLocation. + Object Storage folder name. + + + :return: The prefix of this OutputLocation. + :rtype: str + """ + return self._prefix + + @prefix.setter + def prefix(self, prefix): + """ + Sets the prefix of this OutputLocation. + Object Storage folder name. + + + :param prefix: The prefix of this OutputLocation. + :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_vision/models/page.py b/src/oci/ai_vision/models/page.py new file mode 100644 index 0000000000..89aa6ef30f --- /dev/null +++ b/src/oci/ai_vision/models/page.py @@ -0,0 +1,283 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Page(object): + """ + One page document analysis result. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Page object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param page_number: + The value to assign to the page_number property of this Page. + :type page_number: int + + :param dimensions: + The value to assign to the dimensions property of this Page. + :type dimensions: oci.ai_vision.models.Dimensions + + :param detected_document_types: + The value to assign to the detected_document_types property of this Page. + :type detected_document_types: list[oci.ai_vision.models.DetectedDocumentType] + + :param detected_languages: + The value to assign to the detected_languages property of this Page. + :type detected_languages: list[oci.ai_vision.models.DetectedLanguage] + + :param words: + The value to assign to the words property of this Page. + :type words: list[oci.ai_vision.models.Word] + + :param lines: + The value to assign to the lines property of this Page. + :type lines: list[oci.ai_vision.models.Line] + + :param tables: + The value to assign to the tables property of this Page. + :type tables: list[oci.ai_vision.models.Table] + + :param document_fields: + The value to assign to the document_fields property of this Page. + :type document_fields: list[oci.ai_vision.models.DocumentField] + + """ + self.swagger_types = { + 'page_number': 'int', + 'dimensions': 'Dimensions', + 'detected_document_types': 'list[DetectedDocumentType]', + 'detected_languages': 'list[DetectedLanguage]', + 'words': 'list[Word]', + 'lines': 'list[Line]', + 'tables': 'list[Table]', + 'document_fields': 'list[DocumentField]' + } + + self.attribute_map = { + 'page_number': 'pageNumber', + 'dimensions': 'dimensions', + 'detected_document_types': 'detectedDocumentTypes', + 'detected_languages': 'detectedLanguages', + 'words': 'words', + 'lines': 'lines', + 'tables': 'tables', + 'document_fields': 'documentFields' + } + + self._page_number = None + self._dimensions = None + self._detected_document_types = None + self._detected_languages = None + self._words = None + self._lines = None + self._tables = None + self._document_fields = None + + @property + def page_number(self): + """ + **[Required]** Gets the page_number of this Page. + Document page number. + + + :return: The page_number of this Page. + :rtype: int + """ + return self._page_number + + @page_number.setter + def page_number(self, page_number): + """ + Sets the page_number of this Page. + Document page number. + + + :param page_number: The page_number of this Page. + :type: int + """ + self._page_number = page_number + + @property + def dimensions(self): + """ + Gets the dimensions of this Page. + + :return: The dimensions of this Page. + :rtype: oci.ai_vision.models.Dimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this Page. + + :param dimensions: The dimensions of this Page. + :type: oci.ai_vision.models.Dimensions + """ + self._dimensions = dimensions + + @property + def detected_document_types(self): + """ + Gets the detected_document_types of this Page. + An array of detected document types. + + + :return: The detected_document_types of this Page. + :rtype: list[oci.ai_vision.models.DetectedDocumentType] + """ + return self._detected_document_types + + @detected_document_types.setter + def detected_document_types(self, detected_document_types): + """ + Sets the detected_document_types of this Page. + An array of detected document types. + + + :param detected_document_types: The detected_document_types of this Page. + :type: list[oci.ai_vision.models.DetectedDocumentType] + """ + self._detected_document_types = detected_document_types + + @property + def detected_languages(self): + """ + Gets the detected_languages of this Page. + An array of detected languages. + + + :return: The detected_languages of this Page. + :rtype: list[oci.ai_vision.models.DetectedLanguage] + """ + return self._detected_languages + + @detected_languages.setter + def detected_languages(self, detected_languages): + """ + Sets the detected_languages of this Page. + An array of detected languages. + + + :param detected_languages: The detected_languages of this Page. + :type: list[oci.ai_vision.models.DetectedLanguage] + """ + self._detected_languages = detected_languages + + @property + def words(self): + """ + Gets the words of this Page. + Words detected on the page. + + + :return: The words of this Page. + :rtype: list[oci.ai_vision.models.Word] + """ + return self._words + + @words.setter + def words(self, words): + """ + Sets the words of this Page. + Words detected on the page. + + + :param words: The words of this Page. + :type: list[oci.ai_vision.models.Word] + """ + self._words = words + + @property + def lines(self): + """ + Gets the lines of this Page. + Text lines detected on the page. + + + :return: The lines of this Page. + :rtype: list[oci.ai_vision.models.Line] + """ + return self._lines + + @lines.setter + def lines(self, lines): + """ + Sets the lines of this Page. + Text lines detected on the page. + + + :param lines: The lines of this Page. + :type: list[oci.ai_vision.models.Line] + """ + self._lines = lines + + @property + def tables(self): + """ + Gets the tables of this Page. + Tables detected on the page. + + + :return: The tables of this Page. + :rtype: list[oci.ai_vision.models.Table] + """ + return self._tables + + @tables.setter + def tables(self, tables): + """ + Sets the tables of this Page. + Tables detected on the page. + + + :param tables: The tables of this Page. + :type: list[oci.ai_vision.models.Table] + """ + self._tables = tables + + @property + def document_fields(self): + """ + Gets the document_fields of this Page. + Form fields detected on the page. + + + :return: The document_fields of this Page. + :rtype: list[oci.ai_vision.models.DocumentField] + """ + return self._document_fields + + @document_fields.setter + def document_fields(self, document_fields): + """ + Sets the document_fields of this Page. + Form fields detected on the page. + + + :param document_fields: The document_fields of this Page. + :type: list[oci.ai_vision.models.DocumentField] + """ + self._document_fields = document_fields + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/processing_error.py b/src/oci/ai_vision/models/processing_error.py new file mode 100644 index 0000000000..d087750431 --- /dev/null +++ b/src/oci/ai_vision/models/processing_error.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ProcessingError(object): + """ + Error in document processing. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProcessingError object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param code: + The value to assign to the code property of this ProcessingError. + :type code: str + + :param message: + The value to assign to the message property of this ProcessingError. + :type message: str + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message' + } + + self._code = None + self._message = None + + @property + def code(self): + """ + **[Required]** Gets the code of this ProcessingError. + Error code. + + + :return: The code of this ProcessingError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this ProcessingError. + Error code. + + + :param code: The code of this ProcessingError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this ProcessingError. + Error message. + + + :return: The message of this ProcessingError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this ProcessingError. + Error message. + + + :param message: The message of this ProcessingError. + :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/ai_vision/models/project.py b/src/oci/ai_vision/models/project.py new file mode 100644 index 0000000000..b87274e031 --- /dev/null +++ b/src/oci/ai_vision/models/project.py @@ -0,0 +1,418 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Project(object): + """ + A Vision Project which contains models. + """ + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a Project. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Project object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this Project. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Project. + :type display_name: str + + :param description: + The value to assign to the description property of this Project. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this Project. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this Project. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Project. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Project. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this Project. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Project. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Project. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Project. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Project. + Unique identifier that is immutable after creation. + + + :return: The id of this Project. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Project. + Unique identifier that is immutable after creation. + + + :param id: The id of this Project. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this Project. + Human-friendly name for the project, which can be changed. + + + :return: The display_name of this Project. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Project. + Human-friendly name for the project, which can be changed. + + + :param display_name: The display_name of this Project. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Project. + Optional description of the project. + + + :return: The description of this Project. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Project. + Optional description of the project. + + + :param description: The description of this Project. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Project. + Compartment identifier. + + + :return: The compartment_id of this Project. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Project. + Compartment identifier. + + + :param compartment_id: The compartment_id of this Project. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Project. + When the project was created, as an RFC3339 datetime string. + + + :return: The time_created of this Project. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Project. + When the project was created, as an RFC3339 datetime string. + + + :param time_created: The time_created of this Project. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this Project. + When the project was updated, as an RFC3339 datetime string. + + + :return: The time_updated of this Project. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Project. + When the project was updated, as an RFC3339 datetime string. + + + :param time_updated: The time_updated of this Project. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Project. + The current state of the project. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Project. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Project. + The current state of the project. + + + :param lifecycle_state: The lifecycle_state of this Project. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this Project. + A message describing the current state in more detail which can provide actionable information if creation failed. + + + :return: The lifecycle_details of this Project. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this Project. + A message describing the current state in more detail which can provide actionable information if creation failed. + + + :param lifecycle_details: The lifecycle_details of this Project. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Project. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this Project. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Project. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this Project. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Project. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this Project. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Project. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this Project. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Project. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this Project. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Project. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this Project. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/project_collection.py b/src/oci/ai_vision/models/project_collection.py new file mode 100644 index 0000000000..619921619b --- /dev/null +++ b/src/oci/ai_vision/models/project_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ProjectCollection(object): + """ + Results of a project search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProjectCollection 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 ProjectCollection. + :type items: list[oci.ai_vision.models.ProjectSummary] + + """ + self.swagger_types = { + 'items': 'list[ProjectSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ProjectCollection. + List of projects. + + + :return: The items of this ProjectCollection. + :rtype: list[oci.ai_vision.models.ProjectSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ProjectCollection. + List of projects. + + + :param items: The items of this ProjectCollection. + :type: list[oci.ai_vision.models.ProjectSummary] + """ + 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_vision/models/project_summary.py b/src/oci/ai_vision/models/project_summary.py new file mode 100644 index 0000000000..96454385c3 --- /dev/null +++ b/src/oci/ai_vision/models/project_summary.py @@ -0,0 +1,355 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ProjectSummary(object): + """ + Metadata about the project. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProjectSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this ProjectSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this ProjectSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this ProjectSummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this ProjectSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ProjectSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ProjectSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this ProjectSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ProjectSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ProjectSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ProjectSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ProjectSummary. + Unique identifier that is immutable after creation. + + + :return: The id of this ProjectSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ProjectSummary. + Unique identifier that is immutable after creation. + + + :param id: The id of this ProjectSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this ProjectSummary. + Human-friendly name for the project, which can be changed. + + + :return: The display_name of this ProjectSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ProjectSummary. + Human-friendly name for the project, which can be changed. + + + :param display_name: The display_name of this ProjectSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ProjectSummary. + Compartment identifier. + + + :return: The compartment_id of this ProjectSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ProjectSummary. + Compartment identifier. + + + :param compartment_id: The compartment_id of this ProjectSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ProjectSummary. + When the project was created, as an RFC3339 datetime string. + + + :return: The time_created of this ProjectSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ProjectSummary. + When the project was created, as an RFC3339 datetime string. + + + :param time_created: The time_created of this ProjectSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ProjectSummary. + When the project was created, as an RFC3339 datetime string. + + + :return: The time_updated of this ProjectSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ProjectSummary. + When the project was created, as an RFC3339 datetime string. + + + :param time_updated: The time_updated of this ProjectSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ProjectSummary. + The current state of the project. + + + :return: The lifecycle_state of this ProjectSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ProjectSummary. + The current state of the project. + + + :param lifecycle_state: The lifecycle_state of this ProjectSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this ProjectSummary. + A message describing the current state in more detail which can provide actionable information if creation failed. + + + :return: The lifecycle_details of this ProjectSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this ProjectSummary. + A message describing the current state in more detail which can provide actionable information if creation failed. + + + :param lifecycle_details: The lifecycle_details of this ProjectSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ProjectSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this ProjectSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ProjectSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this ProjectSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ProjectSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this ProjectSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ProjectSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this ProjectSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ProjectSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ProjectSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ProjectSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ProjectSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/table.py b/src/oci/ai_vision/models/table.py new file mode 100644 index 0000000000..4c193b032b --- /dev/null +++ b/src/oci/ai_vision/models/table.py @@ -0,0 +1,252 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Table(object): + """ + Table extracted from a document. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Table object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param row_count: + The value to assign to the row_count property of this Table. + :type row_count: int + + :param column_count: + The value to assign to the column_count property of this Table. + :type column_count: int + + :param header_rows: + The value to assign to the header_rows property of this Table. + :type header_rows: list[oci.ai_vision.models.TableRow] + + :param body_rows: + The value to assign to the body_rows property of this Table. + :type body_rows: list[oci.ai_vision.models.TableRow] + + :param footer_rows: + The value to assign to the footer_rows property of this Table. + :type footer_rows: list[oci.ai_vision.models.TableRow] + + :param confidence: + The value to assign to the confidence property of this Table. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this Table. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + """ + self.swagger_types = { + 'row_count': 'int', + 'column_count': 'int', + 'header_rows': 'list[TableRow]', + 'body_rows': 'list[TableRow]', + 'footer_rows': 'list[TableRow]', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon' + } + + self.attribute_map = { + 'row_count': 'rowCount', + 'column_count': 'columnCount', + 'header_rows': 'headerRows', + 'body_rows': 'bodyRows', + 'footer_rows': 'footerRows', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon' + } + + self._row_count = None + self._column_count = None + self._header_rows = None + self._body_rows = None + self._footer_rows = None + self._confidence = None + self._bounding_polygon = None + + @property + def row_count(self): + """ + **[Required]** Gets the row_count of this Table. + Number of rows. + + + :return: The row_count of this Table. + :rtype: int + """ + return self._row_count + + @row_count.setter + def row_count(self, row_count): + """ + Sets the row_count of this Table. + Number of rows. + + + :param row_count: The row_count of this Table. + :type: int + """ + self._row_count = row_count + + @property + def column_count(self): + """ + **[Required]** Gets the column_count of this Table. + Number of columns. + + + :return: The column_count of this Table. + :rtype: int + """ + return self._column_count + + @column_count.setter + def column_count(self, column_count): + """ + Sets the column_count of this Table. + Number of columns. + + + :param column_count: The column_count of this Table. + :type: int + """ + self._column_count = column_count + + @property + def header_rows(self): + """ + **[Required]** Gets the header_rows of this Table. + Header rows. + + + :return: The header_rows of this Table. + :rtype: list[oci.ai_vision.models.TableRow] + """ + return self._header_rows + + @header_rows.setter + def header_rows(self, header_rows): + """ + Sets the header_rows of this Table. + Header rows. + + + :param header_rows: The header_rows of this Table. + :type: list[oci.ai_vision.models.TableRow] + """ + self._header_rows = header_rows + + @property + def body_rows(self): + """ + **[Required]** Gets the body_rows of this Table. + Body rows. + + + :return: The body_rows of this Table. + :rtype: list[oci.ai_vision.models.TableRow] + """ + return self._body_rows + + @body_rows.setter + def body_rows(self, body_rows): + """ + Sets the body_rows of this Table. + Body rows. + + + :param body_rows: The body_rows of this Table. + :type: list[oci.ai_vision.models.TableRow] + """ + self._body_rows = body_rows + + @property + def footer_rows(self): + """ + **[Required]** Gets the footer_rows of this Table. + Footer rows. + + + :return: The footer_rows of this Table. + :rtype: list[oci.ai_vision.models.TableRow] + """ + return self._footer_rows + + @footer_rows.setter + def footer_rows(self, footer_rows): + """ + Sets the footer_rows of this Table. + Footer rows. + + + :param footer_rows: The footer_rows of this Table. + :type: list[oci.ai_vision.models.TableRow] + """ + self._footer_rows = footer_rows + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this Table. + Confidence score between 0 to 1. + + + :return: The confidence of this Table. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this Table. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this Table. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + **[Required]** Gets the bounding_polygon of this Table. + + :return: The bounding_polygon of this Table. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this Table. + + :param bounding_polygon: The bounding_polygon of this Table. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/table_row.py b/src/oci/ai_vision/models/table_row.py new file mode 100644 index 0000000000..e413eb2269 --- /dev/null +++ b/src/oci/ai_vision/models/table_row.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TableRow(object): + """ + A single row in a table. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TableRow object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param cells: + The value to assign to the cells property of this TableRow. + :type cells: list[oci.ai_vision.models.Cell] + + """ + self.swagger_types = { + 'cells': 'list[Cell]' + } + + self.attribute_map = { + 'cells': 'cells' + } + + self._cells = None + + @property + def cells(self): + """ + **[Required]** Gets the cells of this TableRow. + Cells in the row. + + + :return: The cells of this TableRow. + :rtype: list[oci.ai_vision.models.Cell] + """ + return self._cells + + @cells.setter + def cells(self, cells): + """ + Sets the cells of this TableRow. + Cells in the row. + + + :param cells: The cells of this TableRow. + :type: list[oci.ai_vision.models.Cell] + """ + self._cells = cells + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/update_model_details.py b/src/oci/ai_vision/models/update_model_details.py new file mode 100644 index 0000000000..357e57c222 --- /dev/null +++ b/src/oci/ai_vision/models/update_model_details.py @@ -0,0 +1,167 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateModelDetails(object): + """ + Metadata which can be edited after model creation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateModelDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateModelDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateModelDetails. + Human-friendly name of the model, which can be changed. + + + :return: The display_name of this UpdateModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateModelDetails. + Human-friendly name of the model, which can be changed. + + + :param display_name: The display_name of this UpdateModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateModelDetails. + Optional description of the model. + + + :return: The description of this UpdateModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateModelDetails. + Optional description of the model. + + + :param description: The description of this UpdateModelDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateModelDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this UpdateModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateModelDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this UpdateModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this UpdateModelDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this UpdateModelDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/update_project_details.py b/src/oci/ai_vision/models/update_project_details.py new file mode 100644 index 0000000000..23cb3257bf --- /dev/null +++ b/src/oci/ai_vision/models/update_project_details.py @@ -0,0 +1,167 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateProjectDetails(object): + """ + Metadata which can be edited after project creation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateProjectDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param display_name: + The value to assign to the display_name property of this UpdateProjectDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateProjectDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateProjectDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateProjectDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateProjectDetails. + Human-friendly name for the project, which can be changed. + + + :return: The display_name of this UpdateProjectDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateProjectDetails. + Human-friendly name for the project, which can be changed. + + + :param display_name: The display_name of this UpdateProjectDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateProjectDetails. + Optional description of the project. + + + :return: The description of this UpdateProjectDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateProjectDetails. + Optional description of the project. + + + :param description: The description of this UpdateProjectDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateProjectDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this UpdateProjectDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateProjectDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this UpdateProjectDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this UpdateProjectDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateProjectDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this UpdateProjectDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/value_array.py b/src/oci/ai_vision/models/value_array.py new file mode 100644 index 0000000000..4ed4f37ded --- /dev/null +++ b/src/oci/ai_vision/models/value_array.py @@ -0,0 +1,104 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValueArray(FieldValue): + """ + Array of field values. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValueArray object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValueArray.value_type` attribute + of this class is ``ARRAY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValueArray. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValueArray. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValueArray. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValueArray. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValueArray. + :type word_indexes: list[int] + + :param items: + The value to assign to the items property of this ValueArray. + :type items: list[oci.ai_vision.models.DocumentField] + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'items': 'list[DocumentField]' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'items': 'items' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._items = None + self._value_type = 'ARRAY' + + @property + def items(self): + """ + **[Required]** Gets the items of this ValueArray. + + :return: The items of this ValueArray. + :rtype: list[oci.ai_vision.models.DocumentField] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ValueArray. + + :param items: The items of this ValueArray. + :type: list[oci.ai_vision.models.DocumentField] + """ + 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_vision/models/value_date.py b/src/oci/ai_vision/models/value_date.py new file mode 100644 index 0000000000..0fab599e5d --- /dev/null +++ b/src/oci/ai_vision/models/value_date.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValueDate(FieldValue): + """ + Date field value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValueDate object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValueDate.value_type` attribute + of this class is ``DATE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValueDate. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValueDate. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValueDate. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValueDate. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValueDate. + :type word_indexes: list[int] + + :param value: + The value to assign to the value property of this ValueDate. + :type value: datetime + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'value': 'datetime' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'value': 'value' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._value = None + self._value_type = 'DATE' + + @property + def value(self): + """ + **[Required]** Gets the value of this ValueDate. + Date field value as yyyy-mm-dd. + + + :return: The value of this ValueDate. + :rtype: datetime + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ValueDate. + Date field value as yyyy-mm-dd. + + + :param value: The value of this ValueDate. + :type: datetime + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/value_integer.py b/src/oci/ai_vision/models/value_integer.py new file mode 100644 index 0000000000..a0021c03ca --- /dev/null +++ b/src/oci/ai_vision/models/value_integer.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValueInteger(FieldValue): + """ + Integer field value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValueInteger object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValueInteger.value_type` attribute + of this class is ``INTEGER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValueInteger. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValueInteger. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValueInteger. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValueInteger. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValueInteger. + :type word_indexes: list[int] + + :param value: + The value to assign to the value property of this ValueInteger. + :type value: int + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'value': 'int' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'value': 'value' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._value = None + self._value_type = 'INTEGER' + + @property + def value(self): + """ + **[Required]** Gets the value of this ValueInteger. + Integer value. + + + :return: The value of this ValueInteger. + :rtype: int + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ValueInteger. + Integer value. + + + :param value: The value of this ValueInteger. + :type: int + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/value_number.py b/src/oci/ai_vision/models/value_number.py new file mode 100644 index 0000000000..2fb0aee94b --- /dev/null +++ b/src/oci/ai_vision/models/value_number.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValueNumber(FieldValue): + """ + Floating point number field value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValueNumber object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValueNumber.value_type` attribute + of this class is ``NUMBER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValueNumber. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValueNumber. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValueNumber. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValueNumber. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValueNumber. + :type word_indexes: list[int] + + :param value: + The value to assign to the value property of this ValueNumber. + :type value: float + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'value': 'float' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'value': 'value' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._value = None + self._value_type = 'NUMBER' + + @property + def value(self): + """ + **[Required]** Gets the value of this ValueNumber. + Number value. + + + :return: The value of this ValueNumber. + :rtype: float + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ValueNumber. + Number value. + + + :param value: The value of this ValueNumber. + :type: float + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/value_phone_number.py b/src/oci/ai_vision/models/value_phone_number.py new file mode 100644 index 0000000000..8a80541b2e --- /dev/null +++ b/src/oci/ai_vision/models/value_phone_number.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValuePhoneNumber(FieldValue): + """ + Phone number field value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValuePhoneNumber object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValuePhoneNumber.value_type` attribute + of this class is ``PHONE_NUMBER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValuePhoneNumber. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValuePhoneNumber. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValuePhoneNumber. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValuePhoneNumber. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValuePhoneNumber. + :type word_indexes: list[int] + + :param value: + The value to assign to the value property of this ValuePhoneNumber. + :type value: str + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'value': 'str' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'value': 'value' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._value = None + self._value_type = 'PHONE_NUMBER' + + @property + def value(self): + """ + **[Required]** Gets the value of this ValuePhoneNumber. + Phone number field value. + + + :return: The value of this ValuePhoneNumber. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ValuePhoneNumber. + Phone number field value. + + + :param value: The value of this ValuePhoneNumber. + :type: str + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/value_string.py b/src/oci/ai_vision/models/value_string.py new file mode 100644 index 0000000000..c35033e7eb --- /dev/null +++ b/src/oci/ai_vision/models/value_string.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValueString(FieldValue): + """ + String field value. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValueString object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValueString.value_type` attribute + of this class is ``STRING`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValueString. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValueString. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValueString. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValueString. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValueString. + :type word_indexes: list[int] + + :param value: + The value to assign to the value property of this ValueString. + :type value: str + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'value': 'str' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'value': 'value' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._value = None + self._value_type = 'STRING' + + @property + def value(self): + """ + **[Required]** Gets the value of this ValueString. + String text. + + + :return: The value of this ValueString. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ValueString. + String text. + + + :param value: The value of this ValueString. + :type: str + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/value_time.py b/src/oci/ai_vision/models/value_time.py new file mode 100644 index 0000000000..cfa8f29d0c --- /dev/null +++ b/src/oci/ai_vision/models/value_time.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .field_value import FieldValue +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ValueTime(FieldValue): + """ + Time field value + """ + + def __init__(self, **kwargs): + """ + Initializes a new ValueTime object with values from keyword arguments. The default value of the :py:attr:`~oci.ai_vision.models.ValueTime.value_type` attribute + of this class is ``TIME`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param value_type: + The value to assign to the value_type property of this ValueTime. + Allowed values for this property are: "STRING", "DATE", "TIME", "PHONE_NUMBER", "NUMBER", "INTEGER", "ARRAY" + :type value_type: str + + :param text: + The value to assign to the text property of this ValueTime. + :type text: str + + :param confidence: + The value to assign to the confidence property of this ValueTime. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this ValueTime. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + :param word_indexes: + The value to assign to the word_indexes property of this ValueTime. + :type word_indexes: list[int] + + :param value: + The value to assign to the value property of this ValueTime. + :type value: datetime + + """ + self.swagger_types = { + 'value_type': 'str', + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon', + 'word_indexes': 'list[int]', + 'value': 'datetime' + } + + self.attribute_map = { + 'value_type': 'valueType', + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon', + 'word_indexes': 'wordIndexes', + 'value': 'value' + } + + self._value_type = None + self._text = None + self._confidence = None + self._bounding_polygon = None + self._word_indexes = None + self._value = None + self._value_type = 'TIME' + + @property + def value(self): + """ + **[Required]** Gets the value of this ValueTime. + Time field value as yyyy-mm-dd hh-mm-ss. + + + :return: The value of this ValueTime. + :rtype: datetime + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this ValueTime. + Time field value as yyyy-mm-dd hh-mm-ss. + + + :param value: The value of this ValueTime. + :type: datetime + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/word.py b/src/oci/ai_vision/models/word.py new file mode 100644 index 0000000000..017702731e --- /dev/null +++ b/src/oci/ai_vision/models/word.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Word(object): + """ + A single word. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Word object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param text: + The value to assign to the text property of this Word. + :type text: str + + :param confidence: + The value to assign to the confidence property of this Word. + :type confidence: float + + :param bounding_polygon: + The value to assign to the bounding_polygon property of this Word. + :type bounding_polygon: oci.ai_vision.models.BoundingPolygon + + """ + self.swagger_types = { + 'text': 'str', + 'confidence': 'float', + 'bounding_polygon': 'BoundingPolygon' + } + + self.attribute_map = { + 'text': 'text', + 'confidence': 'confidence', + 'bounding_polygon': 'boundingPolygon' + } + + self._text = None + self._confidence = None + self._bounding_polygon = None + + @property + def text(self): + """ + **[Required]** Gets the text of this Word. + String of text characters in the word. + + + :return: The text of this Word. + :rtype: str + """ + return self._text + + @text.setter + def text(self, text): + """ + Sets the text of this Word. + String of text characters in the word. + + + :param text: The text of this Word. + :type: str + """ + self._text = text + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this Word. + Confidence score between 0 to 1. + + + :return: The confidence of this Word. + :rtype: float + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this Word. + Confidence score between 0 to 1. + + + :param confidence: The confidence of this Word. + :type: float + """ + self._confidence = confidence + + @property + def bounding_polygon(self): + """ + **[Required]** Gets the bounding_polygon of this Word. + + :return: The bounding_polygon of this Word. + :rtype: oci.ai_vision.models.BoundingPolygon + """ + return self._bounding_polygon + + @bounding_polygon.setter + def bounding_polygon(self, bounding_polygon): + """ + Sets the bounding_polygon of this Word. + + :param bounding_polygon: The bounding_polygon of this Word. + :type: oci.ai_vision.models.BoundingPolygon + """ + self._bounding_polygon = bounding_polygon + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_vision/models/work_request.py b/src/oci/ai_vision/models/work_request.py new file mode 100644 index 0000000000..9c84f12810 --- /dev/null +++ b/src/oci/ai_vision/models/work_request.py @@ -0,0 +1,412 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequest(object): + """ + A description of workrequest status. + """ + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_PROJECT" + OPERATION_TYPE_CREATE_PROJECT = "CREATE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_PROJECT" + OPERATION_TYPE_UPDATE_PROJECT = "UPDATE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_PROJECT" + OPERATION_TYPE_DELETE_PROJECT = "DELETE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_PROJECT" + OPERATION_TYPE_MOVE_PROJECT = "MOVE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_MODEL" + OPERATION_TYPE_CREATE_MODEL = "CREATE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_MODEL" + OPERATION_TYPE_UPDATE_MODEL = "UPDATE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_MODEL" + OPERATION_TYPE_DELETE_MODEL = "DELETE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MOVE_MODEL" + OPERATION_TYPE_MOVE_MODEL = "MOVE_MODEL" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "WAITING" + STATUS_WAITING = "WAITING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequest object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_type: + The value to assign to the operation_type property of this WorkRequest. + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_MODEL", "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param status: + The value to assign to the status property of this WorkRequest. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param id: + The value to assign to the id property of this WorkRequest. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequest. + :type compartment_id: str + + :param resources: + The value to assign to the resources property of this WorkRequest. + :type resources: list[oci.ai_vision.models.WorkRequestResource] + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequest. + :type percent_complete: float + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequest. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequest. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequest. + :type time_finished: datetime + + """ + self.swagger_types = { + 'operation_type': 'str', + 'status': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'resources': 'list[WorkRequestResource]', + 'percent_complete': 'float', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'operation_type': 'operationType', + 'status': 'status', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'resources': 'resources', + 'percent_complete': 'percentComplete', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._operation_type = None + self._status = None + self._id = None + self._compartment_id = None + self._resources = None + self._percent_complete = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequest. + Type of the work request. + + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_MODEL", "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequest. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequest. + Type of the work request. + + + :param operation_type: The operation_type of this WorkRequest. + :type: str + """ + allowed_values = ["CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_MODEL", "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequest. + Status of current work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequest. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequest. + Status of current work request. + + + :param status: The status of this WorkRequest. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequest. + The id of the work request. + + + :return: The id of this WorkRequest. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequest. + The id of the work request. + + + :param id: The id of this WorkRequest. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this WorkRequest. + The OCID of the compartment that contains the work request. Work requests should be scoped to + the same compartment as the resource the work request affects. + + + :return: The compartment_id of this WorkRequest. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequest. + The OCID of the compartment that contains the work request. Work requests should be scoped to + the same compartment as the resource the work request affects. + + + :param compartment_id: The compartment_id of this WorkRequest. + :type: str + """ + self._compartment_id = compartment_id + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequest. + The resources affected by this work request. + + + :return: The resources of this WorkRequest. + :rtype: list[oci.ai_vision.models.WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequest. + The resources affected by this work request. + + + :param resources: The resources of this WorkRequest. + :type: list[oci.ai_vision.models.WorkRequestResource] + """ + self._resources = resources + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequest. + Percentage of the request completed. + + + :return: The percent_complete of this WorkRequest. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequest. + Percentage of the request completed. + + + :param percent_complete: The percent_complete of this WorkRequest. + :type: float + """ + self._percent_complete = percent_complete + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequest. + The date and time the request was created, as described in + `RFC 3339`__, section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_accepted of this WorkRequest. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequest. + The date and time the request was created, as described in + `RFC 3339`__, section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequest. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequest. + The date and time the request was started, as described in `RFC 3339`__, + section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_started of this WorkRequest. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequest. + The date and time the request was started, as described in `RFC 3339`__, + section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_started: The time_started of this WorkRequest. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequest. + The date and time the object was finished, as described in `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_finished of this WorkRequest. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequest. + The date and time the object was finished, as described in `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_finished: The time_finished of this WorkRequest. + :type: datetime + """ + self._time_finished = time_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/work_request_error.py b/src/oci/ai_vision/models/work_request_error.py new file mode 100644 index 0000000000..6e4d7e502f --- /dev/null +++ b/src/oci/ai_vision/models/work_request_error.py @@ -0,0 +1,134 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestError(object): + """ + An error encountered while executing a work request. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestError object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param code: + The value to assign to the code property of this WorkRequestError. + :type code: str + + :param message: + The value to assign to the message property of this WorkRequestError. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestError. + :type timestamp: datetime + + """ + self.swagger_types = { + 'code': 'str', + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'code': 'code', + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._code = None + self._message = None + self._timestamp = None + + @property + def code(self): + """ + **[Required]** Gets the code of this WorkRequestError. + A machine-usable code for the error that occured. Error codes are listed on + (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm). + + + :return: The code of this WorkRequestError. + :rtype: str + """ + return self._code + + @code.setter + def code(self, code): + """ + Sets the code of this WorkRequestError. + A machine-usable code for the error that occured. Error codes are listed on + (https://docs.cloud.oracle.com/Content/API/References/apierrors.htm). + + + :param code: The code of this WorkRequestError. + :type: str + """ + self._code = code + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestError. + A human readable description of the issue encountered. + + + :return: The message of this WorkRequestError. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestError. + A human readable description of the issue encountered. + + + :param message: The message of this WorkRequestError. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestError. + When the error occured, as an RFC3339 formatted datetime. + + + :return: The timestamp of this WorkRequestError. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestError. + When the error occured, as an RFC3339 formatted datetime. + + + :param timestamp: The timestamp of this WorkRequestError. + :type: datetime + """ + self._timestamp = timestamp + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/work_request_error_collection.py b/src/oci/ai_vision/models/work_request_error_collection.py new file mode 100644 index 0000000000..a18b8332af --- /dev/null +++ b/src/oci/ai_vision/models/work_request_error_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestErrorCollection(object): + """ + Results of a workRequestError search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestErrorCollection 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 WorkRequestErrorCollection. + :type items: list[oci.ai_vision.models.WorkRequestError] + + """ + self.swagger_types = { + 'items': 'list[WorkRequestError]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this WorkRequestErrorCollection. + List of workRequestError objects. + + + :return: The items of this WorkRequestErrorCollection. + :rtype: list[oci.ai_vision.models.WorkRequestError] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestErrorCollection. + List of workRequestError objects. + + + :param items: The items of this WorkRequestErrorCollection. + :type: list[oci.ai_vision.models.WorkRequestError] + """ + 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_vision/models/work_request_log_entry.py b/src/oci/ai_vision/models/work_request_log_entry.py new file mode 100644 index 0000000000..03cee98972 --- /dev/null +++ b/src/oci/ai_vision/models/work_request_log_entry.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestLogEntry(object): + """ + A log message from the execution of a work request. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestLogEntry object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param message: + The value to assign to the message property of this WorkRequestLogEntry. + :type message: str + + :param timestamp: + The value to assign to the timestamp property of this WorkRequestLogEntry. + :type timestamp: datetime + + """ + self.swagger_types = { + 'message': 'str', + 'timestamp': 'datetime' + } + + self.attribute_map = { + 'message': 'message', + 'timestamp': 'timestamp' + } + + self._message = None + self._timestamp = None + + @property + def message(self): + """ + **[Required]** Gets the message of this WorkRequestLogEntry. + Human-readable log message. + + + :return: The message of this WorkRequestLogEntry. + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """ + Sets the message of this WorkRequestLogEntry. + Human-readable log message. + + + :param message: The message of this WorkRequestLogEntry. + :type: str + """ + self._message = message + + @property + def timestamp(self): + """ + **[Required]** Gets the timestamp of this WorkRequestLogEntry. + When the log message was written, as an RFC3339 formatted datetime. + + + :return: The timestamp of this WorkRequestLogEntry. + :rtype: datetime + """ + return self._timestamp + + @timestamp.setter + def timestamp(self, timestamp): + """ + Sets the timestamp of this WorkRequestLogEntry. + When the log message was written, as an RFC3339 formatted datetime. + + + :param timestamp: The timestamp of this WorkRequestLogEntry. + :type: datetime + """ + self._timestamp = timestamp + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/work_request_log_entry_collection.py b/src/oci/ai_vision/models/work_request_log_entry_collection.py new file mode 100644 index 0000000000..a209f458c5 --- /dev/null +++ b/src/oci/ai_vision/models/work_request_log_entry_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestLogEntryCollection(object): + """ + Results of a workRequestLog search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestLogEntryCollection 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 WorkRequestLogEntryCollection. + :type items: list[oci.ai_vision.models.WorkRequestLogEntry] + + """ + self.swagger_types = { + 'items': 'list[WorkRequestLogEntry]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this WorkRequestLogEntryCollection. + List of workRequestLogEntries. + + + :return: The items of this WorkRequestLogEntryCollection. + :rtype: list[oci.ai_vision.models.WorkRequestLogEntry] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestLogEntryCollection. + List of workRequestLogEntries. + + + :param items: The items of this WorkRequestLogEntryCollection. + :type: list[oci.ai_vision.models.WorkRequestLogEntry] + """ + 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_vision/models/work_request_resource.py b/src/oci/ai_vision/models/work_request_resource.py new file mode 100644 index 0000000000..540e8b4b1b --- /dev/null +++ b/src/oci/ai_vision/models/work_request_resource.py @@ -0,0 +1,201 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestResource(object): + """ + A resource created or operated on by a work request. + """ + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "CREATED" + ACTION_TYPE_CREATED = "CREATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "UPDATED" + ACTION_TYPE_UPDATED = "UPDATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "DELETED" + ACTION_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "IN_PROGRESS" + ACTION_TYPE_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "RELATED" + ACTION_TYPE_RELATED = "RELATED" + + #: A constant which can be used with the action_type property of a WorkRequestResource. + #: This constant has a value of "FAILED" + ACTION_TYPE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestResource object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this WorkRequestResource. + :type entity_type: str + + :param action_type: + The value to assign to the action_type property of this WorkRequestResource. + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type action_type: str + + :param identifier: + The value to assign to the identifier property of this WorkRequestResource. + :type identifier: str + + :param entity_uri: + The value to assign to the entity_uri property of this WorkRequestResource. + :type entity_uri: str + + """ + self.swagger_types = { + 'entity_type': 'str', + 'action_type': 'str', + 'identifier': 'str', + 'entity_uri': 'str' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'action_type': 'actionType', + 'identifier': 'identifier', + 'entity_uri': 'entityUri' + } + + self._entity_type = None + self._action_type = None + self._identifier = None + self._entity_uri = None + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this WorkRequestResource. + The resource type the work request affects. + + + :return: The entity_type of this WorkRequestResource. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this WorkRequestResource. + The resource type the work request affects. + + + :param entity_type: The entity_type of this WorkRequestResource. + :type: str + """ + self._entity_type = entity_type + + @property + def action_type(self): + """ + **[Required]** Gets the action_type of this WorkRequestResource. + The way in which this resource is affected by the work tracked in the work request. + A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + work is complete for that resource at which point it will transition to CREATED, UPDATED, + or DELETED, respectively. + + Allowed values for this property are: "CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The action_type of this WorkRequestResource. + :rtype: str + """ + return self._action_type + + @action_type.setter + def action_type(self, action_type): + """ + Sets the action_type of this WorkRequestResource. + The way in which this resource is affected by the work tracked in the work request. + A resource being created, updated, or deleted will remain in the IN_PROGRESS state until + work is complete for that resource at which point it will transition to CREATED, UPDATED, + or DELETED, respectively. + + + :param action_type: The action_type of this WorkRequestResource. + :type: str + """ + allowed_values = ["CREATED", "UPDATED", "DELETED", "IN_PROGRESS", "RELATED", "FAILED"] + if not value_allowed_none_or_none_sentinel(action_type, allowed_values): + action_type = 'UNKNOWN_ENUM_VALUE' + self._action_type = action_type + + @property + def identifier(self): + """ + **[Required]** Gets the identifier of this WorkRequestResource. + The identifier of the resource the work request affects. + + + :return: The identifier of this WorkRequestResource. + :rtype: str + """ + return self._identifier + + @identifier.setter + def identifier(self, identifier): + """ + Sets the identifier of this WorkRequestResource. + The identifier of the resource the work request affects. + + + :param identifier: The identifier of this WorkRequestResource. + :type: str + """ + self._identifier = identifier + + @property + def entity_uri(self): + """ + Gets the entity_uri of this WorkRequestResource. + The URI path that the user can do a GET on to access the resource metadata. + + + :return: The entity_uri of this WorkRequestResource. + :rtype: str + """ + return self._entity_uri + + @entity_uri.setter + def entity_uri(self, entity_uri): + """ + Sets the entity_uri of this WorkRequestResource. + The URI path that the user can do a GET on to access the resource metadata. + + + :param entity_uri: The entity_uri of this WorkRequestResource. + :type: str + """ + self._entity_uri = entity_uri + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/work_request_summary.py b/src/oci/ai_vision/models/work_request_summary.py new file mode 100644 index 0000000000..4e9211a7ec --- /dev/null +++ b/src/oci/ai_vision/models/work_request_summary.py @@ -0,0 +1,416 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestSummary(object): + """ + Summary of the status of a work request. + """ + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_PROJECT" + OPERATION_TYPE_CREATE_PROJECT = "CREATE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_PROJECT" + OPERATION_TYPE_UPDATE_PROJECT = "UPDATE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_PROJECT" + OPERATION_TYPE_DELETE_PROJECT = "DELETE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MOVE_PROJECT" + OPERATION_TYPE_MOVE_PROJECT = "MOVE_PROJECT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_MODEL" + OPERATION_TYPE_CREATE_MODEL = "CREATE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_MODEL" + OPERATION_TYPE_UPDATE_MODEL = "UPDATE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_MODEL" + OPERATION_TYPE_DELETE_MODEL = "DELETE_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MOVE_MODEL" + OPERATION_TYPE_MOVE_MODEL = "MOVE_MODEL" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "ACCEPTED" + STATUS_ACCEPTED = "ACCEPTED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "IN_PROGRESS" + STATUS_IN_PROGRESS = "IN_PROGRESS" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "WAITING" + STATUS_WAITING = "WAITING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "FAILED" + STATUS_FAILED = "FAILED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "SUCCEEDED" + STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation_type: + The value to assign to the operation_type property of this WorkRequestSummary. + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_MODEL", "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_type: str + + :param status: + The value to assign to the status property of this WorkRequestSummary. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param id: + The value to assign to the id property of this WorkRequestSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this WorkRequestSummary. + :type compartment_id: str + + :param resources: + The value to assign to the resources property of this WorkRequestSummary. + :type resources: list[oci.ai_vision.models.WorkRequestResource] + + :param percent_complete: + The value to assign to the percent_complete property of this WorkRequestSummary. + :type percent_complete: float + + :param time_accepted: + The value to assign to the time_accepted property of this WorkRequestSummary. + :type time_accepted: datetime + + :param time_started: + The value to assign to the time_started property of this WorkRequestSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this WorkRequestSummary. + :type time_finished: datetime + + """ + self.swagger_types = { + 'operation_type': 'str', + 'status': 'str', + 'id': 'str', + 'compartment_id': 'str', + 'resources': 'list[WorkRequestResource]', + 'percent_complete': 'float', + 'time_accepted': 'datetime', + 'time_started': 'datetime', + 'time_finished': 'datetime' + } + + self.attribute_map = { + 'operation_type': 'operationType', + 'status': 'status', + 'id': 'id', + 'compartment_id': 'compartmentId', + 'resources': 'resources', + 'percent_complete': 'percentComplete', + 'time_accepted': 'timeAccepted', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished' + } + + self._operation_type = None + self._status = None + self._id = None + self._compartment_id = None + self._resources = None + self._percent_complete = None + self._time_accepted = None + self._time_started = None + self._time_finished = None + + @property + def operation_type(self): + """ + **[Required]** Gets the operation_type of this WorkRequestSummary. + Type of the work request. + + Allowed values for this property are: "CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_MODEL", "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_type of this WorkRequestSummary. + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """ + Sets the operation_type of this WorkRequestSummary. + Type of the work request. + + + :param operation_type: The operation_type of this WorkRequestSummary. + :type: str + """ + allowed_values = ["CREATE_PROJECT", "UPDATE_PROJECT", "DELETE_PROJECT", "MOVE_PROJECT", "CREATE_MODEL", "UPDATE_MODEL", "DELETE_MODEL", "MOVE_MODEL"] + if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): + operation_type = 'UNKNOWN_ENUM_VALUE' + self._operation_type = operation_type + + @property + def status(self): + """ + **[Required]** Gets the status of this WorkRequestSummary. + Status of current work request. + + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this WorkRequestSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this WorkRequestSummary. + Status of current work request. + + + :param status: The status of this WorkRequestSummary. + :type: str + """ + allowed_values = ["ACCEPTED", "IN_PROGRESS", "WAITING", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def id(self): + """ + **[Required]** Gets the id of this WorkRequestSummary. + The id of the work request. + + + :return: The id of this WorkRequestSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this WorkRequestSummary. + The id of the work request. + + + :param id: The id of this WorkRequestSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this WorkRequestSummary. + The ocid of the compartment that contains the work request. Work requests should be scoped to + the same compartment as the resource the work request affects. If the work request affects multiple resources, + and those resources are not in the same compartment, it is up to the service team to pick the primary + resource whose compartment should be used. + + + :return: The compartment_id of this WorkRequestSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this WorkRequestSummary. + The ocid of the compartment that contains the work request. Work requests should be scoped to + the same compartment as the resource the work request affects. If the work request affects multiple resources, + and those resources are not in the same compartment, it is up to the service team to pick the primary + resource whose compartment should be used. + + + :param compartment_id: The compartment_id of this WorkRequestSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def resources(self): + """ + **[Required]** Gets the resources of this WorkRequestSummary. + The resources affected by this work request. + + + :return: The resources of this WorkRequestSummary. + :rtype: list[oci.ai_vision.models.WorkRequestResource] + """ + return self._resources + + @resources.setter + def resources(self, resources): + """ + Sets the resources of this WorkRequestSummary. + The resources affected by this work request. + + + :param resources: The resources of this WorkRequestSummary. + :type: list[oci.ai_vision.models.WorkRequestResource] + """ + self._resources = resources + + @property + def percent_complete(self): + """ + **[Required]** Gets the percent_complete of this WorkRequestSummary. + Percentage of the request completed. + + + :return: The percent_complete of this WorkRequestSummary. + :rtype: float + """ + return self._percent_complete + + @percent_complete.setter + def percent_complete(self, percent_complete): + """ + Sets the percent_complete of this WorkRequestSummary. + Percentage of the request completed. + + + :param percent_complete: The percent_complete of this WorkRequestSummary. + :type: float + """ + self._percent_complete = percent_complete + + @property + def time_accepted(self): + """ + **[Required]** Gets the time_accepted of this WorkRequestSummary. + The date and time the request was created, as described in + `RFC 3339`__, section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_accepted of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_accepted + + @time_accepted.setter + def time_accepted(self, time_accepted): + """ + Sets the time_accepted of this WorkRequestSummary. + The date and time the request was created, as described in + `RFC 3339`__, section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_accepted: The time_accepted of this WorkRequestSummary. + :type: datetime + """ + self._time_accepted = time_accepted + + @property + def time_started(self): + """ + Gets the time_started of this WorkRequestSummary. + The date and time the request was started, as described in `RFC 3339`__, + section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_started of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this WorkRequestSummary. + The date and time the request was started, as described in `RFC 3339`__, + section 14.29. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_started: The time_started of this WorkRequestSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + Gets the time_finished of this WorkRequestSummary. + The date and time the object was finished, as described in `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :return: The time_finished of this WorkRequestSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this WorkRequestSummary. + The date and time the object was finished, as described in `RFC 3339`__. + + __ https://tools.ietf.org/rfc/rfc3339 + + + :param time_finished: The time_finished of this WorkRequestSummary. + :type: datetime + """ + self._time_finished = time_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/ai_vision/models/work_request_summary_collection.py b/src/oci/ai_vision/models/work_request_summary_collection.py new file mode 100644 index 0000000000..2694348e30 --- /dev/null +++ b/src/oci/ai_vision/models/work_request_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class WorkRequestSummaryCollection(object): + """ + Results of a workRequest search. + """ + + def __init__(self, **kwargs): + """ + Initializes a new WorkRequestSummaryCollection 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 WorkRequestSummaryCollection. + :type items: list[oci.ai_vision.models.WorkRequestSummary] + + """ + self.swagger_types = { + 'items': 'list[WorkRequestSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this WorkRequestSummaryCollection. + List of workRequestSummary objects. + + + :return: The items of this WorkRequestSummaryCollection. + :rtype: list[oci.ai_vision.models.WorkRequestSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this WorkRequestSummaryCollection. + List of workRequestSummary objects. + + + :param items: The items of this WorkRequestSummaryCollection. + :type: list[oci.ai_vision.models.WorkRequestSummary] + """ + 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/announcements_service/__init__.py b/src/oci/announcements_service/__init__.py index e1ae20ddc5..54fc13d29f 100644 --- a/src/oci/announcements_service/__init__.py +++ b/src/oci/announcements_service/__init__.py @@ -7,8 +7,10 @@ from .announcement_client import AnnouncementClient from .announcement_client_composite_operations import AnnouncementClientCompositeOperations +from .announcement_subscription_client import AnnouncementSubscriptionClient +from .announcement_subscription_client_composite_operations import AnnouncementSubscriptionClientCompositeOperations from .announcements_preferences_client import AnnouncementsPreferencesClient from .announcements_preferences_client_composite_operations import AnnouncementsPreferencesClientCompositeOperations from . import models -__all__ = ["AnnouncementClient", "AnnouncementClientCompositeOperations", "AnnouncementsPreferencesClient", "AnnouncementsPreferencesClientCompositeOperations", "models"] +__all__ = ["AnnouncementClient", "AnnouncementClientCompositeOperations", "AnnouncementSubscriptionClient", "AnnouncementSubscriptionClientCompositeOperations", "AnnouncementsPreferencesClient", "AnnouncementsPreferencesClientCompositeOperations", "models"] diff --git a/src/oci/announcements_service/announcement_client.py b/src/oci/announcements_service/announcement_client.py index b5b7f00ba9..0516268997 100644 --- a/src/oci/announcements_service/announcement_client.py +++ b/src/oci/announcements_service/announcement_client.py @@ -90,7 +90,7 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'base_path': '/20180904', - 'service_endpoint_template': 'https://announcements.{region}.{secondLevelDomain}', + 'service_endpoint_template': 'https://announcements.{region}.oci.{secondLevelDomain}', 'skip_deserialization': kwargs.get('skip_deserialization', False), 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) } @@ -108,6 +108,8 @@ def get_announcement(self, announcement_id, **kwargs): """ Gets the details of a specific announcement. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str announcement_id: (required) The OCID of the announcement. @@ -193,6 +195,8 @@ def get_announcement_user_status(self, announcement_id, **kwargs): """ Gets information about whether a specific announcement was acknowledged by a user. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str announcement_id: (required) The OCID of the announcement. @@ -278,10 +282,11 @@ def list_announcements(self, compartment_id, **kwargs): """ Gets a list of announcements for the current tenancy. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str compartment_id: (required) - The OCID of the compartment. Because announcements are specific to a tenancy, this is the - OCID of the root compartment. + The OCID of the compartment. :param int limit: (optional) The maximum number of items to return in a paginated \"List\" call. @@ -316,6 +321,20 @@ def list_announcements(self, compartment_id, **kwargs): :param datetime time_one_latest_time: (optional) The boundary for the latest `timeOneValue` date on announcements that you want to see. + :param str environment_name: (optional) + A filter to return only announcements that match a specific environment name. + + :param str service: (optional) + A filter to return only announcements affecting a specific service. + + :param str platform_type: (optional) + A filter to return only announcements affecting a specific platform. + + Allowed values are: "IAAS", "SAAS" + + :param list[str] exclude_announcement_types: (optional) + Exclude The type of announcement. + :param str opc_request_id: (optional) The unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the complete request ID. @@ -354,6 +373,10 @@ def list_announcements(self, compartment_id, **kwargs): "sort_order", "time_one_earliest_time", "time_one_latest_time", + "environment_name", + "service", + "platform_type", + "exclude_announcement_types", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] @@ -382,6 +405,13 @@ def list_announcements(self, compartment_id, **kwargs): "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) ) + if 'platform_type' in kwargs: + platform_type_allowed_values = ["IAAS", "SAAS"] + if kwargs['platform_type'] not in platform_type_allowed_values: + raise ValueError( + "Invalid value for `platform_type`, must be one of {0}".format(platform_type_allowed_values) + ) + query_params = { "limit": kwargs.get("limit", missing), "page": kwargs.get("page", missing), @@ -392,7 +422,11 @@ def list_announcements(self, compartment_id, **kwargs): "sortBy": kwargs.get("sort_by", missing), "sortOrder": kwargs.get("sort_order", missing), "timeOneEarliestTime": kwargs.get("time_one_earliest_time", missing), - "timeOneLatestTime": kwargs.get("time_one_latest_time", missing) + "timeOneLatestTime": kwargs.get("time_one_latest_time", missing), + "environmentName": kwargs.get("environment_name", missing), + "service": kwargs.get("service", missing), + "platformType": kwargs.get("platform_type", missing), + "excludeAnnouncementTypes": self.base_client.generate_collection_format_param(kwargs.get("exclude_announcement_types", missing), 'multi') } query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} @@ -431,6 +465,8 @@ def update_announcement_user_status(self, announcement_id, status_details, **kwa """ Updates the status of the specified announcement with regard to whether it has been marked as read. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str announcement_id: (required) The OCID of the announcement. @@ -457,7 +493,7 @@ def update_announcement_user_status(self, announcement_id, status_details, **kwa 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 + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.announcements_service.models.AnnouncementUserStatusDetails` :rtype: :class:`~oci.response.Response` :example: @@ -511,11 +547,13 @@ def update_announcement_user_status(self, announcement_id, status_details, **kwa method=method, path_params=path_params, header_params=header_params, - body=status_details) + body=status_details, + response_type="AnnouncementUserStatusDetails") else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=status_details) + body=status_details, + response_type="AnnouncementUserStatusDetails") diff --git a/src/oci/announcements_service/announcement_subscription_client.py b/src/oci/announcements_service/announcement_subscription_client.py new file mode 100644 index 0000000000..543d497c79 --- /dev/null +++ b/src/oci/announcements_service/announcement_subscription_client.py @@ -0,0 +1,1007 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import announcements_service_type_mapping +missing = Sentinel("Missing") + + +class AnnouncementSubscriptionClient(object): + """ + Manage Oracle Cloud Infrastructure console announcements. + """ + + 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 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. + """ + 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': '/20180904', + 'service_endpoint_template': 'https://announcements.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + 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("announcement_subscription", config, signer, announcements_service_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def change_announcement_subscription_compartment(self, announcement_subscription_id, change_announcement_subscription_compartment_details, **kwargs): + """ + Moves the specified announcement subscription from one compartment to another compartment. When provided, If-Match is checked against ETag values of the resource. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param oci.announcements_service.models.ChangeAnnouncementSubscriptionCompartmentDetails change_announcement_subscription_compartment_details: (required) + The compartment information to update. + + :param str if_match: (optional) + The locking version, used for optimistic concurrency control. + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use change_announcement_subscription_compartment API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}/actions/changeCompartment" + method = "POST" + + # 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( + "change_announcement_subscription_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_announcement_subscription_compartment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=change_announcement_subscription_compartment_details) + + def create_announcement_subscription(self, create_announcement_subscription_details, **kwargs): + """ + Creates a new announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param oci.announcements_service.models.CreateAnnouncementSubscriptionDetails create_announcement_subscription_details: (required) + Details of the new announcement subscription. + + :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 unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete 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.announcements_service.models.AnnouncementSubscription` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_announcement_subscription API. + """ + resource_path = "/announcementSubscriptions" + method = "POST" + + # 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( + "create_announcement_subscription got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_announcement_subscription_details, + response_type="AnnouncementSubscription") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_announcement_subscription_details, + response_type="AnnouncementSubscription") + + def create_filter_group(self, announcement_subscription_id, create_filter_group_details, **kwargs): + """ + Creates a new filter group in the specified announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param oci.announcements_service.models.CreateFilterGroupDetails create_filter_group_details: (required) + Details of the new filter group. + + :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 unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete request ID. + + :param str if_match: (optional) + The locking version, used for optimistic concurrency control. + + :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.announcements_service.models.FilterGroup` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_filter_group API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}/filterGroups" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "create_filter_group got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_filter_group_details, + response_type="FilterGroup") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=create_filter_group_details, + response_type="FilterGroup") + + def delete_announcement_subscription(self, announcement_subscription_id, **kwargs): + """ + Deletes the specified announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param str if_match: (optional) + The locking version, used for optimistic concurrency control. + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_announcement_subscription API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}" + method = "DELETE" + + # 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( + "delete_announcement_subscription got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_filter_group(self, announcement_subscription_id, filter_group_name, **kwargs): + """ + Deletes a filter group in the specified announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param str filter_group_name: (required) + The name of the filter group. + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete request ID. + + :param str if_match: (optional) + The locking version, used for optimistic concurrency control. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_filter_group API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}/filterGroups/{filterGroupName}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_filter_group got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id, + "filterGroupName": filter_group_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def get_announcement_subscription(self, announcement_subscription_id, **kwargs): + """ + Gets the specified announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete 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.announcements_service.models.AnnouncementSubscription` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_announcement_subscription API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}" + method = "GET" + + # 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( + "get_announcement_subscription got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AnnouncementSubscription") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AnnouncementSubscription") + + def list_announcement_subscriptions(self, compartment_id, **kwargs): + """ + Gets a list of all announcement subscriptions in the specified compartment. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str lifecycle_state: (optional) + A filter to return only announcement subscriptions that match the given lifecycle state. + + Allowed values are: "ACTIVE", "DELETED", "FAILED" + + :param str display_name: (optional) + A filter to return only resources that match the entire display name given. + + :param str id: (optional) + The OCID of the announcement subscription. + + :param int limit: (optional) + The maximum number of items to return in a paginated \"List\" call. + + :param str page: (optional) + The value of the `opc-next-page` response header from the previous \"List\" call. + + :param str sort_order: (optional) + The sort order to use, whether ascending ('ASC') or descending ('DESC'). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The criteria to sort by. You can specify only one sort order. The default sort order for the creation date of resources is descending. The default sort order for display names is ascending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete 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.announcements_service.models.AnnouncementSubscriptionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_announcement_subscriptions API. + """ + resource_path = "/announcementSubscriptions" + method = "GET" + + # 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( + "list_announcement_subscriptions got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["ACTIVE", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "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: + 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="AnnouncementSubscriptionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AnnouncementSubscriptionCollection") + + def update_announcement_subscription(self, announcement_subscription_id, update_announcement_subscription_details, **kwargs): + """ + Updates the specified announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails update_announcement_subscription_details: (required) + The subscription information to update. + + :param str if_match: (optional) + The locking version, used for optimistic concurrency control. + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete 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.announcements_service.models.AnnouncementSubscription` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_announcement_subscription API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}" + method = "PUT" + + # 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( + "update_announcement_subscription got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_announcement_subscription_details, + response_type="AnnouncementSubscription") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_announcement_subscription_details, + response_type="AnnouncementSubscription") + + def update_filter_group(self, announcement_subscription_id, filter_group_name, update_filter_group_details, **kwargs): + """ + Updates a filter group in the specified announcement subscription. + + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param str filter_group_name: (required) + The name of the filter group. + + :param oci.announcements_service.models.UpdateFilterGroupDetails update_filter_group_details: (required) + The filter group information to update. + + :param str opc_request_id: (optional) + The unique Oracle-assigned identifier for the request. If you need to contact Oracle about + a particular request, please provide the complete request ID. + + :param str if_match: (optional) + The locking version, used for optimistic concurrency control. + + :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.announcements_service.models.FilterGroup` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use update_filter_group API. + """ + resource_path = "/announcementSubscriptions/{announcementSubscriptionId}/filterGroups/{filterGroupName}" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "update_filter_group got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "announcementSubscriptionId": announcement_subscription_id, + "filterGroupName": filter_group_name + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_filter_group_details, + response_type="FilterGroup") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_filter_group_details, + response_type="FilterGroup") diff --git a/src/oci/announcements_service/announcement_subscription_client_composite_operations.py b/src/oci/announcements_service/announcement_subscription_client_composite_operations.py new file mode 100644 index 0000000000..4260c00e1c --- /dev/null +++ b/src/oci/announcements_service/announcement_subscription_client_composite_operations.py @@ -0,0 +1,150 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class AnnouncementSubscriptionClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.announcements_service.AnnouncementSubscriptionClient` 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 AnnouncementSubscriptionClientCompositeOperations object + + :param AnnouncementSubscriptionClient client: + The service client which will be wrapped by this object + """ + self.client = client + + def create_announcement_subscription_and_wait_for_state(self, create_announcement_subscription_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.announcements_service.AnnouncementSubscriptionClient.create_announcement_subscription` and waits for the :py:class:`~oci.announcements_service.models.AnnouncementSubscription` acted upon + to enter the given state(s). + + :param oci.announcements_service.models.CreateAnnouncementSubscriptionDetails create_announcement_subscription_details: (required) + Details of the new announcement subscription. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.announcements_service.models.AnnouncementSubscription.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.announcements_service.AnnouncementSubscriptionClient.create_announcement_subscription` + + :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_announcement_subscription(create_announcement_subscription_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_announcement_subscription(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_announcement_subscription_and_wait_for_state(self, announcement_subscription_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.announcements_service.AnnouncementSubscriptionClient.delete_announcement_subscription` and waits for the :py:class:`~oci.announcements_service.models.AnnouncementSubscription` acted upon + to enter the given state(s). + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.announcements_service.models.AnnouncementSubscription.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.announcements_service.AnnouncementSubscriptionClient.delete_announcement_subscription` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_announcement_subscription(announcement_subscription_id) + operation_result = None + try: + operation_result = self.client.delete_announcement_subscription(announcement_subscription_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + waiter_result = oci.wait_until( + self.client, + initial_get_result, + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + succeed_on_not_found=True, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_announcement_subscription_and_wait_for_state(self, announcement_subscription_id, update_announcement_subscription_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.announcements_service.AnnouncementSubscriptionClient.update_announcement_subscription` and waits for the :py:class:`~oci.announcements_service.models.AnnouncementSubscription` acted upon + to enter the given state(s). + + :param str announcement_subscription_id: (required) + The OCID of the announcement subscription. + + :param oci.announcements_service.models.UpdateAnnouncementSubscriptionDetails update_announcement_subscription_details: (required) + The subscription information to update. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.announcements_service.models.AnnouncementSubscription.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.announcements_service.AnnouncementSubscriptionClient.update_announcement_subscription` + + :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_announcement_subscription(announcement_subscription_id, update_announcement_subscription_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_announcement_subscription(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/announcements_service/announcements_preferences_client.py b/src/oci/announcements_service/announcements_preferences_client.py index 843565f5a9..eb4d2f56ec 100644 --- a/src/oci/announcements_service/announcements_preferences_client.py +++ b/src/oci/announcements_service/announcements_preferences_client.py @@ -90,7 +90,7 @@ def __init__(self, config, **kwargs): 'regional_client': True, 'service_endpoint': kwargs.get('service_endpoint'), 'base_path': '/20180904', - 'service_endpoint_template': 'https://announcements.{region}.{secondLevelDomain}', + 'service_endpoint_template': 'https://announcements.{region}.oci.{secondLevelDomain}', 'skip_deserialization': kwargs.get('skip_deserialization', False), 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) } @@ -108,6 +108,8 @@ def create_announcements_preference(self, announcements_preference_details, **kw """ Creates a request that specifies preferences for the tenancy regarding receiving announcements by email. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param oci.announcements_service.models.CreateAnnouncementsPreferencesDetails announcements_preference_details: (required) The object that contains details about tenancy preferences for receiving announcements by email. @@ -189,6 +191,8 @@ def get_announcements_preference(self, preference_id, **kwargs): """ Gets the current preferences of the tenancy regarding receiving announcements by email. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str preference_id: (required) The ID of the preference. @@ -274,10 +278,11 @@ def list_announcements_preferences(self, compartment_id, **kwargs): """ Gets the current preferences of the tenancy regarding receiving announcements by email. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str compartment_id: (required) - The OCID of the compartment. Because announcements are specific to a tenancy, this is the - OCID of the root compartment. + The OCID of the compartment. :param int limit: (optional) The maximum number of items to return in a paginated \"List\" call. @@ -365,6 +370,8 @@ def update_announcements_preference(self, preference_id, announcements_preferenc """ Updates the preferences of the tenancy regarding receiving announcements by email. + This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy. + :param str preference_id: (required) The ID of the preference. diff --git a/src/oci/announcements_service/models/__init__.py b/src/oci/announcements_service/models/__init__.py index bd59e44ff3..c74d26caee 100644 --- a/src/oci/announcements_service/models/__init__.py +++ b/src/oci/announcements_service/models/__init__.py @@ -6,6 +6,9 @@ from .affected_resource import AffectedResource from .announcement import Announcement +from .announcement_subscription import AnnouncementSubscription +from .announcement_subscription_collection import AnnouncementSubscriptionCollection +from .announcement_subscription_summary import AnnouncementSubscriptionSummary from .announcement_summary import AnnouncementSummary from .announcement_user_status_details import AnnouncementUserStatusDetails from .announcements_collection import AnnouncementsCollection @@ -14,14 +17,25 @@ from .base_announcement import BaseAnnouncement from .base_announcements_preferences import BaseAnnouncementsPreferences from .base_create_announcements_preferences_details import BaseCreateAnnouncementsPreferencesDetails +from .change_announcement_subscription_compartment_details import ChangeAnnouncementSubscriptionCompartmentDetails +from .create_announcement_subscription_details import CreateAnnouncementSubscriptionDetails from .create_announcements_preferences_details import CreateAnnouncementsPreferencesDetails +from .create_filter_group_details import CreateFilterGroupDetails +from .filter import Filter +from .filter_group import FilterGroup +from .filter_group_details import FilterGroupDetails from .model_property import ModelProperty +from .update_announcement_subscription_details import UpdateAnnouncementSubscriptionDetails from .update_announcements_preferences_details import UpdateAnnouncementsPreferencesDetails +from .update_filter_group_details import UpdateFilterGroupDetails # Maps type names to classes for announcements_service services. announcements_service_type_mapping = { "AffectedResource": AffectedResource, "Announcement": Announcement, + "AnnouncementSubscription": AnnouncementSubscription, + "AnnouncementSubscriptionCollection": AnnouncementSubscriptionCollection, + "AnnouncementSubscriptionSummary": AnnouncementSubscriptionSummary, "AnnouncementSummary": AnnouncementSummary, "AnnouncementUserStatusDetails": AnnouncementUserStatusDetails, "AnnouncementsCollection": AnnouncementsCollection, @@ -30,7 +44,15 @@ "BaseAnnouncement": BaseAnnouncement, "BaseAnnouncementsPreferences": BaseAnnouncementsPreferences, "BaseCreateAnnouncementsPreferencesDetails": BaseCreateAnnouncementsPreferencesDetails, + "ChangeAnnouncementSubscriptionCompartmentDetails": ChangeAnnouncementSubscriptionCompartmentDetails, + "CreateAnnouncementSubscriptionDetails": CreateAnnouncementSubscriptionDetails, "CreateAnnouncementsPreferencesDetails": CreateAnnouncementsPreferencesDetails, + "CreateFilterGroupDetails": CreateFilterGroupDetails, + "Filter": Filter, + "FilterGroup": FilterGroup, + "FilterGroupDetails": FilterGroupDetails, "ModelProperty": ModelProperty, - "UpdateAnnouncementsPreferencesDetails": UpdateAnnouncementsPreferencesDetails + "UpdateAnnouncementSubscriptionDetails": UpdateAnnouncementSubscriptionDetails, + "UpdateAnnouncementsPreferencesDetails": UpdateAnnouncementsPreferencesDetails, + "UpdateFilterGroupDetails": UpdateFilterGroupDetails } diff --git a/src/oci/announcements_service/models/announcement.py b/src/oci/announcements_service/models/announcement.py index 7ca9c92f41..6ef15d1ff1 100644 --- a/src/oci/announcements_service/models/announcement.py +++ b/src/oci/announcements_service/models/announcement.py @@ -95,6 +95,16 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this Announcement. :type time_updated: datetime + :param environment_name: + The value to assign to the environment_name property of this Announcement. + :type environment_name: str + + :param platform_type: + The value to assign to the platform_type property of this Announcement. + Allowed values for this property are: "IAAS", "SAAS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type platform_type: str + :param description: The value to assign to the description property of this Announcement. :type description: str @@ -126,6 +136,8 @@ def __init__(self, **kwargs): 'is_banner': 'bool', 'time_created': 'datetime', 'time_updated': 'datetime', + 'environment_name': 'str', + 'platform_type': 'str', 'description': 'str', 'additional_information': 'str', 'affected_resources': 'list[AffectedResource]' @@ -149,6 +161,8 @@ def __init__(self, **kwargs): 'is_banner': 'isBanner', 'time_created': 'timeCreated', 'time_updated': 'timeUpdated', + 'environment_name': 'environmentName', + 'platform_type': 'platformType', 'description': 'description', 'additional_information': 'additionalInformation', 'affected_resources': 'affectedResources' @@ -171,6 +185,8 @@ def __init__(self, **kwargs): self._is_banner = None self._time_created = None self._time_updated = None + self._environment_name = None + self._platform_type = None self._description = None self._additional_information = None self._affected_resources = None diff --git a/src/oci/announcements_service/models/announcement_subscription.py b/src/oci/announcements_service/models/announcement_subscription.py new file mode 100644 index 0000000000..1daa111720 --- /dev/null +++ b/src/oci/announcements_service/models/announcement_subscription.py @@ -0,0 +1,480 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnnouncementSubscription(object): + """ + A subscription with the Announcements service to receive selected announcements in the format and delivery mechanisms supported by a corresponding topic endpoint configured in the Oracle Cloud Infrastructure Notifications service. + """ + + #: A constant which can be used with the lifecycle_state property of a AnnouncementSubscription. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AnnouncementSubscription. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a AnnouncementSubscription. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new AnnouncementSubscription 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 AnnouncementSubscription. + :type id: str + + :param display_name: + The value to assign to the display_name property of this AnnouncementSubscription. + :type display_name: str + + :param description: + The value to assign to the description property of this AnnouncementSubscription. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this AnnouncementSubscription. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this AnnouncementSubscription. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AnnouncementSubscription. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AnnouncementSubscription. + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AnnouncementSubscription. + :type lifecycle_details: str + + :param ons_topic_id: + The value to assign to the ons_topic_id property of this AnnouncementSubscription. + :type ons_topic_id: str + + :param filter_groups: + The value to assign to the filter_groups property of this AnnouncementSubscription. + :type filter_groups: dict(str, FilterGroup) + + :param freeform_tags: + The value to assign to the freeform_tags property of this AnnouncementSubscription. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AnnouncementSubscription. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AnnouncementSubscription. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'ons_topic_id': 'str', + 'filter_groups': 'dict(str, FilterGroup)', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'ons_topic_id': 'onsTopicId', + 'filter_groups': 'filterGroups', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._ons_topic_id = None + self._filter_groups = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AnnouncementSubscription. + The `OCID`__ of the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The id of this AnnouncementSubscription. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AnnouncementSubscription. + The `OCID`__ of the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param id: The id of this AnnouncementSubscription. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AnnouncementSubscription. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this AnnouncementSubscription. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AnnouncementSubscription. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this AnnouncementSubscription. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AnnouncementSubscription. + A description of the announcement subscription. Avoid entering confidential information. + + + :return: The description of this AnnouncementSubscription. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AnnouncementSubscription. + A description of the announcement subscription. Avoid entering confidential information. + + + :param description: The description of this AnnouncementSubscription. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AnnouncementSubscription. + The OCID of the compartment that contains the announcement subscription. + + + :return: The compartment_id of this AnnouncementSubscription. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AnnouncementSubscription. + The OCID of the compartment that contains the announcement subscription. + + + :param compartment_id: The compartment_id of this AnnouncementSubscription. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AnnouncementSubscription. + The date and time that the announcement subscription was created, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AnnouncementSubscription. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AnnouncementSubscription. + The date and time that the announcement subscription was created, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AnnouncementSubscription. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this AnnouncementSubscription. + The date and time that the announcement subscription was updated, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this AnnouncementSubscription. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AnnouncementSubscription. + The date and time that the announcement subscription was updated, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this AnnouncementSubscription. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AnnouncementSubscription. + The current lifecycle state of the announcement subscription. + + Allowed values for this property are: "ACTIVE", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AnnouncementSubscription. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AnnouncementSubscription. + The current lifecycle state of the announcement subscription. + + + :param lifecycle_state: The lifecycle_state of this AnnouncementSubscription. + :type: str + """ + allowed_values = ["ACTIVE", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this AnnouncementSubscription. + A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state. + + + :return: The lifecycle_details of this AnnouncementSubscription. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AnnouncementSubscription. + A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state. + + + :param lifecycle_details: The lifecycle_details of this AnnouncementSubscription. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def ons_topic_id(self): + """ + **[Required]** Gets the ons_topic_id of this AnnouncementSubscription. + The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. + + + :return: The ons_topic_id of this AnnouncementSubscription. + :rtype: str + """ + return self._ons_topic_id + + @ons_topic_id.setter + def ons_topic_id(self, ons_topic_id): + """ + Sets the ons_topic_id of this AnnouncementSubscription. + The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. + + + :param ons_topic_id: The ons_topic_id of this AnnouncementSubscription. + :type: str + """ + self._ons_topic_id = ons_topic_id + + @property + def filter_groups(self): + """ + Gets the filter_groups of this AnnouncementSubscription. + A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes. + + + :return: The filter_groups of this AnnouncementSubscription. + :rtype: dict(str, FilterGroup) + """ + return self._filter_groups + + @filter_groups.setter + def filter_groups(self, filter_groups): + """ + Sets the filter_groups of this AnnouncementSubscription. + A list of filter groups for the announcement subscription. A filter group is a combination of multiple filters applied to announcements for matching purposes. + + + :param filter_groups: The filter_groups of this AnnouncementSubscription. + :type: dict(str, FilterGroup) + """ + self._filter_groups = filter_groups + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this AnnouncementSubscription. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this AnnouncementSubscription. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AnnouncementSubscription. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this AnnouncementSubscription. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this AnnouncementSubscription. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this AnnouncementSubscription. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AnnouncementSubscription. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this AnnouncementSubscription. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AnnouncementSubscription. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AnnouncementSubscription. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AnnouncementSubscription. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AnnouncementSubscription. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/announcement_subscription_collection.py b/src/oci/announcements_service/models/announcement_subscription_collection.py new file mode 100644 index 0000000000..9cba84b851 --- /dev/null +++ b/src/oci/announcements_service/models/announcement_subscription_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnnouncementSubscriptionCollection(object): + """ + The results of a search for announcement subscriptions. This object contains both announcement subscription summary objects and other information, such as metadata. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AnnouncementSubscriptionCollection 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 AnnouncementSubscriptionCollection. + :type items: list[oci.announcements_service.models.AnnouncementSubscriptionSummary] + + """ + self.swagger_types = { + 'items': 'list[AnnouncementSubscriptionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AnnouncementSubscriptionCollection. + A list of announcement subscriptions. + + + :return: The items of this AnnouncementSubscriptionCollection. + :rtype: list[oci.announcements_service.models.AnnouncementSubscriptionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AnnouncementSubscriptionCollection. + A list of announcement subscriptions. + + + :param items: The items of this AnnouncementSubscriptionCollection. + :type: list[oci.announcements_service.models.AnnouncementSubscriptionSummary] + """ + 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/announcements_service/models/announcement_subscription_summary.py b/src/oci/announcements_service/models/announcement_subscription_summary.py new file mode 100644 index 0000000000..6e56886db8 --- /dev/null +++ b/src/oci/announcements_service/models/announcement_subscription_summary.py @@ -0,0 +1,398 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AnnouncementSubscriptionSummary(object): + """ + A summary representation of an announcement subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AnnouncementSubscriptionSummary 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 AnnouncementSubscriptionSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this AnnouncementSubscriptionSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this AnnouncementSubscriptionSummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this AnnouncementSubscriptionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AnnouncementSubscriptionSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AnnouncementSubscriptionSummary. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AnnouncementSubscriptionSummary. + :type lifecycle_details: str + + :param ons_topic_id: + The value to assign to the ons_topic_id property of this AnnouncementSubscriptionSummary. + :type ons_topic_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AnnouncementSubscriptionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AnnouncementSubscriptionSummary. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AnnouncementSubscriptionSummary. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'ons_topic_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'ons_topic_id': 'onsTopicId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._ons_topic_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AnnouncementSubscriptionSummary. + The `OCID`__ of the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The id of this AnnouncementSubscriptionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AnnouncementSubscriptionSummary. + The `OCID`__ of the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param id: The id of this AnnouncementSubscriptionSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AnnouncementSubscriptionSummary. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this AnnouncementSubscriptionSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AnnouncementSubscriptionSummary. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this AnnouncementSubscriptionSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AnnouncementSubscriptionSummary. + The OCID of the compartment that contains the announcement subscription. + + + :return: The compartment_id of this AnnouncementSubscriptionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AnnouncementSubscriptionSummary. + The OCID of the compartment that contains the announcement subscription. + + + :param compartment_id: The compartment_id of this AnnouncementSubscriptionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AnnouncementSubscriptionSummary. + The date and time that the announcement subscription was created, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AnnouncementSubscriptionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AnnouncementSubscriptionSummary. + The date and time that the announcement subscription was created, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AnnouncementSubscriptionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this AnnouncementSubscriptionSummary. + The date and time that the announcement subscription was updated, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this AnnouncementSubscriptionSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AnnouncementSubscriptionSummary. + The date and time that the announcement subscription was updated, expressed in `RFC 3339`__ timestamp format. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this AnnouncementSubscriptionSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AnnouncementSubscriptionSummary. + The current lifecycle state of the announcement subscription. + + + :return: The lifecycle_state of this AnnouncementSubscriptionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AnnouncementSubscriptionSummary. + The current lifecycle state of the announcement subscription. + + + :param lifecycle_state: The lifecycle_state of this AnnouncementSubscriptionSummary. + :type: str + """ + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this AnnouncementSubscriptionSummary. + A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state. + + + :return: The lifecycle_details of this AnnouncementSubscriptionSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AnnouncementSubscriptionSummary. + A message describing the current lifecycle state in more detail. For example, details might provide required or recommended actions for a resource in a Failed state. + + + :param lifecycle_details: The lifecycle_details of this AnnouncementSubscriptionSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def ons_topic_id(self): + """ + **[Required]** Gets the ons_topic_id of this AnnouncementSubscriptionSummary. + The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. + + + :return: The ons_topic_id of this AnnouncementSubscriptionSummary. + :rtype: str + """ + return self._ons_topic_id + + @ons_topic_id.setter + def ons_topic_id(self, ons_topic_id): + """ + Sets the ons_topic_id of this AnnouncementSubscriptionSummary. + The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. + + + :param ons_topic_id: The ons_topic_id of this AnnouncementSubscriptionSummary. + :type: str + """ + self._ons_topic_id = ons_topic_id + + @property + def freeform_tags(self): + """ + **[Required]** Gets the freeform_tags of this AnnouncementSubscriptionSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this AnnouncementSubscriptionSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AnnouncementSubscriptionSummary. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this AnnouncementSubscriptionSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + **[Required]** Gets the defined_tags of this AnnouncementSubscriptionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this AnnouncementSubscriptionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AnnouncementSubscriptionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this AnnouncementSubscriptionSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AnnouncementSubscriptionSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AnnouncementSubscriptionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AnnouncementSubscriptionSummary. + Usage of system tag keys. These predefined keys are scoped to namespaces. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AnnouncementSubscriptionSummary. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/announcement_summary.py b/src/oci/announcements_service/models/announcement_summary.py index 2dd1f947d1..7d1b0c5ab7 100644 --- a/src/oci/announcements_service/models/announcement_summary.py +++ b/src/oci/announcements_service/models/announcement_summary.py @@ -95,6 +95,16 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this AnnouncementSummary. :type time_updated: datetime + :param environment_name: + The value to assign to the environment_name property of this AnnouncementSummary. + :type environment_name: str + + :param platform_type: + The value to assign to the platform_type property of this AnnouncementSummary. + Allowed values for this property are: "IAAS", "SAAS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type platform_type: str + """ self.swagger_types = { 'id': 'str', @@ -113,7 +123,9 @@ def __init__(self, **kwargs): 'lifecycle_state': 'str', 'is_banner': 'bool', 'time_created': 'datetime', - 'time_updated': 'datetime' + 'time_updated': 'datetime', + 'environment_name': 'str', + 'platform_type': 'str' } self.attribute_map = { @@ -133,7 +145,9 @@ def __init__(self, **kwargs): 'lifecycle_state': 'lifecycleState', 'is_banner': 'isBanner', 'time_created': 'timeCreated', - 'time_updated': 'timeUpdated' + 'time_updated': 'timeUpdated', + 'environment_name': 'environmentName', + 'platform_type': 'platformType' } self._id = None @@ -153,6 +167,8 @@ def __init__(self, **kwargs): self._is_banner = None self._time_created = None self._time_updated = None + self._environment_name = None + self._platform_type = None self._type = 'AnnouncementSummary' def __repr__(self): diff --git a/src/oci/announcements_service/models/base_announcement.py b/src/oci/announcements_service/models/base_announcement.py index f8aad822e4..ab3e6dabcb 100644 --- a/src/oci/announcements_service/models/base_announcement.py +++ b/src/oci/announcements_service/models/base_announcement.py @@ -109,6 +109,14 @@ class BaseAnnouncement(object): #: This constant has a value of "INACTIVE" LIFECYCLE_STATE_INACTIVE = "INACTIVE" + #: A constant which can be used with the platform_type property of a BaseAnnouncement. + #: This constant has a value of "IAAS" + PLATFORM_TYPE_IAAS = "IAAS" + + #: A constant which can be used with the platform_type property of a BaseAnnouncement. + #: This constant has a value of "SAAS" + PLATFORM_TYPE_SAAS = "SAAS" + def __init__(self, **kwargs): """ Initializes a new BaseAnnouncement object with values from keyword arguments. This class has the following subclasses and if you are using this class as input @@ -191,6 +199,15 @@ def __init__(self, **kwargs): The value to assign to the time_updated property of this BaseAnnouncement. :type time_updated: datetime + :param environment_name: + The value to assign to the environment_name property of this BaseAnnouncement. + :type environment_name: str + + :param platform_type: + The value to assign to the platform_type property of this BaseAnnouncement. + Allowed values for this property are: "IAAS", "SAAS" + :type platform_type: str + """ self.swagger_types = { 'id': 'str', @@ -209,7 +226,9 @@ def __init__(self, **kwargs): 'lifecycle_state': 'str', 'is_banner': 'bool', 'time_created': 'datetime', - 'time_updated': 'datetime' + 'time_updated': 'datetime', + 'environment_name': 'str', + 'platform_type': 'str' } self.attribute_map = { @@ -229,7 +248,9 @@ def __init__(self, **kwargs): 'lifecycle_state': 'lifecycleState', 'is_banner': 'isBanner', 'time_created': 'timeCreated', - 'time_updated': 'timeUpdated' + 'time_updated': 'timeUpdated', + 'environment_name': 'environmentName', + 'platform_type': 'platformType' } self._id = None @@ -249,6 +270,8 @@ def __init__(self, **kwargs): self._is_banner = None self._time_created = None self._time_updated = None + self._environment_name = None + self._platform_type = None @staticmethod def get_subtype(object_dictionary): @@ -732,6 +755,62 @@ def time_updated(self, time_updated): """ self._time_updated = time_updated + @property + def environment_name(self): + """ + Gets the environment_name of this BaseAnnouncement. + The name of the environment that this announcement pertains to. + + + :return: The environment_name of this BaseAnnouncement. + :rtype: str + """ + return self._environment_name + + @environment_name.setter + def environment_name(self, environment_name): + """ + Sets the environment_name of this BaseAnnouncement. + The name of the environment that this announcement pertains to. + + + :param environment_name: The environment_name of this BaseAnnouncement. + :type: str + """ + self._environment_name = environment_name + + @property + def platform_type(self): + """ + Gets the platform_type of this BaseAnnouncement. + The platform type that this announcement pertains to. + + Allowed values for this property are: "IAAS", "SAAS" + + + :return: The platform_type of this BaseAnnouncement. + :rtype: str + """ + return self._platform_type + + @platform_type.setter + def platform_type(self, platform_type): + """ + Sets the platform_type of this BaseAnnouncement. + The platform type that this announcement pertains to. + + + :param platform_type: The platform_type of this BaseAnnouncement. + :type: str + """ + allowed_values = ["IAAS", "SAAS"] + if not value_allowed_none_or_none_sentinel(platform_type, allowed_values): + raise ValueError( + "Invalid value for `platform_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._platform_type = platform_type + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/announcements_service/models/change_announcement_subscription_compartment_details.py b/src/oci/announcements_service/models/change_announcement_subscription_compartment_details.py new file mode 100644 index 0000000000..b553fc23e7 --- /dev/null +++ b/src/oci/announcements_service/models/change_announcement_subscription_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeAnnouncementSubscriptionCompartmentDetails(object): + """ + The details of the request to change the compartment of the announcement subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeAnnouncementSubscriptionCompartmentDetails 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 ChangeAnnouncementSubscriptionCompartmentDetails. + :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 ChangeAnnouncementSubscriptionCompartmentDetails. + The `OCID`__ of the compartment + into which you want to move the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeAnnouncementSubscriptionCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeAnnouncementSubscriptionCompartmentDetails. + The `OCID`__ of the compartment + into which you want to move the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeAnnouncementSubscriptionCompartmentDetails. + :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/announcements_service/models/create_announcement_subscription_details.py b/src/oci/announcements_service/models/create_announcement_subscription_details.py new file mode 100644 index 0000000000..030f5dc93f --- /dev/null +++ b/src/oci/announcements_service/models/create_announcement_subscription_details.py @@ -0,0 +1,268 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAnnouncementSubscriptionDetails(object): + """ + The details for creating a new announcement subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAnnouncementSubscriptionDetails 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 CreateAnnouncementSubscriptionDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateAnnouncementSubscriptionDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateAnnouncementSubscriptionDetails. + :type compartment_id: str + + :param ons_topic_id: + The value to assign to the ons_topic_id property of this CreateAnnouncementSubscriptionDetails. + :type ons_topic_id: str + + :param filter_groups: + The value to assign to the filter_groups property of this CreateAnnouncementSubscriptionDetails. + :type filter_groups: dict(str, FilterGroupDetails) + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAnnouncementSubscriptionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAnnouncementSubscriptionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'ons_topic_id': 'str', + 'filter_groups': 'dict(str, FilterGroupDetails)', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'ons_topic_id': 'onsTopicId', + 'filter_groups': 'filterGroups', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._ons_topic_id = None + self._filter_groups = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CreateAnnouncementSubscriptionDetails. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this CreateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAnnouncementSubscriptionDetails. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this CreateAnnouncementSubscriptionDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateAnnouncementSubscriptionDetails. + A description of the announcement subscription. Avoid entering confidential information. + + + :return: The description of this CreateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAnnouncementSubscriptionDetails. + A description of the announcement subscription. Avoid entering confidential information. + + + :param description: The description of this CreateAnnouncementSubscriptionDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateAnnouncementSubscriptionDetails. + The `OCID`__ of the compartment where you want to create the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this CreateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateAnnouncementSubscriptionDetails. + The `OCID`__ of the compartment where you want to create the announcement subscription. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this CreateAnnouncementSubscriptionDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def ons_topic_id(self): + """ + **[Required]** Gets the ons_topic_id of this CreateAnnouncementSubscriptionDetails. + The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. The caller of the operation needs the ONS_TOPIC_PUBLISH permission for the targeted Notifications service topic. For more information about Notifications permissions, see `Details for Notifications`__. + + __ https://docs.cloud.oracle.com/Content/Identity/policyreference/notificationpolicyreference.htm + + + :return: The ons_topic_id of this CreateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._ons_topic_id + + @ons_topic_id.setter + def ons_topic_id(self, ons_topic_id): + """ + Sets the ons_topic_id of this CreateAnnouncementSubscriptionDetails. + The OCID of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. The caller of the operation needs the ONS_TOPIC_PUBLISH permission for the targeted Notifications service topic. For more information about Notifications permissions, see `Details for Notifications`__. + + __ https://docs.cloud.oracle.com/Content/Identity/policyreference/notificationpolicyreference.htm + + + :param ons_topic_id: The ons_topic_id of this CreateAnnouncementSubscriptionDetails. + :type: str + """ + self._ons_topic_id = ons_topic_id + + @property + def filter_groups(self): + """ + Gets the filter_groups of this CreateAnnouncementSubscriptionDetails. + A list of filter groups for the announcement subscription. A filter group combines one or more filters that the Announcements service applies to announcements for matching purposes. + + + :return: The filter_groups of this CreateAnnouncementSubscriptionDetails. + :rtype: dict(str, FilterGroupDetails) + """ + return self._filter_groups + + @filter_groups.setter + def filter_groups(self, filter_groups): + """ + Sets the filter_groups of this CreateAnnouncementSubscriptionDetails. + A list of filter groups for the announcement subscription. A filter group combines one or more filters that the Announcements service applies to announcements for matching purposes. + + + :param filter_groups: The filter_groups of this CreateAnnouncementSubscriptionDetails. + :type: dict(str, FilterGroupDetails) + """ + self._filter_groups = filter_groups + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateAnnouncementSubscriptionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this CreateAnnouncementSubscriptionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateAnnouncementSubscriptionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this CreateAnnouncementSubscriptionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateAnnouncementSubscriptionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this CreateAnnouncementSubscriptionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateAnnouncementSubscriptionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this CreateAnnouncementSubscriptionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/create_filter_group_details.py b/src/oci/announcements_service/models/create_filter_group_details.py new file mode 100644 index 0000000000..059681a3b0 --- /dev/null +++ b/src/oci/announcements_service/models/create_filter_group_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateFilterGroupDetails(object): + """ + The details for creating a new filter group for an announcement subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateFilterGroupDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this CreateFilterGroupDetails. + :type name: str + + :param filters: + The value to assign to the filters property of this CreateFilterGroupDetails. + :type filters: list[oci.announcements_service.models.Filter] + + """ + self.swagger_types = { + 'name': 'str', + 'filters': 'list[Filter]' + } + + self.attribute_map = { + 'name': 'name', + 'filters': 'filters' + } + + self._name = None + self._filters = None + + @property + def name(self): + """ + **[Required]** Gets the name of this CreateFilterGroupDetails. + The name of the filter group. The name must be unique and it cannot be changed. Avoid entering confidential information. + + + :return: The name of this CreateFilterGroupDetails. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this CreateFilterGroupDetails. + The name of the filter group. The name must be unique and it cannot be changed. Avoid entering confidential information. + + + :param name: The name of this CreateFilterGroupDetails. + :type: str + """ + self._name = name + + @property + def filters(self): + """ + **[Required]** Gets the filters of this CreateFilterGroupDetails. + A list of filters against which the Announcements service will match announcements. You cannot have more than one of any given filter type within a filter group. + + + :return: The filters of this CreateFilterGroupDetails. + :rtype: list[oci.announcements_service.models.Filter] + """ + return self._filters + + @filters.setter + def filters(self, filters): + """ + Sets the filters of this CreateFilterGroupDetails. + A list of filters against which the Announcements service will match announcements. You cannot have more than one of any given filter type within a filter group. + + + :param filters: The filters of this CreateFilterGroupDetails. + :type: list[oci.announcements_service.models.Filter] + """ + self._filters = filters + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/filter.py b/src/oci/announcements_service/models/filter.py new file mode 100644 index 0000000000..0043541c99 --- /dev/null +++ b/src/oci/announcements_service/models/filter.py @@ -0,0 +1,133 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Filter(object): + """ + Criteria that the Announcements service uses to match announcements in order to provide only desired, matching announcements. + """ + + #: A constant which can be used with the type property of a Filter. + #: This constant has a value of "COMPARTMENT_ID" + TYPE_COMPARTMENT_ID = "COMPARTMENT_ID" + + #: A constant which can be used with the type property of a Filter. + #: This constant has a value of "PLATFORM_TYPE" + TYPE_PLATFORM_TYPE = "PLATFORM_TYPE" + + #: A constant which can be used with the type property of a Filter. + #: This constant has a value of "REGION" + TYPE_REGION = "REGION" + + #: A constant which can be used with the type property of a Filter. + #: This constant has a value of "SERVICE" + TYPE_SERVICE = "SERVICE" + + #: A constant which can be used with the type property of a Filter. + #: This constant has a value of "RESOURCE_ID" + TYPE_RESOURCE_ID = "RESOURCE_ID" + + #: A constant which can be used with the type property of a Filter. + #: This constant has a value of "ANNOUNCEMENT_TYPE" + TYPE_ANNOUNCEMENT_TYPE = "ANNOUNCEMENT_TYPE" + + def __init__(self, **kwargs): + """ + Initializes a new Filter object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this Filter. + Allowed values for this property are: "COMPARTMENT_ID", "PLATFORM_TYPE", "REGION", "SERVICE", "RESOURCE_ID", "ANNOUNCEMENT_TYPE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param value: + The value to assign to the value property of this Filter. + :type value: str + + """ + self.swagger_types = { + 'type': 'str', + 'value': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'value': 'value' + } + + self._type = None + self._value = None + + @property + def type(self): + """ + **[Required]** Gets the type of this Filter. + The type of filter. + + Allowed values for this property are: "COMPARTMENT_ID", "PLATFORM_TYPE", "REGION", "SERVICE", "RESOURCE_ID", "ANNOUNCEMENT_TYPE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this Filter. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this Filter. + The type of filter. + + + :param type: The type of this Filter. + :type: str + """ + allowed_values = ["COMPARTMENT_ID", "PLATFORM_TYPE", "REGION", "SERVICE", "RESOURCE_ID", "ANNOUNCEMENT_TYPE"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def value(self): + """ + **[Required]** Gets the value of this Filter. + The value of the filter. + + + :return: The value of this Filter. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this Filter. + The value of the filter. + + + :param value: The value of this Filter. + :type: str + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/filter_group.py b/src/oci/announcements_service/models/filter_group.py new file mode 100644 index 0000000000..7cadb4bde0 --- /dev/null +++ b/src/oci/announcements_service/models/filter_group.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FilterGroup(object): + """ + A group of filters to match announcements against. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FilterGroup object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this FilterGroup. + :type name: str + + :param filters: + The value to assign to the filters property of this FilterGroup. + :type filters: list[oci.announcements_service.models.Filter] + + """ + self.swagger_types = { + 'name': 'str', + 'filters': 'list[Filter]' + } + + self.attribute_map = { + 'name': 'name', + 'filters': 'filters' + } + + self._name = None + self._filters = None + + @property + def name(self): + """ + **[Required]** Gets the name of this FilterGroup. + The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information. + + + :return: The name of this FilterGroup. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FilterGroup. + The name of the group. The name must be unique and it cannot be changed. Avoid entering confidential information. + + + :param name: The name of this FilterGroup. + :type: str + """ + self._name = name + + @property + def filters(self): + """ + **[Required]** Gets the filters of this FilterGroup. + A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group. + + + :return: The filters of this FilterGroup. + :rtype: list[oci.announcements_service.models.Filter] + """ + return self._filters + + @filters.setter + def filters(self, filters): + """ + Sets the filters of this FilterGroup. + A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. You also cannot combine the RESOURCE_ID filter with any other type of filter within a given filter group. + + + :param filters: The filters of this FilterGroup. + :type: list[oci.announcements_service.models.Filter] + """ + self._filters = filters + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/filter_group_details.py b/src/oci/announcements_service/models/filter_group_details.py new file mode 100644 index 0000000000..0827e861ca --- /dev/null +++ b/src/oci/announcements_service/models/filter_group_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FilterGroupDetails(object): + """ + The details of a group of filters to match announcements against. A filter group combines one or more individual filters. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FilterGroupDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param filters: + The value to assign to the filters property of this FilterGroupDetails. + :type filters: list[oci.announcements_service.models.Filter] + + """ + self.swagger_types = { + 'filters': 'list[Filter]' + } + + self.attribute_map = { + 'filters': 'filters' + } + + self._filters = None + + @property + def filters(self): + """ + **[Required]** Gets the filters of this FilterGroupDetails. + A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. + + + :return: The filters of this FilterGroupDetails. + :rtype: list[oci.announcements_service.models.Filter] + """ + return self._filters + + @filters.setter + def filters(self, filters): + """ + Sets the filters of this FilterGroupDetails. + A list of filters against which the Announcements service matches announcements. You cannot have more than one of any given filter type within a filter group. + + + :param filters: The filters of this FilterGroupDetails. + :type: list[oci.announcements_service.models.Filter] + """ + self._filters = filters + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/update_announcement_subscription_details.py b/src/oci/announcements_service/models/update_announcement_subscription_details.py new file mode 100644 index 0000000000..4e44d1ac93 --- /dev/null +++ b/src/oci/announcements_service/models/update_announcement_subscription_details.py @@ -0,0 +1,204 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAnnouncementSubscriptionDetails(object): + """ + The details for updating an announcement subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAnnouncementSubscriptionDetails 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 UpdateAnnouncementSubscriptionDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateAnnouncementSubscriptionDetails. + :type description: str + + :param ons_topic_id: + The value to assign to the ons_topic_id property of this UpdateAnnouncementSubscriptionDetails. + :type ons_topic_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAnnouncementSubscriptionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAnnouncementSubscriptionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'ons_topic_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'ons_topic_id': 'onsTopicId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._ons_topic_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateAnnouncementSubscriptionDetails. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :return: The display_name of this UpdateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAnnouncementSubscriptionDetails. + A user-friendly name for the announcement subscription. Does not have to be unique, and it's changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this UpdateAnnouncementSubscriptionDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateAnnouncementSubscriptionDetails. + A description of the announcement subscription. Avoid entering confidential information. + + + :return: The description of this UpdateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAnnouncementSubscriptionDetails. + A description of the announcement subscription. Avoid entering confidential information. + + + :param description: The description of this UpdateAnnouncementSubscriptionDetails. + :type: str + """ + self._description = description + + @property + def ons_topic_id(self): + """ + Gets the ons_topic_id of this UpdateAnnouncementSubscriptionDetails. + The `OCID`__ of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. The caller of the operation needs the ONS_TOPIC_PUBLISH permission for the targeted Notifications service topic. For more information about Notifications permissions, see `Details for Notifications`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Identity/policyreference/notificationpolicyreference.htm + + + :return: The ons_topic_id of this UpdateAnnouncementSubscriptionDetails. + :rtype: str + """ + return self._ons_topic_id + + @ons_topic_id.setter + def ons_topic_id(self, ons_topic_id): + """ + Sets the ons_topic_id of this UpdateAnnouncementSubscriptionDetails. + The `OCID`__ of the Notifications service topic that is the target for publishing announcements that match the configured announcement subscription. The caller of the operation needs the ONS_TOPIC_PUBLISH permission for the targeted Notifications service topic. For more information about Notifications permissions, see `Details for Notifications`__. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + __ https://docs.cloud.oracle.com/Content/Identity/policyreference/notificationpolicyreference.htm + + + :param ons_topic_id: The ons_topic_id of this UpdateAnnouncementSubscriptionDetails. + :type: str + """ + self._ons_topic_id = ons_topic_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAnnouncementSubscriptionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :return: The freeform_tags of this UpdateAnnouncementSubscriptionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAnnouncementSubscriptionDetails. + Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. + Example: `{\"bar-key\": \"value\"}` + + + :param freeform_tags: The freeform_tags of this UpdateAnnouncementSubscriptionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAnnouncementSubscriptionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :return: The defined_tags of this UpdateAnnouncementSubscriptionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAnnouncementSubscriptionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. + Example: `{\"foo-namespace\": {\"bar-key\": \"value\"}}` + + + :param defined_tags: The defined_tags of this UpdateAnnouncementSubscriptionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/announcements_service/models/update_filter_group_details.py b/src/oci/announcements_service/models/update_filter_group_details.py new file mode 100644 index 0000000000..7877d66a50 --- /dev/null +++ b/src/oci/announcements_service/models/update_filter_group_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateFilterGroupDetails(object): + """ + The details for updating a filter group in an announcement subscription. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateFilterGroupDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param filters: + The value to assign to the filters property of this UpdateFilterGroupDetails. + :type filters: list[oci.announcements_service.models.Filter] + + """ + self.swagger_types = { + 'filters': 'list[Filter]' + } + + self.attribute_map = { + 'filters': 'filters' + } + + self._filters = None + + @property + def filters(self): + """ + **[Required]** Gets the filters of this UpdateFilterGroupDetails. + A list of filters against which the Announcements service will match announcements. You cannot have more than one of any given filter type within a filter group. + + + :return: The filters of this UpdateFilterGroupDetails. + :rtype: list[oci.announcements_service.models.Filter] + """ + return self._filters + + @filters.setter + def filters(self, filters): + """ + Sets the filters of this UpdateFilterGroupDetails. + A list of filters against which the Announcements service will match announcements. You cannot have more than one of any given filter type within a filter group. + + + :param filters: The filters of this UpdateFilterGroupDetails. + :type: list[oci.announcements_service.models.Filter] + """ + self._filters = filters + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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/__init__.py b/src/oci/apm_traces/models/__init__.py index 29274cde2a..88600399e4 100644 --- a/src/oci/apm_traces/models/__init__.py +++ b/src/oci/apm_traces/models/__init__.py @@ -4,6 +4,8 @@ from __future__ import absolute_import +from .aggregated_snapshot import AggregatedSnapshot +from .aggregated_stack_trace import AggregatedStackTrace from .query_details import QueryDetails from .query_result_metadata_summary import QueryResultMetadataSummary from .query_result_response import QueryResultResponse @@ -12,16 +14,23 @@ from .query_results_grouped_by_summary import QueryResultsGroupedBySummary from .query_results_ordered_by_summary import QueryResultsOrderedBySummary from .quick_pick_summary import QuickPickSummary +from .snapshot_detail import SnapshotDetail from .span import Span from .span_log import SpanLog from .span_log_collection import SpanLogCollection +from .span_snapshot import SpanSnapshot +from .stack_trace_element import StackTraceElement from .tag import Tag +from .thread_snapshot import ThreadSnapshot from .trace import Trace from .trace_service_summary import TraceServiceSummary +from .trace_snapshot import TraceSnapshot from .trace_span_summary import TraceSpanSummary # Maps type names to classes for apm_traces services. apm_traces_type_mapping = { + "AggregatedSnapshot": AggregatedSnapshot, + "AggregatedStackTrace": AggregatedStackTrace, "QueryDetails": QueryDetails, "QueryResultMetadataSummary": QueryResultMetadataSummary, "QueryResultResponse": QueryResultResponse, @@ -30,11 +39,16 @@ "QueryResultsGroupedBySummary": QueryResultsGroupedBySummary, "QueryResultsOrderedBySummary": QueryResultsOrderedBySummary, "QuickPickSummary": QuickPickSummary, + "SnapshotDetail": SnapshotDetail, "Span": Span, "SpanLog": SpanLog, "SpanLogCollection": SpanLogCollection, + "SpanSnapshot": SpanSnapshot, + "StackTraceElement": StackTraceElement, "Tag": Tag, + "ThreadSnapshot": ThreadSnapshot, "Trace": Trace, "TraceServiceSummary": TraceServiceSummary, + "TraceSnapshot": TraceSnapshot, "TraceSpanSummary": TraceSpanSummary } diff --git a/src/oci/apm_traces/models/aggregated_snapshot.py b/src/oci/apm_traces/models/aggregated_snapshot.py new file mode 100644 index 0000000000..2759a60099 --- /dev/null +++ b/src/oci/apm_traces/models/aggregated_snapshot.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AggregatedSnapshot(object): + """ + Aggregated snapshots of all spans. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AggregatedSnapshot object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param details: + The value to assign to the details property of this AggregatedSnapshot. + :type details: list[oci.apm_traces.models.SnapshotDetail] + + :param aggregated_stack_traces: + The value to assign to the aggregated_stack_traces property of this AggregatedSnapshot. + :type aggregated_stack_traces: list[oci.apm_traces.models.AggregatedStackTrace] + + """ + self.swagger_types = { + 'details': 'list[SnapshotDetail]', + 'aggregated_stack_traces': 'list[AggregatedStackTrace]' + } + + self.attribute_map = { + 'details': 'details', + 'aggregated_stack_traces': 'aggregatedStackTraces' + } + + self._details = None + self._aggregated_stack_traces = None + + @property + def details(self): + """ + **[Required]** Gets the details of this AggregatedSnapshot. + Aggregated snapshot details. + + + :return: The details of this AggregatedSnapshot. + :rtype: list[oci.apm_traces.models.SnapshotDetail] + """ + return self._details + + @details.setter + def details(self, details): + """ + Sets the details of this AggregatedSnapshot. + Aggregated snapshot details. + + + :param details: The details of this AggregatedSnapshot. + :type: list[oci.apm_traces.models.SnapshotDetail] + """ + self._details = details + + @property + def aggregated_stack_traces(self): + """ + **[Required]** Gets the aggregated_stack_traces of this AggregatedSnapshot. + List of aggregated stack trace. + + + :return: The aggregated_stack_traces of this AggregatedSnapshot. + :rtype: list[oci.apm_traces.models.AggregatedStackTrace] + """ + return self._aggregated_stack_traces + + @aggregated_stack_traces.setter + def aggregated_stack_traces(self, aggregated_stack_traces): + """ + Sets the aggregated_stack_traces of this AggregatedSnapshot. + List of aggregated stack trace. + + + :param aggregated_stack_traces: The aggregated_stack_traces of this AggregatedSnapshot. + :type: list[oci.apm_traces.models.AggregatedStackTrace] + """ + self._aggregated_stack_traces = aggregated_stack_traces + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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/aggregated_stack_trace.py b/src/oci/apm_traces/models/aggregated_stack_trace.py new file mode 100644 index 0000000000..4ba9d6b16d --- /dev/null +++ b/src/oci/apm_traces/models/aggregated_stack_trace.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AggregatedStackTrace(object): + """ + A branching tree with aggregated stack trace. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AggregatedStackTrace object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param stack_trace_element: + The value to assign to the stack_trace_element property of this AggregatedStackTrace. + :type stack_trace_element: oci.apm_traces.models.StackTraceElement + + :param children: + The value to assign to the children property of this AggregatedStackTrace. + :type children: list[oci.apm_traces.models.AggregatedStackTrace] + + """ + self.swagger_types = { + 'stack_trace_element': 'StackTraceElement', + 'children': 'list[AggregatedStackTrace]' + } + + self.attribute_map = { + 'stack_trace_element': 'stackTraceElement', + 'children': 'children' + } + + self._stack_trace_element = None + self._children = None + + @property + def stack_trace_element(self): + """ + Gets the stack_trace_element of this AggregatedStackTrace. + + :return: The stack_trace_element of this AggregatedStackTrace. + :rtype: oci.apm_traces.models.StackTraceElement + """ + return self._stack_trace_element + + @stack_trace_element.setter + def stack_trace_element(self, stack_trace_element): + """ + Sets the stack_trace_element of this AggregatedStackTrace. + + :param stack_trace_element: The stack_trace_element of this AggregatedStackTrace. + :type: oci.apm_traces.models.StackTraceElement + """ + self._stack_trace_element = stack_trace_element + + @property + def children(self): + """ + Gets the children of this AggregatedStackTrace. + List of child aggregated stack trace to represent branches. + + + :return: The children of this AggregatedStackTrace. + :rtype: list[oci.apm_traces.models.AggregatedStackTrace] + """ + return self._children + + @children.setter + def children(self, children): + """ + Sets the children of this AggregatedStackTrace. + List of child aggregated stack trace to represent branches. + + + :param children: The children of this AggregatedStackTrace. + :type: list[oci.apm_traces.models.AggregatedStackTrace] + """ + self._children = children + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_details.py b/src/oci/apm_traces/models/query_details.py index a7b00e8272..a13859ea64 100644 --- a/src/oci/apm_traces/models/query_details.py +++ b/src/oci/apm_traces/models/query_details.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class QueryDetails(object): """ - Request object containing the query to be run against our repository. + Request object containing the query to be run against the trace data. """ def __init__(self, **kwargs): @@ -37,7 +37,7 @@ def __init__(self, **kwargs): def query_text(self): """ Gets the query_text of this QueryDetails. - APM defined query string to run against our repository and return results for. + Application Performance Monitoring defined query string that filters and retrieves trace data results. :return: The query_text of this QueryDetails. @@ -49,7 +49,7 @@ def query_text(self): def query_text(self, query_text): """ Sets the query_text of this QueryDetails. - APM defined query string to run against our repository and return results for. + Application Performance Monitoring defined query string that filters and retrieves trace data results. :param query_text: The query_text of this QueryDetails. 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 5a8493b255..efdac79fb5 100644 --- a/src/oci/apm_traces/models/query_result_metadata_summary.py +++ b/src/oci/apm_traces/models/query_result_metadata_summary.py @@ -66,7 +66,7 @@ def query_result_row_type_summaries(self): """ Gets the query_result_row_type_summaries of this QueryResultMetadataSummary. A collection of QueryResultRowTypeSummary objects that describe the type and properties of the individual row elements of the query rows - being returned. The ith element in this list contains the QueryResultRowTypeSummary of the ith key value pair in the QueryResultRowData map. + being returned. The i-th element in this list contains the QueryResultRowTypeSummary of the i-th key-value pair in the QueryResultRowData map. :return: The query_result_row_type_summaries of this QueryResultMetadataSummary. @@ -79,7 +79,7 @@ def query_result_row_type_summaries(self, query_result_row_type_summaries): """ Sets the query_result_row_type_summaries of this QueryResultMetadataSummary. A collection of QueryResultRowTypeSummary objects that describe the type and properties of the individual row elements of the query rows - being returned. The ith element in this list contains the QueryResultRowTypeSummary of the ith key value pair in the QueryResultRowData map. + being returned. The i-th element in this list contains the QueryResultRowTypeSummary of the i-th key-value pair in the QueryResultRowData map. :param query_result_row_type_summaries: The query_result_row_type_summaries of this QueryResultMetadataSummary. @@ -91,7 +91,7 @@ def query_result_row_type_summaries(self, query_result_row_type_summaries): def source_name(self): """ Gets the source_name of this QueryResultMetadataSummary. - Source of the query result set (traces, spans, etc). + Source of the query result set (traces, spans, and so on). :return: The source_name of this QueryResultMetadataSummary. @@ -103,7 +103,7 @@ def source_name(self): def source_name(self, source_name): """ Sets the source_name of this QueryResultMetadataSummary. - Source of the query result set (traces, spans, etc). + Source of the query result set (traces, spans, and so on). :param source_name: The source_name of this QueryResultMetadataSummary. diff --git a/src/oci/apm_traces/models/query_result_row.py b/src/oci/apm_traces/models/query_result_row.py index efdd84e1cf..94e86f3259 100644 --- a/src/oci/apm_traces/models/query_result_row.py +++ b/src/oci/apm_traces/models/query_result_row.py @@ -10,8 +10,8 @@ @init_model_state_from_kwargs class QueryResultRow(object): """ - An object that represents a single row of the query result. It contains the queryResultRowData object that holds the actual data - represented by the elements of the query result row, and a queryResultRowMetadata object that holds the metadata about the data contained in + Object that represents a single row of the query result. It contains the queryResultRowData object that contains the actual data + represented by the elements of the query result row, and a queryResultRowMetadata object that contains the metadata about the data contained in the query result row. """ @@ -51,10 +51,9 @@ def query_result_row_data(self): The value is the actual value of that attribute or aggregate function of the corresponding single row of the query result set. If an alias name is specified for an attribute or an aggregate function, then the key will be the alias name specified in the show clause. If an alias name is not specified for the group by aggregate function in the show clause, then the corresponding key - will be the appropriate aggregate_function_name_column_name (Eg: count(traces) will be keyed as count_traces). For more details - on the supported aggregate functions, look at the APM confluence doc on High Level Query Aggregation. The datatype of the value - is presented in the queryResultRowTypeSummaries list in the queryResultMetadata structure, where the ith queryResultRowTypeSummary object - represents the datatype of the ith value when this map is iterated in order. + will be the appropriate aggregate_function_name_column_name (For example: count(traces) will be keyed as count_traces). The datatype of the value + is presented in the queryResultRowTypeSummaries list in the queryResultMetadata structure, where the i-th queryResultRowTypeSummary object + represents the datatype of the i-th value when this map is iterated in order. :return: The query_result_row_data of this QueryResultRow. @@ -71,10 +70,9 @@ def query_result_row_data(self, query_result_row_data): The value is the actual value of that attribute or aggregate function of the corresponding single row of the query result set. If an alias name is specified for an attribute or an aggregate function, then the key will be the alias name specified in the show clause. If an alias name is not specified for the group by aggregate function in the show clause, then the corresponding key - will be the appropriate aggregate_function_name_column_name (Eg: count(traces) will be keyed as count_traces). For more details - on the supported aggregate functions, look at the APM confluence doc on High Level Query Aggregation. The datatype of the value - is presented in the queryResultRowTypeSummaries list in the queryResultMetadata structure, where the ith queryResultRowTypeSummary object - represents the datatype of the ith value when this map is iterated in order. + will be the appropriate aggregate_function_name_column_name (For example: count(traces) will be keyed as count_traces). The datatype of the value + is presented in the queryResultRowTypeSummaries list in the queryResultMetadata structure, where the i-th queryResultRowTypeSummary object + represents the datatype of the i-th value when this map is iterated in order. :param query_result_row_data: The query_result_row_data of this QueryResultRow. @@ -87,7 +85,7 @@ def query_result_row_metadata(self): """ **[Required]** Gets the query_result_row_metadata of this QueryResultRow. A map containing metadata or add-on data for the data presented in the queryResultRowData map. Data required to present drill down - information from the queryResultRowData is presented as key value pairs. + information from the queryResultRowData is presented as key-value pairs. :return: The query_result_row_metadata of this QueryResultRow. @@ -100,7 +98,7 @@ def query_result_row_metadata(self, query_result_row_metadata): """ Sets the query_result_row_metadata of this QueryResultRow. A map containing metadata or add-on data for the data presented in the queryResultRowData map. Data required to present drill down - information from the queryResultRowData is presented as key value pairs. + information from the queryResultRowData is presented as key-value pairs. :param query_result_row_metadata: The query_result_row_metadata of this QueryResultRow. diff --git a/src/oci/apm_traces/models/query_result_row_type_summary.py b/src/oci/apm_traces/models/query_result_row_type_summary.py index a70617c03e..e48be1b9cf 100644 --- a/src/oci/apm_traces/models/query_result_row_type_summary.py +++ b/src/oci/apm_traces/models/query_result_row_type_summary.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class QueryResultRowTypeSummary(object): """ - A summary of the datatype, unit and related metadata of an individual row element of a query result row that is returned. + Summary of the datatype, unit and related metadata of an individual row element of a query result row that is returned. """ def __init__(self, **kwargs): diff --git a/src/oci/apm_traces/models/query_results_grouped_by_summary.py b/src/oci/apm_traces/models/query_results_grouped_by_summary.py index 724d5939b3..ab40432e14 100644 --- a/src/oci/apm_traces/models/query_results_grouped_by_summary.py +++ b/src/oci/apm_traces/models/query_results_grouped_by_summary.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class QueryResultsGroupedBySummary(object): """ - Summary of the attribute based on which the query results are grouped by. + Summary of the attribute based on which the query results are grouped. """ def __init__(self, **kwargs): @@ -37,7 +37,7 @@ def __init__(self, **kwargs): def query_results_grouped_by_column(self): """ Gets the query_results_grouped_by_column of this QueryResultsGroupedBySummary. - Column or attribute in the query result which is a group by value. + Column or attribute in the query result, which is a group by value. :return: The query_results_grouped_by_column of this QueryResultsGroupedBySummary. @@ -49,7 +49,7 @@ def query_results_grouped_by_column(self): def query_results_grouped_by_column(self, query_results_grouped_by_column): """ Sets the query_results_grouped_by_column of this QueryResultsGroupedBySummary. - Column or attribute in the query result which is a group by value. + Column or attribute in the query result, which is a group by value. :param query_results_grouped_by_column: The query_results_grouped_by_column of this QueryResultsGroupedBySummary. diff --git a/src/oci/apm_traces/models/query_results_ordered_by_summary.py b/src/oci/apm_traces/models/query_results_ordered_by_summary.py index ab307c3012..cf973e19a5 100644 --- a/src/oci/apm_traces/models/query_results_ordered_by_summary.py +++ b/src/oci/apm_traces/models/query_results_ordered_by_summary.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class QueryResultsOrderedBySummary(object): """ - Summary of the sort attribute and order by which the query results are organized. + Summary of the sort and order by attribute based on which the query results are organized. """ def __init__(self, **kwargs): @@ -44,7 +44,7 @@ def __init__(self, **kwargs): def query_results_ordered_by(self): """ Gets the query_results_ordered_by of this QueryResultsOrderedBySummary. - Attribute by which the query result is sorted by. + Attribute by which the query results are sorted. :return: The query_results_ordered_by of this QueryResultsOrderedBySummary. @@ -56,7 +56,7 @@ def query_results_ordered_by(self): def query_results_ordered_by(self, query_results_ordered_by): """ Sets the query_results_ordered_by of this QueryResultsOrderedBySummary. - Attribute by which the query result is sorted by. + Attribute by which the query results are sorted. :param query_results_ordered_by: The query_results_ordered_by of this QueryResultsOrderedBySummary. diff --git a/src/oci/apm_traces/models/quick_pick_summary.py b/src/oci/apm_traces/models/quick_pick_summary.py index 6354b27bb6..d7d4a7441d 100644 --- a/src/oci/apm_traces/models/quick_pick_summary.py +++ b/src/oci/apm_traces/models/quick_pick_summary.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class QuickPickSummary(object): """ - Summary of quick pick query objects that contains the quick pick queries. + Summary of the Quick Pick query objects. """ def __init__(self, **kwargs): @@ -44,7 +44,7 @@ def __init__(self, **kwargs): def quick_pick_name(self): """ **[Required]** Gets the quick_pick_name of this QuickPickSummary. - Quick pick name for the query. + Quick Pick name for the query. :return: The quick_pick_name of this QuickPickSummary. @@ -56,7 +56,7 @@ def quick_pick_name(self): def quick_pick_name(self, quick_pick_name): """ Sets the quick_pick_name of this QuickPickSummary. - Quick pick name for the query. + Quick Pick name for the query. :param quick_pick_name: The quick_pick_name of this QuickPickSummary. @@ -68,7 +68,7 @@ def quick_pick_name(self, quick_pick_name): def quick_pick_query(self): """ **[Required]** Gets the quick_pick_query of this QuickPickSummary. - Query for the quick pick. + Query for the Quick Pick. :return: The quick_pick_query of this QuickPickSummary. @@ -80,7 +80,7 @@ def quick_pick_query(self): def quick_pick_query(self, quick_pick_query): """ Sets the quick_pick_query of this QuickPickSummary. - Query for the quick pick. + Query for the Quick Pick. :param quick_pick_query: The quick_pick_query of this QuickPickSummary. diff --git a/src/oci/apm_traces/models/snapshot_detail.py b/src/oci/apm_traces/models/snapshot_detail.py new file mode 100644 index 0000000000..b156998876 --- /dev/null +++ b/src/oci/apm_traces/models/snapshot_detail.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SnapshotDetail(object): + """ + A generic key value pair object, which contains information such as the thread ID, thread name, and thread state. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SnapshotDetail object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this SnapshotDetail. + :type key: str + + :param value: + The value to assign to the value property of this SnapshotDetail. + :type value: object + + """ + self.swagger_types = { + 'key': 'str', + 'value': 'object' + } + + self.attribute_map = { + 'key': 'key', + 'value': 'value' + } + + self._key = None + self._value = None + + @property + def key(self): + """ + Gets the key of this SnapshotDetail. + Name of the property. + + + :return: The key of this SnapshotDetail. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this SnapshotDetail. + Name of the property. + + + :param key: The key of this SnapshotDetail. + :type: str + """ + self._key = key + + @property + def value(self): + """ + Gets the value of this SnapshotDetail. + Value of the property. + + + :return: The value of this SnapshotDetail. + :rtype: object + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this SnapshotDetail. + Value of the property. + + + :param value: The value of this SnapshotDetail. + :type: object + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/apm_traces/models/span.py b/src/oci/apm_traces/models/span.py index efbd0a200d..dc60ae9ea8 100644 --- a/src/oci/apm_traces/models/span.py +++ b/src/oci/apm_traces/models/span.py @@ -115,8 +115,8 @@ def key(self): """ **[Required]** Gets the key of this Span. Unique identifier (spanId) for the span. Note that this field is - defined as spanKey in the API to comply with OCI API fields naming conventions. - The spanKey maps to the spanId in the APM repository. + defined as spanKey in the API and it maps to the spanId in the trace data + in Application Performance Monitoring. :return: The key of this Span. @@ -129,8 +129,8 @@ def key(self, key): """ Sets the key of this Span. Unique identifier (spanId) for the span. Note that this field is - defined as spanKey in the API to comply with OCI API fields naming conventions. - The spanKey maps to the spanId in the APM repository. + defined as spanKey in the API and it maps to the spanId in the trace data + in Application Performance Monitoring. :param key: The key of this Span. @@ -262,7 +262,7 @@ def duration_in_ms(self, duration_in_ms): def operation_name(self): """ **[Required]** Gets the operation_name of this Span. - Span name associated with the trace. This is usually the method or uri of the request. + Span name associated with the trace. This is usually the method or URI of the request. :return: The operation_name of this Span. @@ -274,7 +274,7 @@ def operation_name(self): def operation_name(self, operation_name): """ Sets the operation_name of this Span. - Span name associated with the trace. This is usually the method or uri of the request. + Span name associated with the trace. This is usually the method or URI of the request. :param operation_name: The operation_name of this Span. @@ -382,7 +382,7 @@ def logs(self, logs): def is_error(self): """ **[Required]** Gets the is_error of this Span. - Indicates if the span has an error + Indicates if the span has an error. :return: The is_error of this Span. @@ -394,7 +394,7 @@ def is_error(self): def is_error(self, is_error): """ Sets the is_error of this Span. - Indicates if the span has an error + Indicates if the span has an error. :param is_error: The is_error of this Span. diff --git a/src/oci/apm_traces/models/span_log.py b/src/oci/apm_traces/models/span_log.py index 814fb78410..35e49194ae 100644 --- a/src/oci/apm_traces/models/span_log.py +++ b/src/oci/apm_traces/models/span_log.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class SpanLog(object): """ - Definition of a log which is a key value pair of log data. + Definition of a log which is a key-value pair of log data. """ def __init__(self, **kwargs): diff --git a/src/oci/apm_traces/models/span_snapshot.py b/src/oci/apm_traces/models/span_snapshot.py new file mode 100644 index 0000000000..cb96c8df44 --- /dev/null +++ b/src/oci/apm_traces/models/span_snapshot.py @@ -0,0 +1,256 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SpanSnapshot(object): + """ + Definition of a span snapshot object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SpanSnapshot object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this SpanSnapshot. + :type key: str + + :param span_name: + The value to assign to the span_name property of this SpanSnapshot. + :type span_name: str + + :param time_started: + The value to assign to the time_started property of this SpanSnapshot. + :type time_started: datetime + + :param time_ended: + The value to assign to the time_ended property of this SpanSnapshot. + :type time_ended: datetime + + :param span_snapshot_details: + The value to assign to the span_snapshot_details property of this SpanSnapshot. + :type span_snapshot_details: list[oci.apm_traces.models.SnapshotDetail] + + :param thread_snapshots: + The value to assign to the thread_snapshots property of this SpanSnapshot. + :type thread_snapshots: list[oci.apm_traces.models.ThreadSnapshot] + + :param children: + The value to assign to the children property of this SpanSnapshot. + :type children: list[oci.apm_traces.models.SpanSnapshot] + + """ + self.swagger_types = { + 'key': 'str', + 'span_name': 'str', + 'time_started': 'datetime', + 'time_ended': 'datetime', + 'span_snapshot_details': 'list[SnapshotDetail]', + 'thread_snapshots': 'list[ThreadSnapshot]', + 'children': 'list[SpanSnapshot]' + } + + self.attribute_map = { + 'key': 'key', + 'span_name': 'spanName', + 'time_started': 'timeStarted', + 'time_ended': 'timeEnded', + 'span_snapshot_details': 'spanSnapshotDetails', + 'thread_snapshots': 'threadSnapshots', + 'children': 'children' + } + + self._key = None + self._span_name = None + self._time_started = None + self._time_ended = None + self._span_snapshot_details = None + self._thread_snapshots = None + self._children = None + + @property + def key(self): + """ + **[Required]** Gets the key of this SpanSnapshot. + Unique identifier (spanId) for the trace span. + + + :return: The key of this SpanSnapshot. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this SpanSnapshot. + Unique identifier (spanId) for the trace span. + + + :param key: The key of this SpanSnapshot. + :type: str + """ + self._key = key + + @property + def span_name(self): + """ + Gets the span_name of this SpanSnapshot. + Span name associated with the trace. + + + :return: The span_name of this SpanSnapshot. + :rtype: str + """ + return self._span_name + + @span_name.setter + def span_name(self, span_name): + """ + Sets the span_name of this SpanSnapshot. + Span name associated with the trace. + + + :param span_name: The span_name of this SpanSnapshot. + :type: str + """ + self._span_name = span_name + + @property + def time_started(self): + """ + **[Required]** Gets the time_started of this SpanSnapshot. + Start time of the span. + + + :return: The time_started of this SpanSnapshot. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this SpanSnapshot. + Start time of the span. + + + :param time_started: The time_started of this SpanSnapshot. + :type: datetime + """ + self._time_started = time_started + + @property + def time_ended(self): + """ + **[Required]** Gets the time_ended of this SpanSnapshot. + End time of the span. + + + :return: The time_ended of this SpanSnapshot. + :rtype: datetime + """ + return self._time_ended + + @time_ended.setter + def time_ended(self, time_ended): + """ + Sets the time_ended of this SpanSnapshot. + End time of the span. + + + :param time_ended: The time_ended of this SpanSnapshot. + :type: datetime + """ + self._time_ended = time_ended + + @property + def span_snapshot_details(self): + """ + Gets the span_snapshot_details of this SpanSnapshot. + Span snapshots properties. + + + :return: The span_snapshot_details of this SpanSnapshot. + :rtype: list[oci.apm_traces.models.SnapshotDetail] + """ + return self._span_snapshot_details + + @span_snapshot_details.setter + def span_snapshot_details(self, span_snapshot_details): + """ + Sets the span_snapshot_details of this SpanSnapshot. + Span snapshots properties. + + + :param span_snapshot_details: The span_snapshot_details of this SpanSnapshot. + :type: list[oci.apm_traces.models.SnapshotDetail] + """ + self._span_snapshot_details = span_snapshot_details + + @property + def thread_snapshots(self): + """ + Gets the thread_snapshots of this SpanSnapshot. + Thread snapshots. + + + :return: The thread_snapshots of this SpanSnapshot. + :rtype: list[oci.apm_traces.models.ThreadSnapshot] + """ + return self._thread_snapshots + + @thread_snapshots.setter + def thread_snapshots(self, thread_snapshots): + """ + Sets the thread_snapshots of this SpanSnapshot. + Thread snapshots. + + + :param thread_snapshots: The thread_snapshots of this SpanSnapshot. + :type: list[oci.apm_traces.models.ThreadSnapshot] + """ + self._thread_snapshots = thread_snapshots + + @property + def children(self): + """ + Gets the children of this SpanSnapshot. + An array of child span snapshots. + + + :return: The children of this SpanSnapshot. + :rtype: list[oci.apm_traces.models.SpanSnapshot] + """ + return self._children + + @children.setter + def children(self, children): + """ + Sets the children of this SpanSnapshot. + An array of child span snapshots. + + + :param children: The children of this SpanSnapshot. + :type: list[oci.apm_traces.models.SpanSnapshot] + """ + self._children = children + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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/stack_trace_element.py b/src/oci/apm_traces/models/stack_trace_element.py new file mode 100644 index 0000000000..771368235c --- /dev/null +++ b/src/oci/apm_traces/models/stack_trace_element.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class StackTraceElement(object): + """ + Stack trace element. + """ + + def __init__(self, **kwargs): + """ + Initializes a new StackTraceElement object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param method_name: + The value to assign to the method_name property of this StackTraceElement. + :type method_name: str + + :param file_name: + The value to assign to the file_name property of this StackTraceElement. + :type file_name: str + + :param line_number: + The value to assign to the line_number property of this StackTraceElement. + :type line_number: int + + :param class_name: + The value to assign to the class_name property of this StackTraceElement. + :type class_name: str + + :param weightage: + The value to assign to the weightage property of this StackTraceElement. + :type weightage: float + + """ + self.swagger_types = { + 'method_name': 'str', + 'file_name': 'str', + 'line_number': 'int', + 'class_name': 'str', + 'weightage': 'float' + } + + self.attribute_map = { + 'method_name': 'methodName', + 'file_name': 'fileName', + 'line_number': 'lineNumber', + 'class_name': 'className', + 'weightage': 'weightage' + } + + self._method_name = None + self._file_name = None + self._line_number = None + self._class_name = None + self._weightage = None + + @property + def method_name(self): + """ + Gets the method_name of this StackTraceElement. + Name of the method containing the execution point. + + + :return: The method_name of this StackTraceElement. + :rtype: str + """ + return self._method_name + + @method_name.setter + def method_name(self, method_name): + """ + Sets the method_name of this StackTraceElement. + Name of the method containing the execution point. + + + :param method_name: The method_name of this StackTraceElement. + :type: str + """ + self._method_name = method_name + + @property + def file_name(self): + """ + Gets the file_name of this StackTraceElement. + Name of the source file containing the execution point. + + + :return: The file_name of this StackTraceElement. + :rtype: str + """ + return self._file_name + + @file_name.setter + def file_name(self, file_name): + """ + Sets the file_name of this StackTraceElement. + Name of the source file containing the execution point. + + + :param file_name: The file_name of this StackTraceElement. + :type: str + """ + self._file_name = file_name + + @property + def line_number(self): + """ + Gets the line_number of this StackTraceElement. + Line number of the source line containing the execution point. + + + :return: The line_number of this StackTraceElement. + :rtype: int + """ + return self._line_number + + @line_number.setter + def line_number(self, line_number): + """ + Sets the line_number of this StackTraceElement. + Line number of the source line containing the execution point. + + + :param line_number: The line_number of this StackTraceElement. + :type: int + """ + self._line_number = line_number + + @property + def class_name(self): + """ + Gets the class_name of this StackTraceElement. + Name of the class containing the execution point. + + + :return: The class_name of this StackTraceElement. + :rtype: str + """ + return self._class_name + + @class_name.setter + def class_name(self, class_name): + """ + Sets the class_name of this StackTraceElement. + Name of the class containing the execution point. + + + :param class_name: The class_name of this StackTraceElement. + :type: str + """ + self._class_name = class_name + + @property + def weightage(self): + """ + Gets the weightage of this StackTraceElement. + The weight distribution that denotes the percentage occurrence of a method in the captured snapshots. + + + :return: The weightage of this StackTraceElement. + :rtype: float + """ + return self._weightage + + @weightage.setter + def weightage(self, weightage): + """ + Sets the weightage of this StackTraceElement. + The weight distribution that denotes the percentage occurrence of a method in the captured snapshots. + + + :param weightage: The weightage of this StackTraceElement. + :type: float + """ + self._weightage = weightage + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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/tag.py b/src/oci/apm_traces/models/tag.py index 1218b0c7b8..063d8f15d5 100644 --- a/src/oci/apm_traces/models/tag.py +++ b/src/oci/apm_traces/models/tag.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class Tag(object): """ - Definition of a tag which is a key value pair. + Definition of a tag which is a key-value pair. """ def __init__(self, **kwargs): diff --git a/src/oci/apm_traces/models/thread_snapshot.py b/src/oci/apm_traces/models/thread_snapshot.py new file mode 100644 index 0000000000..b0abe63afe --- /dev/null +++ b/src/oci/apm_traces/models/thread_snapshot.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ThreadSnapshot(object): + """ + Thread snapshot. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ThreadSnapshot object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_stamp: + The value to assign to the time_stamp property of this ThreadSnapshot. + :type time_stamp: datetime + + :param thread_snapshot_details: + The value to assign to the thread_snapshot_details property of this ThreadSnapshot. + :type thread_snapshot_details: list[oci.apm_traces.models.SnapshotDetail] + + :param stack_trace: + The value to assign to the stack_trace property of this ThreadSnapshot. + :type stack_trace: list[oci.apm_traces.models.StackTraceElement] + + """ + self.swagger_types = { + 'time_stamp': 'datetime', + 'thread_snapshot_details': 'list[SnapshotDetail]', + 'stack_trace': 'list[StackTraceElement]' + } + + self.attribute_map = { + 'time_stamp': 'timeStamp', + 'thread_snapshot_details': 'threadSnapshotDetails', + 'stack_trace': 'stackTrace' + } + + self._time_stamp = None + self._thread_snapshot_details = None + self._stack_trace = None + + @property + def time_stamp(self): + """ + Gets the time_stamp of this ThreadSnapshot. + Snapshot time. + + + :return: The time_stamp of this ThreadSnapshot. + :rtype: datetime + """ + return self._time_stamp + + @time_stamp.setter + def time_stamp(self, time_stamp): + """ + Sets the time_stamp of this ThreadSnapshot. + Snapshot time. + + + :param time_stamp: The time_stamp of this ThreadSnapshot. + :type: datetime + """ + self._time_stamp = time_stamp + + @property + def thread_snapshot_details(self): + """ + Gets the thread_snapshot_details of this ThreadSnapshot. + Snapshot details. + + + :return: The thread_snapshot_details of this ThreadSnapshot. + :rtype: list[oci.apm_traces.models.SnapshotDetail] + """ + return self._thread_snapshot_details + + @thread_snapshot_details.setter + def thread_snapshot_details(self, thread_snapshot_details): + """ + Sets the thread_snapshot_details of this ThreadSnapshot. + Snapshot details. + + + :param thread_snapshot_details: The thread_snapshot_details of this ThreadSnapshot. + :type: list[oci.apm_traces.models.SnapshotDetail] + """ + self._thread_snapshot_details = thread_snapshot_details + + @property + def stack_trace(self): + """ + Gets the stack_trace of this ThreadSnapshot. + Stack trace. + + + :return: The stack_trace of this ThreadSnapshot. + :rtype: list[oci.apm_traces.models.StackTraceElement] + """ + return self._stack_trace + + @stack_trace.setter + def stack_trace(self, stack_trace): + """ + Sets the stack_trace of this ThreadSnapshot. + Stack trace. + + + :param stack_trace: The stack_trace of this ThreadSnapshot. + :type: list[oci.apm_traces.models.StackTraceElement] + """ + self._stack_trace = stack_trace + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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 965a1759c7..01bac55c5d 100644 --- a/src/oci/apm_traces/models/trace.py +++ b/src/oci/apm_traces/models/trace.py @@ -157,8 +157,8 @@ def key(self): """ **[Required]** Gets the key of this Trace. Unique identifier (traceId) for the trace that represents the span set. Note that this field is - defined as traceKey in the API to comply with OCI API fields naming conventions. The traceKey maps to - the traceId in the APM repository. + defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance + Monitoring. :return: The key of this Trace. @@ -171,8 +171,8 @@ def key(self, key): """ Sets the key of this Trace. Unique identifier (traceId) for the trace that represents the span set. Note that this field is - defined as traceKey in the API to comply with OCI API fields naming conventions. The traceKey maps to - the traceId in the APM repository. + defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance + Monitoring. :param key: The key of this Trace. @@ -184,8 +184,8 @@ def key(self, key): def root_span_operation_name(self): """ Gets the root_span_operation_name of this Trace. - Root span name associated with the trace. This is usually the flow start operation name. - Null if the root span is not yet completed. + Root span name associated with the trace. This is the flow start operation name. + Null is displayed if the root span is not yet completed. :return: The root_span_operation_name of this Trace. @@ -197,8 +197,8 @@ def root_span_operation_name(self): def root_span_operation_name(self, root_span_operation_name): """ Sets the root_span_operation_name of this Trace. - Root span name associated with the trace. This is usually the flow start operation name. - Null if the root span is not yet completed. + Root span name associated with the trace. This is the flow start operation name. + Null is displayed if the root span is not yet completed. :param root_span_operation_name: The root_span_operation_name of this Trace. @@ -210,7 +210,7 @@ def root_span_operation_name(self, root_span_operation_name): def time_earliest_span_started(self): """ Gets the time_earliest_span_started of this Trace. - Start time of the earliest span in this span collection. + Start time of the earliest span in the span collection. :return: The time_earliest_span_started of this Trace. @@ -222,7 +222,7 @@ def time_earliest_span_started(self): def time_earliest_span_started(self, time_earliest_span_started): """ Sets the time_earliest_span_started of this Trace. - Start time of the earliest span in this span collection. + Start time of the earliest span in the span collection. :param time_earliest_span_started: The time_earliest_span_started of this Trace. @@ -234,7 +234,7 @@ def time_earliest_span_started(self, time_earliest_span_started): def time_latest_span_ended(self): """ Gets the time_latest_span_ended of this Trace. - End time of the span that most recently ended in this span collection. + End time of the span that most recently ended in the span collection. :return: The time_latest_span_ended of this Trace. @@ -246,7 +246,7 @@ def time_latest_span_ended(self): def time_latest_span_ended(self, time_latest_span_ended): """ Sets the time_latest_span_ended of this Trace. - End time of the span that most recently ended in this span collection. + End time of the span that most recently ended in the span collection. :param time_latest_span_ended: The time_latest_span_ended of this Trace. @@ -258,7 +258,7 @@ def time_latest_span_ended(self, time_latest_span_ended): def span_count(self): """ Gets the span_count of this Trace. - The number of spans that have been processed by the system for this trace. Note that there + The number of spans that have been processed by the system for the trace. Note that there could be additional spans that have not been processed or reported yet if the trace is still in progress. @@ -272,7 +272,7 @@ def span_count(self): def span_count(self, span_count): """ Sets the span_count of this Trace. - The number of spans that have been processed by the system for this trace. Note that there + The number of spans that have been processed by the system for the trace. Note that there could be additional spans that have not been processed or reported yet if the trace is still in progress. @@ -286,9 +286,8 @@ def span_count(self, span_count): def error_span_count(self): """ Gets the error_span_count of this Trace. - The number of spans with error that have been processed by the system for this trace. - Note that the number of spans with errors may be less than the total number of actual spans - in this trace. + The number of spans with errors that have been processed by the system for the trace. + Note that the number of spans with errors will be less than or equal to the total number of spans in the trace. :return: The error_span_count of this Trace. @@ -300,9 +299,8 @@ def error_span_count(self): def error_span_count(self, error_span_count): """ Sets the error_span_count of this Trace. - The number of spans with error that have been processed by the system for this trace. - Note that the number of spans with errors may be less than the total number of actual spans - in this trace. + The number of spans with errors that have been processed by the system for the trace. + Note that the number of spans with errors will be less than or equal to the total number of spans in the trace. :param error_span_count: The error_span_count of this Trace. @@ -314,7 +312,7 @@ def error_span_count(self, error_span_count): def root_span_service_name(self): """ Gets the root_span_service_name of this Trace. - Service associated with this trace. + Service associated with the trace. :return: The root_span_service_name of this Trace. @@ -326,7 +324,7 @@ def root_span_service_name(self): def root_span_service_name(self, root_span_service_name): """ Sets the root_span_service_name of this Trace. - Service associated with this trace. + Service associated with the trace. :param root_span_service_name: The root_span_service_name of this Trace. @@ -338,7 +336,7 @@ def root_span_service_name(self, root_span_service_name): def time_root_span_started(self): """ Gets the time_root_span_started of this Trace. - Start time of the root span for this span collection. + Start time of the root span for the span collection. :return: The time_root_span_started of this Trace. @@ -350,7 +348,7 @@ def time_root_span_started(self): def time_root_span_started(self, time_root_span_started): """ Sets the time_root_span_started of this Trace. - Start time of the root span for this span collection. + Start time of the root span for the span collection. :param time_root_span_started: The time_root_span_started of this Trace. @@ -362,7 +360,7 @@ def time_root_span_started(self, time_root_span_started): def time_root_span_ended(self): """ Gets the time_root_span_ended of this Trace. - End time of the root span for this span collection. + End time of the root span for the span collection. :return: The time_root_span_ended of this Trace. @@ -374,7 +372,7 @@ def time_root_span_ended(self): def time_root_span_ended(self, time_root_span_ended): """ Sets the time_root_span_ended of this Trace. - End time of the root span for this span collection. + End time of the root span for the span collection. :param time_root_span_ended: The time_root_span_ended of this Trace. @@ -434,7 +432,7 @@ def trace_duration_in_ms(self, trace_duration_in_ms): def is_fault(self): """ Gets the is_fault of this Trace. - Boolean flag that indicates whether the trace errored out. + Boolean flag that indicates whether the trace has an error. :return: The is_fault of this Trace. @@ -446,7 +444,7 @@ def is_fault(self): def is_fault(self, is_fault): """ Sets the is_fault of this Trace. - Boolean flag that indicates whether the trace errored out. + Boolean flag that indicates whether the trace has an error. :param is_fault: The is_fault of this Trace. @@ -460,7 +458,7 @@ def trace_status(self): Gets the trace_status of this Trace. The status of the trace. The trace statuses are defined as follows: - complete \u2013 a root span has been recorded, but there is no information on the errors. + complete - a root span has been recorded, but there is no information on the errors. success - a complete root span is recorded there is a successful error type and error code - HTTP 200. incomplete - the root span has not yet been received. error - the root span returned with an error. There may or may not be an associated error code or error type. @@ -477,7 +475,7 @@ def trace_status(self, trace_status): Sets the trace_status of this Trace. The status of the trace. The trace statuses are defined as follows: - complete \u2013 a root span has been recorded, but there is no information on the errors. + complete - a root span has been recorded, but there is no information on the errors. success - a complete root span is recorded there is a successful error type and error code - HTTP 200. incomplete - the root span has not yet been received. error - the root span returned with an error. There may or may not be an associated error code or error type. @@ -540,7 +538,7 @@ def trace_error_code(self, trace_error_code): def service_summaries(self): """ Gets the service_summaries of this Trace. - A summary of the spans by service + A summary of the spans by service. :return: The service_summaries of this Trace. @@ -552,7 +550,7 @@ def service_summaries(self): def service_summaries(self, service_summaries): """ Sets the service_summaries of this Trace. - A summary of the spans by service + A summary of the spans by service. :param service_summaries: The service_summaries of this Trace. diff --git a/src/oci/apm_traces/models/trace_service_summary.py b/src/oci/apm_traces/models/trace_service_summary.py index 8db058ef75..acc08a4d9e 100644 --- a/src/oci/apm_traces/models/trace_service_summary.py +++ b/src/oci/apm_traces/models/trace_service_summary.py @@ -10,7 +10,7 @@ @init_model_state_from_kwargs class TraceServiceSummary(object): """ - A summary of the spans in a trace by service. + Summary of the spans in a trace by service. """ def __init__(self, **kwargs): @@ -75,7 +75,7 @@ def span_service_name(self, span_service_name): def total_spans(self): """ **[Required]** Gets the total_spans of this TraceServiceSummary. - Number of spans for serviceName in this trace. + Number of spans for serviceName in the trace. :return: The total_spans of this TraceServiceSummary. @@ -87,7 +87,7 @@ def total_spans(self): def total_spans(self, total_spans): """ Sets the total_spans of this TraceServiceSummary. - Number of spans for serviceName in this trace. + Number of spans for serviceName in the trace. :param total_spans: The total_spans of this TraceServiceSummary. @@ -99,7 +99,7 @@ def total_spans(self, total_spans): def error_spans(self): """ **[Required]** Gets the error_spans of this TraceServiceSummary. - Number of spans with errorsfor serviceName in this trace. + Number of spans with errors for serviceName in the trace. :return: The error_spans of this TraceServiceSummary. @@ -111,7 +111,7 @@ def error_spans(self): def error_spans(self, error_spans): """ Sets the error_spans of this TraceServiceSummary. - Number of spans with errorsfor serviceName in this trace. + Number of spans with errors for serviceName in the trace. :param error_spans: The error_spans of this TraceServiceSummary. diff --git a/src/oci/apm_traces/models/trace_snapshot.py b/src/oci/apm_traces/models/trace_snapshot.py new file mode 100644 index 0000000000..c26adc4e9f --- /dev/null +++ b/src/oci/apm_traces/models/trace_snapshot.py @@ -0,0 +1,198 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TraceSnapshot(object): + """ + Definition of a trace snapshot object. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TraceSnapshot object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this TraceSnapshot. + :type key: str + + :param time_started: + The value to assign to the time_started property of this TraceSnapshot. + :type time_started: datetime + + :param time_ended: + The value to assign to the time_ended property of this TraceSnapshot. + :type time_ended: datetime + + :param trace_snapshot_details: + The value to assign to the trace_snapshot_details property of this TraceSnapshot. + :type trace_snapshot_details: list[oci.apm_traces.models.SnapshotDetail] + + :param span_snapshots: + The value to assign to the span_snapshots property of this TraceSnapshot. + :type span_snapshots: list[oci.apm_traces.models.SpanSnapshot] + + """ + self.swagger_types = { + 'key': 'str', + 'time_started': 'datetime', + 'time_ended': 'datetime', + 'trace_snapshot_details': 'list[SnapshotDetail]', + 'span_snapshots': 'list[SpanSnapshot]' + } + + self.attribute_map = { + 'key': 'key', + 'time_started': 'timeStarted', + 'time_ended': 'timeEnded', + 'trace_snapshot_details': 'traceSnapshotDetails', + 'span_snapshots': 'spanSnapshots' + } + + self._key = None + self._time_started = None + self._time_ended = None + self._trace_snapshot_details = None + self._span_snapshots = None + + @property + def key(self): + """ + **[Required]** Gets the key of this TraceSnapshot. + Unique identifier (traceId) for the trace that represents the span set. Note that this field is + defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance + Monitoring. + + + :return: The key of this TraceSnapshot. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this TraceSnapshot. + Unique identifier (traceId) for the trace that represents the span set. Note that this field is + defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance + Monitoring. + + + :param key: The key of this TraceSnapshot. + :type: str + """ + self._key = key + + @property + def time_started(self): + """ + Gets the time_started of this TraceSnapshot. + Start time of the trace. + + + :return: The time_started of this TraceSnapshot. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this TraceSnapshot. + Start time of the trace. + + + :param time_started: The time_started of this TraceSnapshot. + :type: datetime + """ + self._time_started = time_started + + @property + def time_ended(self): + """ + Gets the time_ended of this TraceSnapshot. + End time of the trace. + + + :return: The time_ended of this TraceSnapshot. + :rtype: datetime + """ + return self._time_ended + + @time_ended.setter + def time_ended(self, time_ended): + """ + Sets the time_ended of this TraceSnapshot. + End time of the trace. + + + :param time_ended: The time_ended of this TraceSnapshot. + :type: datetime + """ + self._time_ended = time_ended + + @property + def trace_snapshot_details(self): + """ + Gets the trace_snapshot_details of this TraceSnapshot. + Trace snapshots properties. + + + :return: The trace_snapshot_details of this TraceSnapshot. + :rtype: list[oci.apm_traces.models.SnapshotDetail] + """ + return self._trace_snapshot_details + + @trace_snapshot_details.setter + def trace_snapshot_details(self, trace_snapshot_details): + """ + Sets the trace_snapshot_details of this TraceSnapshot. + Trace snapshots properties. + + + :param trace_snapshot_details: The trace_snapshot_details of this TraceSnapshot. + :type: list[oci.apm_traces.models.SnapshotDetail] + """ + self._trace_snapshot_details = trace_snapshot_details + + @property + def span_snapshots(self): + """ + **[Required]** Gets the span_snapshots of this TraceSnapshot. + List of spans. + + + :return: The span_snapshots of this TraceSnapshot. + :rtype: list[oci.apm_traces.models.SpanSnapshot] + """ + return self._span_snapshots + + @span_snapshots.setter + def span_snapshots(self, span_snapshots): + """ + Sets the span_snapshots of this TraceSnapshot. + List of spans. + + + :param span_snapshots: The span_snapshots of this TraceSnapshot. + :type: list[oci.apm_traces.models.SpanSnapshot] + """ + self._span_snapshots = span_snapshots + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + 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_span_summary.py b/src/oci/apm_traces/models/trace_span_summary.py index acc192660b..c239d8b8ae 100644 --- a/src/oci/apm_traces/models/trace_span_summary.py +++ b/src/oci/apm_traces/models/trace_span_summary.py @@ -10,8 +10,7 @@ @init_model_state_from_kwargs class TraceSpanSummary(object): """ - Trace Span summary object is the summary of the span information for the spans in the span collection - in the trace window that is being queried. + Summary of the information pertaining to the spans in the trace window that is being queried. """ def __init__(self, **kwargs): @@ -144,8 +143,8 @@ def key(self): """ **[Required]** Gets the key of this TraceSpanSummary. Unique identifier (traceId) for the trace that represents the span set. Note that this field is - defined as traceKey in the API to comply with OCI API fields naming conventions. The traceKey maps to - the traceId in the APM repository. + defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance + Monitoring. :return: The key of this TraceSpanSummary. @@ -158,8 +157,8 @@ def key(self, key): """ Sets the key of this TraceSpanSummary. Unique identifier (traceId) for the trace that represents the span set. Note that this field is - defined as traceKey in the API to comply with OCI API fields naming conventions. The traceKey maps to - the traceId in the APM repository. + defined as traceKey in the API and it maps to the traceId in the trace data in Application Performance + Monitoring. :param key: The key of this TraceSpanSummary. @@ -171,8 +170,8 @@ def key(self, key): def root_span_operation_name(self): """ Gets the root_span_operation_name of this TraceSpanSummary. - Root span name associated with the trace. This is usually the flow start operation name. - Null if the root span is not yet completed. + Root span name associated with the trace. This is the flow start operation name. + Null is displayed if the root span is not yet completed. :return: The root_span_operation_name of this TraceSpanSummary. @@ -184,8 +183,8 @@ def root_span_operation_name(self): def root_span_operation_name(self, root_span_operation_name): """ Sets the root_span_operation_name of this TraceSpanSummary. - Root span name associated with the trace. This is usually the flow start operation name. - Null if the root span is not yet completed. + Root span name associated with the trace. This is the flow start operation name. + Null is displayed if the root span is not yet completed. :param root_span_operation_name: The root_span_operation_name of this TraceSpanSummary. @@ -197,7 +196,7 @@ def root_span_operation_name(self, root_span_operation_name): def time_earliest_span_started(self): """ **[Required]** Gets the time_earliest_span_started of this TraceSpanSummary. - Start time of the earliest span in this span collection. + Start time of the earliest span in the span collection. :return: The time_earliest_span_started of this TraceSpanSummary. @@ -209,7 +208,7 @@ def time_earliest_span_started(self): def time_earliest_span_started(self, time_earliest_span_started): """ Sets the time_earliest_span_started of this TraceSpanSummary. - Start time of the earliest span in this span collection. + Start time of the earliest span in the span collection. :param time_earliest_span_started: The time_earliest_span_started of this TraceSpanSummary. @@ -221,7 +220,7 @@ def time_earliest_span_started(self, time_earliest_span_started): def time_latest_span_ended(self): """ **[Required]** Gets the time_latest_span_ended of this TraceSpanSummary. - End time of the span that most recently ended in this span collection. + End time of the span that most recently ended in the span collection. :return: The time_latest_span_ended of this TraceSpanSummary. @@ -233,7 +232,7 @@ def time_latest_span_ended(self): def time_latest_span_ended(self, time_latest_span_ended): """ Sets the time_latest_span_ended of this TraceSpanSummary. - End time of the span that most recently ended in this span collection. + End time of the span that most recently ended in the span collection. :param time_latest_span_ended: The time_latest_span_ended of this TraceSpanSummary. @@ -245,7 +244,7 @@ def time_latest_span_ended(self, time_latest_span_ended): def span_count(self): """ **[Required]** Gets the span_count of this TraceSpanSummary. - The number of spans that have been processed by the system for this trace. Note that there + The number of spans that have been processed by the system for the trace. Note that there could be additional spans that have not been processed or reported yet if the trace is still in progress. @@ -259,7 +258,7 @@ def span_count(self): def span_count(self, span_count): """ Sets the span_count of this TraceSpanSummary. - The number of spans that have been processed by the system for this trace. Note that there + The number of spans that have been processed by the system for the trace. Note that there could be additional spans that have not been processed or reported yet if the trace is still in progress. @@ -273,9 +272,8 @@ def span_count(self, span_count): def error_span_count(self): """ **[Required]** Gets the error_span_count of this TraceSpanSummary. - The number of spans with error that have been processed by the system for this trace. - Note that the number of spans with errors may be less than the total number of actual spans - in this trace. + The number of spans with errors that have been processed by the system for the trace. + Note that the number of spans with errors will be less than or equal to the total number of spans in the trace. :return: The error_span_count of this TraceSpanSummary. @@ -287,9 +285,8 @@ def error_span_count(self): def error_span_count(self, error_span_count): """ Sets the error_span_count of this TraceSpanSummary. - The number of spans with error that have been processed by the system for this trace. - Note that the number of spans with errors may be less than the total number of actual spans - in this trace. + The number of spans with errors that have been processed by the system for the trace. + Note that the number of spans with errors will be less than or equal to the total number of spans in the trace. :param error_span_count: The error_span_count of this TraceSpanSummary. @@ -301,7 +298,7 @@ def error_span_count(self, error_span_count): def root_span_service_name(self): """ Gets the root_span_service_name of this TraceSpanSummary. - Service associated with this trace. + Service associated with the trace. :return: The root_span_service_name of this TraceSpanSummary. @@ -313,7 +310,7 @@ def root_span_service_name(self): def root_span_service_name(self, root_span_service_name): """ Sets the root_span_service_name of this TraceSpanSummary. - Service associated with this trace. + Service associated with the trace. :param root_span_service_name: The root_span_service_name of this TraceSpanSummary. @@ -325,7 +322,7 @@ def root_span_service_name(self, root_span_service_name): def time_root_span_started(self): """ Gets the time_root_span_started of this TraceSpanSummary. - Start time of the root span for this span collection. + Start time of the root span for the span collection. :return: The time_root_span_started of this TraceSpanSummary. @@ -337,7 +334,7 @@ def time_root_span_started(self): def time_root_span_started(self, time_root_span_started): """ Sets the time_root_span_started of this TraceSpanSummary. - Start time of the root span for this span collection. + Start time of the root span for the span collection. :param time_root_span_started: The time_root_span_started of this TraceSpanSummary. @@ -349,7 +346,7 @@ def time_root_span_started(self, time_root_span_started): def time_root_span_ended(self): """ Gets the time_root_span_ended of this TraceSpanSummary. - End time of the root span for this span collection. + End time of the root span for the span collection. :return: The time_root_span_ended of this TraceSpanSummary. @@ -361,7 +358,7 @@ def time_root_span_ended(self): def time_root_span_ended(self, time_root_span_ended): """ Sets the time_root_span_ended of this TraceSpanSummary. - End time of the root span for this span collection. + End time of the root span for the span collection. :param time_root_span_ended: The time_root_span_ended of this TraceSpanSummary. @@ -421,7 +418,7 @@ def trace_duration_in_ms(self, trace_duration_in_ms): def is_fault(self): """ **[Required]** Gets the is_fault of this TraceSpanSummary. - Boolean flag that indicates whether the trace errored out. + Boolean flag that indicates whether the trace has an error. :return: The is_fault of this TraceSpanSummary. @@ -433,7 +430,7 @@ def is_fault(self): def is_fault(self, is_fault): """ Sets the is_fault of this TraceSpanSummary. - Boolean flag that indicates whether the trace errored out. + Boolean flag that indicates whether the trace has an error. :param is_fault: The is_fault of this TraceSpanSummary. @@ -447,7 +444,7 @@ def trace_status(self): **[Required]** Gets the trace_status of this TraceSpanSummary. The status of the trace. The trace statuses are defined as follows: - complete \u2013 a root span has been recorded, but there is no information on the errors. + complete - a root span has been recorded, but there is no information on the errors. success - a complete root span is recorded there is a successful error type and error code - HTTP 200. incomplete - the root span has not yet been received. error - the root span returned with an error. There may or may not be an associated error code or error type. @@ -464,7 +461,7 @@ def trace_status(self, trace_status): Sets the trace_status of this TraceSpanSummary. The status of the trace. The trace statuses are defined as follows: - complete \u2013 a root span has been recorded, but there is no information on the errors. + complete - a root span has been recorded, but there is no information on the errors. success - a complete root span is recorded there is a successful error type and error code - HTTP 200. incomplete - the root span has not yet been received. error - the root span returned with an error. There may or may not be an associated error code or error type. @@ -527,7 +524,7 @@ def trace_error_code(self, trace_error_code): def service_summaries(self): """ Gets the service_summaries of this TraceSpanSummary. - A summary of the spans by service + A summary of the spans by service. :return: The service_summaries of this TraceSpanSummary. @@ -539,7 +536,7 @@ def service_summaries(self): def service_summaries(self, service_summaries): """ Sets the service_summaries of this TraceSpanSummary. - A summary of the spans by service + A summary of the spans by service. :param service_summaries: The service_summaries of this TraceSpanSummary. diff --git a/src/oci/apm_traces/query_client.py b/src/oci/apm_traces/query_client.py index 78b138f3af..b68a747cb0 100644 --- a/src/oci/apm_traces/query_client.py +++ b/src/oci/apm_traces/query_client.py @@ -18,7 +18,7 @@ class QueryClient(object): """ - API for APM Trace service. Use this API to query the Traces and associated Spans. + 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): @@ -106,12 +106,12 @@ def __init__(self, config, **kwargs): def list_quick_picks(self, apm_domain_id, **kwargs): """ - Returns a list of predefined quick pick queries intended to assist the user + Returns a list of predefined Quick Pick queries intended to assist the user to choose a query to run. There is no sorting applied on the results. :param str apm_domain_id: (required) - The APM Domain Id the request is intended for. + The APM Domain ID the request is intended for. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -198,23 +198,24 @@ def list_quick_picks(self, apm_domain_id, **kwargs): def query(self, apm_domain_id, time_span_started_greater_than_or_equal_to, time_span_started_less_than, query_details, **kwargs): """ - Given a query, constructed according to the APM Defined Query Syntax, retrieves the results - selected attributes, - and aggregations of the queried entity. Query Results are filtered by the filter criteria specified in the where clause. + Retrieves the results (selected attributes and aggregations) of a query constructed according to the Application Performance Monitoring Defined Query Syntax. + Query results are filtered by the filter criteria specified in the where clause. Further query results are grouped by the attributes specified in the group by clause. Finally, ordering (asc/desc) is done by the specified attributes in the order by clause. :param str apm_domain_id: (required) - The APM Domain Id the request is intended for. + The APM Domain ID the request is intended for. :param datetime time_span_started_greater_than_or_equal_to: (required) - Include spans that have a `spanStartTime` equal to or greater this value. + Include spans that have a `spanStartTime` equal to or greater than this value. :param datetime time_span_started_less_than: (required) Include spans that have a `spanStartTime`less than this value. :param oci.apm_traces.models.QueryDetails query_details: (required) - Request body containing the query to be run against our repository. + Request body containing the query to be run against the trace data and to filter and + retrieve trace data results. :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -302,112 +303,3 @@ def query(self, apm_domain_id, time_span_started_greater_than_or_equal_to, time_ header_params=header_params, body=query_details, response_type="QueryResultResponse") - - def query_old(self, apm_domain_id, time_span_started_greater_than_or_equal_to, time_span_started_less_than, query_details, **kwargs): - """ - THIS API ENDPOINT WILL BE DEPRECATED AND INSTEAD /queries/actions/runQuery as defined below WILL BE USED GOING FORWARD. THIS EXISTS JUST - AS A TEMPORARY PLACEHOLDER SO AS TO BE BACKWARDS COMPATIBLE WITH THE UI BETWEEN RELEASE CYCLES. - Given a query, constructed according to the APM Defined Query Syntax, retrieves the results - selected attributes, - and aggregations of the queried entity. Query Results are filtered by the filter criteria specified in the where clause. - Further query results are grouped by the attributes specified in the group by clause. Finally, - ordering (asc/desc) is done by the specified attributes in the order by clause. - - - :param str apm_domain_id: (required) - The APM Domain Id the request is intended for. - - :param datetime time_span_started_greater_than_or_equal_to: (required) - Include spans that have a `spanStartTime` equal to or greater this value. - - :param datetime time_span_started_less_than: (required) - Include spans that have a `spanStartTime`less than this value. - - :param oci.apm_traces.models.QueryDetails query_details: (required) - Request body containing the query to be run against our repository. - - :param str opc_request_id: (optional) - Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a - particular request, please provide the request ID. - - :param int limit: (optional) - 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 response. - - :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.QueryResultResponse` - :rtype: :class:`~oci.response.Response` - - :example: - Click `here `__ to see an example of how to use query_old API. - """ - resource_path = "/queries/action/runQuery" - method = "POST" - - # Don't accept unknown kwargs - expected_kwargs = [ - "allow_control_chars", - "retry_strategy", - "opc_request_id", - "limit", - "page" - ] - extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - "query_old got unknown kwargs: {!r}".format(extra_kwargs)) - - query_params = { - "apmDomainId": apm_domain_id, - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "timeSpanStartedGreaterThanOrEqualTo": time_span_started_greater_than_or_equal_to, - "timeSpanStartedLessThan": time_span_started_less_than - } - 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=query_details, - response_type="QueryResultResponse") - else: - return self.base_client.call_api( - resource_path=resource_path, - method=method, - query_params=query_params, - header_params=header_params, - body=query_details, - response_type="QueryResultResponse") diff --git a/src/oci/apm_traces/trace_client.py b/src/oci/apm_traces/trace_client.py index b1aaeedb4a..b07c55f406 100644 --- a/src/oci/apm_traces/trace_client.py +++ b/src/oci/apm_traces/trace_client.py @@ -18,7 +18,7 @@ class TraceClient(object): """ - API for APM Trace service. Use this API to query the Traces and associated Spans. + 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): @@ -104,19 +104,114 @@ def __init__(self, config, **kwargs): self.retry_strategy = kwargs.get('retry_strategy') self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + def get_aggregated_snapshot(self, apm_domain_id, trace_key, **kwargs): + """ + Gets the aggregated snapshot identified by trace ID. + + + :param str apm_domain_id: (required) + The APM Domain ID the request is intended for. + + :param str trace_key: (required) + Unique Application Performance Monitoring trace identifier (traceId). + + :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.AggregatedSnapshot` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_aggregated_snapshot API. + """ + resource_path = "/traces/{traceKey}/aggregatedSnapshotData" + method = "GET" + + # 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( + "get_aggregated_snapshot got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "traceKey": trace_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "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, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AggregatedSnapshot") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AggregatedSnapshot") + def get_span(self, apm_domain_id, span_key, trace_key, **kwargs): """ - Get the span details identified by spanId + Gets the span details identified by spanId. :param str apm_domain_id: (required) - The APM Domain Id the request is intended for. + The APM Domain ID the request is intended for. :param str span_key: (required) - Unique APM span identifier(spanId). + Unique Application Performance Monitoring span identifier (spanId). :param str trace_key: (required) - Unique APM trace identifier(traceId). + Unique Application Performance Monitoring trace identifier (traceId). :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -205,14 +300,14 @@ def get_span(self, apm_domain_id, span_key, trace_key, **kwargs): def get_trace(self, apm_domain_id, trace_key, **kwargs): """ - Get the trace details identified by traceId + Gets the trace details identified by traceId. :param str apm_domain_id: (required) - The APM Domain Id the request is intended for. + The APM Domain ID the request is intended for. :param str trace_key: (required) - Unique APM trace identifier(traceId). + Unique Application Performance Monitoring trace identifier (traceId). :param str opc_request_id: (optional) Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a @@ -297,3 +392,113 @@ def get_trace(self, apm_domain_id, trace_key, **kwargs): query_params=query_params, header_params=header_params, response_type="Trace") + + def get_trace_snapshot(self, apm_domain_id, trace_key, **kwargs): + """ + Gets the trace snapshots data identified by trace ID. + + + :param str apm_domain_id: (required) + The APM Domain ID the request is intended for. + + :param str trace_key: (required) + Unique Application Performance Monitoring trace identifier (traceId). + + :param str opc_request_id: (optional) + Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + particular request, please provide the request ID. + + :param bool is_summarized: (optional) + If enabled, then only span level details will be 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. + + :param str snapshot_time: (optional) + Epoch time of snapshot. + + :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.TraceSnapshot` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_trace_snapshot API. + """ + resource_path = "/traces/{traceKey}/snapshotData" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "is_summarized", + "thread_id", + "snapshot_time" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_trace_snapshot got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "traceKey": trace_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "apmDomainId": apm_domain_id, + "isSummarized": kwargs.get("is_summarized", missing), + "threadId": kwargs.get("thread_id", missing), + "snapshotTime": kwargs.get("snapshot_time", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TraceSnapshot") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="TraceSnapshot") diff --git a/src/oci/data_safe/data_safe_client.py b/src/oci/data_safe/data_safe_client.py index 9de9ab2c02..4b1633d61c 100644 --- a/src/oci/data_safe/data_safe_client.py +++ b/src/oci/data_safe/data_safe_client.py @@ -12,6 +12,7 @@ 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.util import back_up_body_calculate_stream_content_length, is_content_length_calculable_by_req_util from .models import data_safe_type_mapping missing = Sentinel("Missing") @@ -209,19 +210,16 @@ def activate_target_database(self, activate_target_database_details, target_data header_params=header_params, body=activate_target_database_details) - def change_data_safe_private_endpoint_compartment(self, data_safe_private_endpoint_id, change_data_safe_private_endpoint_compartment_details, **kwargs): + def add_masking_columns_from_sdm(self, masking_policy_id, **kwargs): """ - Moves the Data Safe private endpoint and its dependent resources to the specified compartment. - - - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + Adds columns to the specified masking policy from the associated sensitive data model. It + automatically pulls all the sensitive columns and their relationships from the sensitive + data model and uses this information to create columns in the masking policy. It also assigns + default masking formats to these columns based on the associated sensitive types. - :param oci.data_safe.models.ChangeDataSafePrivateEndpointCompartmentDetails change_data_safe_private_endpoint_compartment_details: (required) - The details used to change the compartment of a Data Safe private endpoint. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param str masking_policy_id: (required) + The OCID of the masking policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -230,6 +228,9 @@ def change_data_safe_private_endpoint_compartment(self, data_safe_private_endpoi The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -246,25 +247,25 @@ def change_data_safe_private_endpoint_compartment(self, data_safe_private_endpoi :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_data_safe_private_endpoint_compartment API. + Click `here `__ to see an example of how to use add_masking_columns_from_sdm API. """ - resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}/actions/changeCompartment" + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/addMaskingColumnsFromSdm" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "if_match" + "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( - "change_data_safe_private_endpoint_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "add_masking_columns_from_sdm got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "dataSafePrivateEndpointId": data_safe_private_endpoint_id + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -276,8 +277,8 @@ def change_data_safe_private_endpoint_compartment(self, data_safe_private_endpoi 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) + "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} @@ -295,29 +296,27 @@ def change_data_safe_private_endpoint_compartment(self, data_safe_private_endpoi resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - body=change_data_safe_private_endpoint_compartment_details) + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - body=change_data_safe_private_endpoint_compartment_details) + header_params=header_params) - def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_prem_connector_compartment_details, **kwargs): + def apply_discovery_job_results(self, sensitive_data_model_id, apply_discovery_job_results_details, **kwargs): """ - Moves the specified on-premises connector into a different compartment. - + Applies the results of a discovery job to the specified sensitive data model. Note that the plannedAction attribute + of discovery results is used for processing them. You should first use PatchDiscoveryJobResults to set the plannedAction + attribute of the discovery results you want to process. ApplyDiscoveryJobResults automatically reads the plannedAction + attribute and updates the sensitive data model to reflect the actions you planned. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. - :param oci.data_safe.models.ChangeOnPremConnectorCompartmentDetails change_on_prem_connector_compartment_details: (required) - The details used to change the compartment of an on-premises connector. + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.ApplyDiscoveryJobResultsDetails apply_discovery_job_results_details: (required) + Details to apply the discovery results to a sensitive data model. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -326,11 +325,8 @@ def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_p The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str opc_request_id: (optional) + Unique identifier for the request. :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. @@ -348,26 +344,25 @@ def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_p :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_on_prem_connector_compartment API. + Click `here `__ to see an example of how to use apply_discovery_job_results API. """ - resource_path = "/onPremConnectors/{onPremConnectorId}/actions/changeCompartment" + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns/actions/applyDiscoveryJobResults" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "change_on_prem_connector_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "apply_discovery_job_results got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "onPremConnectorId": on_prem_connector_id + "sensitiveDataModelId": sensitive_data_model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -379,9 +374,8 @@ def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_p header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -392,7 +386,6 @@ def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_p 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( @@ -401,32 +394,25 @@ def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_p method=method, path_params=path_params, header_params=header_params, - body=change_on_prem_connector_compartment_details) + body=apply_discovery_job_results_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=change_on_prem_connector_compartment_details) + body=apply_discovery_job_results_details) - def change_security_assessment_compartment(self, security_assessment_id, change_security_assessment_compartment_details, **kwargs): + def calculate_audit_volume_available(self, audit_profile_id, calculate_audit_volume_available_details, **kwargs): """ - Moves the specified saved security assessment or future scheduled assessments into a different compartment. - - To start, call first the operation ListSecurityAssessments with filters \"type = save_schedule\". This returns the scheduleAssessmentId. Then, call this changeCompartment with the scheduleAssessmentId. + Calculates the volume of audit events available on the target database to be collected. Measurable up to the defined retention period of the audit target resource. - The existing saved security assessments created due to the schedule are not moved. However, all new saves will be associated with the new compartment. - - - :param str security_assessment_id: (required) - The OCID of the security assessment. - :param oci.data_safe.models.ChangeSecurityAssessmentCompartmentDetails change_security_assessment_compartment_details: (required) - The details used to change the compartment of a security assessment. + :param str audit_profile_id: (required) + The OCID of the audit. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.CalculateAuditVolumeAvailableDetails calculate_audit_volume_available_details: (required) + Details for the calculation of audit volume available on target database. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -441,6 +427,9 @@ def change_security_assessment_compartment(self, security_assessment_id, change_ 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) + Unique identifier for the request. + :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. @@ -457,26 +446,26 @@ def change_security_assessment_compartment(self, security_assessment_id, change_ :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_security_assessment_compartment API. + Click `here `__ to see an example of how to use calculate_audit_volume_available API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/changeCompartment" + resource_path = "/auditProfiles/{auditProfileId}/actions/calculateAuditVolumeAvailable" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", "if_match", - "opc_retry_token" + "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( - "change_security_assessment_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "calculate_audit_volume_available got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "auditProfileId": audit_profile_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -488,9 +477,9 @@ def change_security_assessment_compartment(self, security_assessment_id, change_ header_params = { "accept": "application/json", "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-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} @@ -510,25 +499,25 @@ def change_security_assessment_compartment(self, security_assessment_id, change_ method=method, path_params=path_params, header_params=header_params, - body=change_security_assessment_compartment_details) + body=calculate_audit_volume_available_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=change_security_assessment_compartment_details) + body=calculate_audit_volume_available_details) - def change_target_database_compartment(self, target_database_id, change_target_database_compartment_details, **kwargs): + def calculate_audit_volume_collected(self, audit_profile_id, calculate_audit_volume_collected_details, **kwargs): """ - Moves the Data Safe target database to the specified compartment. + Calculates the volume of audit events collected by data safe. - :param str target_database_id: (required) - The OCID of the Data Safe target database. + :param str audit_profile_id: (required) + The OCID of the audit. - :param oci.data_safe.models.ChangeTargetDatabaseCompartmentDetails change_target_database_compartment_details: (required) - Details of the move compartment request. + :param oci.data_safe.models.CalculateAuditVolumeCollectedDetails calculate_audit_volume_collected_details: (required) + Details for the calculation of audit volume collected by data safe. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -537,15 +526,15 @@ def change_target_database_compartment(self, target_database_id, change_target_d The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. - :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) + Unique identifier for the request. + :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. @@ -562,9 +551,9 @@ def change_target_database_compartment(self, target_database_id, change_target_d :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_target_database_compartment API. + Click `here `__ to see an example of how to use calculate_audit_volume_collected API. """ - resource_path = "/targetDatabases/{targetDatabaseId}/actions/changeCompartment" + resource_path = "/auditProfiles/{auditProfileId}/actions/calculateAuditVolumeCollected" method = "POST" # Don't accept unknown kwargs @@ -572,16 +561,16 @@ def change_target_database_compartment(self, target_database_id, change_target_d "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id", - "opc_retry_token" + "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( - "change_target_database_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "calculate_audit_volume_collected got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "targetDatabaseId": target_database_id + "auditProfileId": audit_profile_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -594,8 +583,8 @@ def change_target_database_compartment(self, target_database_id, change_target_d "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-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} @@ -615,36 +604,22 @@ def change_target_database_compartment(self, target_database_id, change_target_d method=method, path_params=path_params, header_params=header_params, - body=change_target_database_compartment_details) + body=calculate_audit_volume_collected_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=change_target_database_compartment_details) + body=calculate_audit_volume_collected_details) - def change_user_assessment_compartment(self, user_assessment_id, change_user_assessment_compartment_details, **kwargs): + def cancel_work_request(self, work_request_id, **kwargs): """ - Moves the specified saved user assessment or future scheduled assessments into a different compartment. - To start storing scheduled user assessments on a different compartment, first call the operation ListUserAssessments with - the filters \"type = save_schedule\". That call returns the scheduleAssessmentId. Then call - ChangeUserAssessmentCompartment with the scheduleAssessmentId. The existing saved user assessments created per the schedule - are not be moved. However, all new saves will be associated with the new compartment. - - - :param str user_assessment_id: (required) - The OCID of the user assessment. + Cancel the given work request. - :param oci.data_safe.models.ChangeUserAssessmentCompartmentDetails change_user_assessment_compartment_details: (required) - The details used to change the compartment of a user assessment. - :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 work_request_id: (required) + The OCID of the work request. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -655,6 +630,13 @@ def change_user_assessment_compartment(self, user_assessment_id, change_user_ass :param str opc_request_id: (optional) Unique identifier for the request. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param 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. @@ -671,26 +653,26 @@ def change_user_assessment_compartment(self, user_assessment_id, change_user_ass :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use change_user_assessment_compartment API. + Click `here `__ to see an example of how to use cancel_work_request API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/changeCompartment" - method = "POST" + resource_path = "/workRequests/{workRequestId}" + method = "DELETE" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", "opc_retry_token", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "change_user_assessment_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + "cancel_work_request got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "workRequestId": work_request_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -702,9 +684,9 @@ def change_user_assessment_compartment(self, user_assessment_id, change_user_ass header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -723,33 +705,24 @@ def change_user_assessment_compartment(self, user_assessment_id, change_user_ass resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - body=change_user_assessment_compartment_details) + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params, - body=change_user_assessment_compartment_details) + header_params=header_params) - def compare_security_assessment(self, security_assessment_id, compare_security_assessment_details, **kwargs): + def change_alert_compartment(self, alert_id, change_alert_compartment_details, **kwargs): """ - Compares two security assessments. For this comparison, a security assessment can be a saved assessment, a latest assessment, or a baseline assessment. - For example, you can compare saved assessment or a latest assessment against a baseline. + Moves the specified alert into a different compartment. - :param str security_assessment_id: (required) - The OCID of the security assessment. - - :param oci.data_safe.models.CompareSecurityAssessmentDetails compare_security_assessment_details: (required) - Details of the security assessment comparison. + :param str alert_id: (required) + The OCID of alert. - :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 oci.data_safe.models.ChangeAlertCompartmentDetails change_alert_compartment_details: (required) + The details used to change the compartment of an alert. :param str opc_request_id: (optional) Unique identifier for the request. @@ -761,6 +734,12 @@ def compare_security_assessment(self, security_assessment_id, compare_security_a The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -777,26 +756,26 @@ def compare_security_assessment(self, security_assessment_id, compare_security_a :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use compare_security_assessment API. + Click `here `__ to see an example of how to use change_alert_compartment API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/compare" + resource_path = "/alerts/{alertId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", "opc_request_id", - "if_match" + "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( - "compare_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_alert_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "alertId": alert_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -808,9 +787,9 @@ def compare_security_assessment(self, security_assessment_id, compare_security_a 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), - "if-match": kwargs.get("if_match", 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} @@ -830,35 +809,25 @@ def compare_security_assessment(self, security_assessment_id, compare_security_a method=method, path_params=path_params, header_params=header_params, - body=compare_security_assessment_details) + body=change_alert_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=compare_security_assessment_details) + body=change_alert_compartment_details) - def compare_user_assessment(self, user_assessment_id, compare_user_assessment_details, **kwargs): + def change_audit_archive_retrieval_compartment(self, audit_archive_retrieval_id, change_audit_archive_retrieval_compartment_details, **kwargs): """ - Compares two user assessments. For this comparison, a user assessment can be a saved, a latest assessment, or a baseline. - As an example, it can be used to compare a user assessment saved or a latest assessment with a baseline. - - - :param str user_assessment_id: (required) - The OCID of the user assessment. + Moves the archive retreival to the specified compartment. When provided, if-Match is checked against ETag value of the resource. - :param oci.data_safe.models.CompareUserAssessmentDetails compare_user_assessment_details: (required) - Details of the user assessment comparison. - :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 audit_archive_retrieval_id: (required) + OCID of the archive retrieval. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails change_audit_archive_retrieval_compartment_details: (required) + The details used to change the compartment of a archive retrieval. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -867,6 +836,15 @@ def compare_user_assessment(self, user_assessment_id, compare_user_assessment_de The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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. @@ -883,26 +861,26 @@ def compare_user_assessment(self, user_assessment_id, compare_user_assessment_de :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use compare_user_assessment API. + Click `here `__ to see an example of how to use change_audit_archive_retrieval_compartment API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/compare" + resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", + "if_match", "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( - "compare_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_audit_archive_retrieval_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "auditArchiveRetrievalId": audit_archive_retrieval_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -914,9 +892,9 @@ def compare_user_assessment(self, user_assessment_id, compare_user_assessment_de header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -936,22 +914,35 @@ def compare_user_assessment(self, user_assessment_id, compare_user_assessment_de method=method, path_params=path_params, header_params=header_params, - body=compare_user_assessment_details) + body=change_audit_archive_retrieval_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=compare_user_assessment_details) + body=change_audit_archive_retrieval_compartment_details) - def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_details, **kwargs): + def change_audit_policy_compartment(self, audit_policy_id, change_audit_policy_compartment_details, **kwargs): """ - Creates a new Data Safe private endpoint. + Moves the specified audit policy and its dependent resources into a different compartment. - :param oci.data_safe.models.CreateDataSafePrivateEndpointDetails create_data_safe_private_endpoint_details: (required) - Details to create a new private endpoint. + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param oci.data_safe.models.ChangeAuditPolicyCompartmentDetails change_audit_policy_compartment_details: (required) + Details for the compartment move. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -959,9 +950,6 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de 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) - Unique identifier for the request. - :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. @@ -974,32 +962,44 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de 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.data_safe.models.DataSafePrivateEndpoint` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use change_audit_policy_compartment API. """ - resource_path = "/dataSafePrivateEndpoints" + resource_path = "/auditPolicies/{auditPolicyId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id" + "if_match", + "opc_request_id", + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) + "change_audit_policy_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditPolicyId": audit_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -1017,24 +1017,34 @@ def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_de self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_data_safe_private_endpoint_details, - response_type="DataSafePrivateEndpoint") + body=change_audit_policy_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_data_safe_private_endpoint_details, - response_type="DataSafePrivateEndpoint") + body=change_audit_policy_compartment_details) - def create_on_prem_connector(self, create_on_prem_connector_details, **kwargs): + def change_audit_profile_compartment(self, audit_profile_id, change_audit_profile_compartment_details, **kwargs): """ - Creates a new on-premises connector. + Moves the specified audit profile and its dependent resources into a different compartment. - :param oci.data_safe.models.CreateOnPremConnectorDetails create_on_prem_connector_details: (required) - The details used to create a new on-premises connector. + :param str audit_profile_id: (required) + The OCID of the audit. + + :param oci.data_safe.models.ChangeAuditProfileCompartmentDetails change_audit_profile_compartment_details: (required) + Details for the compartment move. + + :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 @@ -1057,30 +1067,42 @@ def create_on_prem_connector(self, create_on_prem_connector_details, **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.data_safe.models.OnPremConnector` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_on_prem_connector API. + Click `here `__ to see an example of how to use change_audit_profile_compartment API. """ - resource_path = "/onPremConnectors" + resource_path = "/auditProfiles/{auditProfileId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) + "change_audit_profile_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditProfileId": audit_profile_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } @@ -1100,38 +1122,38 @@ def create_on_prem_connector(self, create_on_prem_connector_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_on_prem_connector_details, - response_type="OnPremConnector") + body=change_audit_profile_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_on_prem_connector_details, - response_type="OnPremConnector") + body=change_audit_profile_compartment_details) - def create_security_assessment(self, create_security_assessment_details, **kwargs): + def change_data_safe_private_endpoint_compartment(self, data_safe_private_endpoint_id, change_data_safe_private_endpoint_compartment_details, **kwargs): """ - Creates a new saved security assessment for one or multiple targets in a compartment. When this operation is performed, - it will save the latest assessments in the specified compartment. If a schedule is passed, it will persist the latest assessments, - at the defined date and time, in the format defined by `RFC3339`__. - - __ https://tools.ietf.org/html/rfc3339 + Moves the Data Safe private endpoint and its dependent resources to the specified compartment. - :param oci.data_safe.models.CreateSecurityAssessmentDetails create_security_assessment_details: (required) - The details used to create a new saved security assessment. + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. - :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 oci.data_safe.models.ChangeDataSafePrivateEndpointCompartmentDetails change_data_safe_private_endpoint_compartment_details: (required) + The details used to change the compartment of a Data Safe private endpoint. :param str opc_request_id: (optional) Unique identifier for the request. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param 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. @@ -1144,32 +1166,42 @@ def create_security_assessment(self, create_security_assessment_details, **kwarg 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.data_safe.models.SecurityAssessment` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_security_assessment API. + Click `here `__ to see an example of how to use change_data_safe_private_endpoint_compartment API. """ - resource_path = "/securityAssessments" + resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_data_safe_private_endpoint_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "dataSafePrivateEndpointId": data_safe_private_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1180,31 +1212,43 @@ def create_security_assessment(self, create_security_assessment_details, **kwarg if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_security_assessment_details, - response_type="SecurityAssessment") + body=change_data_safe_private_endpoint_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_security_assessment_details, - response_type="SecurityAssessment") + body=change_data_safe_private_endpoint_compartment_details) - def create_target_database(self, create_target_database_details, **kwargs): + def change_discovery_job_compartment(self, discovery_job_id, change_discovery_job_compartment_details, **kwargs): """ - Registers the specified database with Data Safe and creates a Data Safe target database in the Data Safe Console. + Moves the specified discovery job and its dependent resources into a different compartment. - :param oci.data_safe.models.CreateTargetDatabaseDetails create_target_database_details: (required) - Details of the target database. + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param oci.data_safe.models.ChangeDiscoveryJobCompartmentDetails change_discovery_job_compartment_details: (required) + The details used to change the compartment of a resource. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -1212,9 +1256,6 @@ def create_target_database(self, create_target_database_details, **kwargs): 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) - Unique identifier for the request. - :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. @@ -1227,32 +1268,44 @@ def create_target_database(self, create_target_database_details, **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.data_safe.models.TargetDatabase` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_target_database API. + Click `here `__ to see an example of how to use change_discovery_job_compartment API. """ - resource_path = "/targetDatabases" + resource_path = "/discoveryJobs/{discoveryJobId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id" + "if_match", + "opc_request_id", + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + "change_discovery_job_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -1270,28 +1323,34 @@ def create_target_database(self, create_target_database_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_target_database_details, - response_type="TargetDatabase") + body=change_discovery_job_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_target_database_details, - response_type="TargetDatabase") + body=change_discovery_job_compartment_details) - def create_user_assessment(self, create_user_assessment_details, **kwargs): + def change_library_masking_format_compartment(self, library_masking_format_id, change_library_masking_format_compartment_details, **kwargs): """ - Creates a new saved user assessment for one or multiple targets in a compartment. It saves the latest assessments in the - specified compartment. If a scheduled is passed in, this operation persists the latest assessments that exist at the defined - date and time, in the format defined by `RFC3339`__. + Moves the specified library masking format into a different compartment. - __ https://tools.ietf.org/html/rfc3339 + :param str library_masking_format_id: (required) + The OCID of the library masking format. - :param oci.data_safe.models.CreateUserAssessmentDetails create_user_assessment_details: (required) - The details used to create a new saved user assessment. + :param oci.data_safe.models.ChangeLibraryMaskingFormatCompartmentDetails change_library_masking_format_compartment_details: (required) + Details to change the compartment of a library masking format. + + :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 @@ -1314,30 +1373,42 @@ def create_user_assessment(self, create_user_assessment_details, **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.data_safe.models.UserAssessment` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use create_user_assessment API. + Click `here `__ to see an example of how to use change_library_masking_format_compartment API. """ - resource_path = "/userAssessments" + resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "create_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_library_masking_format_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "libraryMaskingFormatId": library_masking_format_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } @@ -1357,30 +1428,27 @@ def create_user_assessment(self, create_user_assessment_details, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_user_assessment_details, - response_type="UserAssessment") + body=change_library_masking_format_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - body=create_user_assessment_details, - response_type="UserAssessment") + body=change_library_masking_format_compartment_details) - def deactivate_target_database(self, target_database_id, **kwargs): + def change_masking_policy_compartment(self, masking_policy_id, change_masking_policy_compartment_details, **kwargs): """ - Deactivates a target database in Data Safe. + Moves the specified masking policy and its dependent resources into a different compartment. - :param str target_database_id: (required) - The OCID of the Data Safe target database. + :param str masking_policy_id: (required) + The OCID of the masking policy. - :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 oci.data_safe.models.ChangeMaskingPolicyCompartmentDetails change_masking_policy_compartment_details: (required) + Details to change the compartment of a masking policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1389,6 +1457,12 @@ def deactivate_target_database(self, target_database_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str opc_request_id: (optional) Unique identifier for the request. @@ -1408,26 +1482,26 @@ def deactivate_target_database(self, target_database_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use deactivate_target_database API. + Click `here `__ to see an example of how to use change_masking_policy_compartment API. """ - resource_path = "/targetDatabases/{targetDatabaseId}/actions/deactivate" + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", "if_match", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "deactivate_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + "change_masking_policy_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "targetDatabaseId": target_database_id + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1439,8 +1513,8 @@ def deactivate_target_database(self, target_database_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1460,21 +1534,29 @@ def deactivate_target_database(self, target_database_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_masking_policy_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_masking_policy_compartment_details) - def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs): + def change_on_prem_connector_compartment(self, on_prem_connector_id, change_on_prem_connector_compartment_details, **kwargs): """ - Deletes the specified Data Safe private endpoint. + Moves the specified on-premises connector into a different compartment. - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. + + :param oci.data_safe.models.ChangeOnPremConnectorCompartmentDetails change_on_prem_connector_compartment_details: (required) + The details used to change the compartment of an on-premises connector. + + :param str opc_request_id: (optional) + Unique identifier for the request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1483,8 +1565,11 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. + :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. @@ -1502,25 +1587,26 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use change_on_prem_connector_compartment API. """ - resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" - method = "DELETE" + resource_path = "/onPremConnectors/{onPremConnectorId}/actions/changeCompartment" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "opc_request_id", "if_match", - "opc_request_id" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) + "change_on_prem_connector_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "dataSafePrivateEndpointId": data_safe_private_endpoint_id + "onPremConnectorId": on_prem_connector_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1532,8 +1618,9 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa header_params = { "accept": "application/json", "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1544,6 +1631,7 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1551,21 +1639,26 @@ def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwa resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_on_prem_connector_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_on_prem_connector_compartment_details) - def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): + def change_report_compartment(self, report_id, change_report_compartment_details, **kwargs): """ - Deletes the specified on-premises connector. + Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param str report_id: (required) + Unique report identifier + + :param oci.data_safe.models.ChangeReportCompartmentDetails change_report_compartment_details: (required) + Details for the different Report. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1577,6 +1670,12 @@ def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): :param str opc_request_id: (optional) Unique identifier for the request. + :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. @@ -1593,25 +1692,26 @@ def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_on_prem_connector API. + Click `here `__ to see an example of how to use change_report_compartment API. """ - resource_path = "/onPremConnectors/{onPremConnectorId}" - method = "DELETE" + resource_path = "/reports/{reportId}/actions/changeCompartment" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) + "change_report_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "onPremConnectorId": on_prem_connector_id + "reportId": report_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1624,7 +1724,8 @@ def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-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} @@ -1635,6 +1736,7 @@ def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1642,27 +1744,26 @@ def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_report_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_report_compartment_details) - def delete_security_assessment(self, security_assessment_id, **kwargs): + def change_report_definition_compartment(self, report_definition_id, change_report_definition_compartment_details, **kwargs): """ - Deletes the specified saved security assessment or schedule. To delete a security assessment schedule, - first call the operation ListSecurityAssessments with filters \"type = save_schedule\". - That operation returns the scheduleAssessmentId. Then, call DeleteSecurityAssessment with the scheduleAssessmentId. - If the assessment being deleted is the baseline for that compartment, then it will impact all baselines in the compartment. + Moves a resource into a different compartment. When provided, If-Match is checked against ETag values of the resource. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str report_definition_id: (required) + Unique report definition identifier - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.ChangeReportDefinitionCompartmentDetails change_report_definition_compartment_details: (required) + Details for the different ReportDefinition. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1671,6 +1772,15 @@ def delete_security_assessment(self, security_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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. @@ -1687,25 +1797,26 @@ def delete_security_assessment(self, security_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_security_assessment API. + Click `here `__ to see an example of how to use change_report_definition_compartment API. """ - resource_path = "/securityAssessments/{securityAssessmentId}" - method = "DELETE" + resource_path = "/reportDefinitions/{reportDefinitionId}/actions/changeCompartment" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "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( - "delete_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_report_definition_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "reportDefinitionId": report_definition_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1717,8 +1828,9 @@ def delete_security_assessment(self, security_assessment_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), - "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} @@ -1729,6 +1841,7 @@ def delete_security_assessment(self, security_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1736,21 +1849,26 @@ def delete_security_assessment(self, security_assessment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_report_definition_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_report_definition_compartment_details) - def delete_target_database(self, target_database_id, **kwargs): + def change_retention(self, audit_profile_id, change_retention_details, **kwargs): """ - Deregisters the specified database from Data Safe and removes the target database from the Data Safe Console. + Change the online and offline months . - :param str target_database_id: (required) - The OCID of the Data Safe target database. + :param str audit_profile_id: (required) + The OCID of the audit. + + :param oci.data_safe.models.ChangeRetentionDetails change_retention_details: (required) + Details for the audit retention months to be modified. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1762,6 +1880,12 @@ def delete_target_database(self, target_database_id, **kwargs): :param str opc_request_id: (optional) Unique identifier for the request. + :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. @@ -1778,25 +1902,26 @@ def delete_target_database(self, target_database_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_target_database API. + Click `here `__ to see an example of how to use change_retention API. """ - resource_path = "/targetDatabases/{targetDatabaseId}" - method = "DELETE" + resource_path = "/auditProfiles/{auditProfileId}/actions/changeRetention" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_request_id" + "opc_request_id", + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + "change_retention got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "targetDatabaseId": target_database_id + "auditProfileId": audit_profile_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1809,7 +1934,8 @@ def delete_target_database(self, target_database_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-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} @@ -1820,6 +1946,7 @@ def delete_target_database(self, target_database_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1827,24 +1954,33 @@ def delete_target_database(self, target_database_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_retention_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_retention_details) - def delete_user_assessment(self, user_assessment_id, **kwargs): + def change_security_assessment_compartment(self, security_assessment_id, change_security_assessment_compartment_details, **kwargs): """ - Deletes the specified saved user assessment or schedule. To delete a user assessment schedule, first call the operation - ListUserAssessments with filters \"type = save_schedule\". - That call returns the scheduleAssessmentId. Then call DeleteUserAssessment with the scheduleAssessmentId. - If the assessment being deleted is the baseline for that compartment, then it will impact all baselines in the compartment. + Moves the specified saved security assessment or future scheduled assessments into a different compartment. + To start, call first the operation ListSecurityAssessments with filters \"type = save_schedule\". This returns the scheduleAssessmentId. Then, call this changeCompartment with the scheduleAssessmentId. - :param str user_assessment_id: (required) - The OCID of the user assessment. + The existing saved security assessments created due to the schedule are not moved. However, all new saves will be associated with the new compartment. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param oci.data_safe.models.ChangeSecurityAssessmentCompartmentDetails change_security_assessment_compartment_details: (required) + The details used to change the compartment of a security assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1853,8 +1989,11 @@ def delete_user_assessment(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. + :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. @@ -1872,25 +2011,26 @@ def delete_user_assessment(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use delete_user_assessment API. + Click `here `__ to see an example of how to use change_security_assessment_compartment API. """ - resource_path = "/userAssessments/{userAssessmentId}" - method = "DELETE" + resource_path = "/securityAssessments/{securityAssessmentId}/actions/changeCompartment" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "opc_request_id", "if_match", - "opc_request_id" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "delete_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "change_security_assessment_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "securityAssessmentId": security_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -1902,8 +2042,9 @@ def delete_user_assessment(self, user_assessment_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -1914,6 +2055,7 @@ def delete_user_assessment(self, user_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -1921,27 +2063,26 @@ def delete_user_assessment(self, user_assessment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_security_assessment_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=change_security_assessment_compartment_details) - def download_privilege_script(self, **kwargs): + def change_sensitive_data_model_compartment(self, sensitive_data_model_id, change_sensitive_data_model_compartment_details, **kwargs): """ - Downloads the privilege script to grant/revoke required roles from the Data Safe account on the target database. + Moves the specified sensitive data model and its dependent resources into a different compartment. - :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 sensitive_data_model_id: (required) + The OCID of the sensitive data model. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.ChangeSensitiveDataModelCompartmentDetails change_sensitive_data_model_compartment_details: (required) + Details to change the compartment of a sensitive data model. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -1950,6 +2091,15 @@ def download_privilege_script(self, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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. @@ -1962,34 +2112,44 @@ def download_privilege_script(self, **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 stream + :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 download_privilege_script API. + Click `here `__ to see an example of how to use change_sensitive_data_model_compartment API. """ - resource_path = "/actions/downloadPrivilegeScript" + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", + "if_match", "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( - "download_privilege_script got unknown kwargs: {!r}".format(extra_kwargs)) + "change_sensitive_data_model_compartment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", - "opc-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing), - "if-match": kwargs.get("if_match", missing) + "opc-retry-token": kwargs.get("opc_retry_token", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2007,26 +2167,27 @@ def download_privilege_script(self, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - response_type="stream") + body=change_sensitive_data_model_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, + path_params=path_params, header_params=header_params, - response_type="stream") + body=change_sensitive_data_model_compartment_details) - def download_security_assessment_report(self, security_assessment_id, download_security_assessment_report_details, **kwargs): + def change_sensitive_type_compartment(self, sensitive_type_id, change_sensitive_type_compartment_details, **kwargs): """ - Downloads the report of the specified security assessment. To download the security assessment report, it needs to be generated first. - Please use GenerateSecurityAssessmentReport to generate a downloadable report in the preferred format (PDF, XLS). + Moves the specified sensitive type into a different compartment. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str sensitive_type_id: (required) + The OCID of the sensitive type. - :param oci.data_safe.models.DownloadSecurityAssessmentReportDetails download_security_assessment_report_details: (required) - Details of the report. + :param oci.data_safe.models.ChangeSensitiveTypeCompartmentDetails change_sensitive_type_compartment_details: (required) + Details to change the compartment of a sensitive type. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2035,15 +2196,15 @@ def download_security_assessment_report(self, security_assessment_id, download_s The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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) - Unique identifier for the request. - :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. @@ -2056,13 +2217,13 @@ def download_security_assessment_report(self, security_assessment_id, download_s 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 stream + :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 download_security_assessment_report API. + Click `here `__ to see an example of how to use change_sensitive_type_compartment API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/downloadReport" + resource_path = "/sensitiveTypes/{sensitiveTypeId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs @@ -2070,16 +2231,16 @@ def download_security_assessment_report(self, security_assessment_id, download_s "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", - "opc_request_id" + "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( - "download_security_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + "change_sensitive_type_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "sensitiveTypeId": sensitive_type_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2092,8 +2253,8 @@ def download_security_assessment_report(self, security_assessment_id, download_s "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -2113,28 +2274,28 @@ def download_security_assessment_report(self, security_assessment_id, download_s method=method, path_params=path_params, header_params=header_params, - body=download_security_assessment_report_details, - response_type="stream") + body=change_sensitive_type_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=download_security_assessment_report_details, - response_type="stream") + body=change_sensitive_type_compartment_details) - def download_user_assessment_report(self, user_assessment_id, download_user_assessment_report_details, **kwargs): + def change_target_alert_policy_association_compartment(self, target_alert_policy_association_id, change_target_alert_policy_association_compartment_details, **kwargs): """ - Downloads the report of the specified user assessment. To download the user assessment report, it needs to be generated first. - Please use GenerateUserAssessmentReport to generate a downloadable report in the preferred format (PDF, XLS). + Moves the specified target-alert policy Association into a different compartment. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str target_alert_policy_association_id: (required) + The OCID of the target-alert policy association. - :param oci.data_safe.models.DownloadUserAssessmentReportDetails download_user_assessment_report_details: (required) - Details of the report. + :param oci.data_safe.models.ChangeTargetAlertPolicyAssociationCompartmentDetails change_target_alert_policy_association_compartment_details: (required) + The details used to change the compartment of a target-alert policy association. + + :param str opc_request_id: (optional) + Unique identifier for the request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2149,9 +2310,6 @@ def download_user_assessment_report(self, user_assessment_id, download_user_asse 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) - Unique identifier for the request. - :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. @@ -2164,30 +2322,30 @@ def download_user_assessment_report(self, user_assessment_id, download_user_asse 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 stream + :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 download_user_assessment_report API. + Click `here `__ to see an example of how to use change_target_alert_policy_association_compartment API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/downloadReport" + resource_path = "/targetAlertPolicyAssociations/{targetAlertPolicyAssociationId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "opc_request_id", "if_match", - "opc_retry_token", - "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( - "download_user_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + "change_target_alert_policy_association_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "targetAlertPolicyAssociationId": target_alert_policy_association_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2199,9 +2357,9 @@ def download_user_assessment_report(self, user_assessment_id, download_user_asse header_params = { "accept": "application/json", "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -2221,27 +2379,25 @@ def download_user_assessment_report(self, user_assessment_id, download_user_asse method=method, path_params=path_params, header_params=header_params, - body=download_user_assessment_report_details, - response_type="stream") + body=change_target_alert_policy_association_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=download_user_assessment_report_details, - response_type="stream") + body=change_target_alert_policy_association_compartment_details) - def enable_data_safe_configuration(self, enable_data_safe_configuration_details, **kwargs): + def change_target_database_compartment(self, target_database_id, change_target_database_compartment_details, **kwargs): """ - Enables Data Safe in the tenancy and region. + Moves the Data Safe target database to the specified compartment. - :param oci.data_safe.models.EnableDataSafeConfigurationDetails enable_data_safe_configuration_details: (required) - The details used to enable Data Safe. + :param str target_database_id: (required) + The OCID of the Data Safe target database. - :param str compartment_id: (optional) - A filter to return only resources that match the specified compartment OCID. + :param oci.data_safe.models.ChangeTargetDatabaseCompartmentDetails change_target_database_compartment_details: (required) + Details of the move compartment request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -2253,6 +2409,12 @@ def enable_data_safe_configuration(self, enable_data_safe_configuration_details, :param str opc_request_id: (optional) Unique identifier for the request. + :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. @@ -2269,34 +2431,40 @@ def enable_data_safe_configuration(self, enable_data_safe_configuration_details, :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use enable_data_safe_configuration API. + Click `here `__ to see an example of how to use change_target_database_compartment API. """ - resource_path = "/configuration" - method = "PUT" + resource_path = "/targetDatabases/{targetDatabaseId}/actions/changeCompartment" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "compartment_id", "if_match", - "opc_request_id" + "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( - "enable_data_safe_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + "change_target_database_compartment got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "compartmentId": kwargs.get("compartment_id", missing) + path_params = { + "targetDatabaseId": target_database_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -2307,33 +2475,45 @@ def enable_data_safe_configuration(self, enable_data_safe_configuration_details, if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=enable_data_safe_configuration_details) + body=change_target_database_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - body=enable_data_safe_configuration_details) + body=change_target_database_compartment_details) - def generate_on_prem_connector_configuration(self, generate_on_prem_connector_configuration_details, on_prem_connector_id, **kwargs): + def change_user_assessment_compartment(self, user_assessment_id, change_user_assessment_compartment_details, **kwargs): """ - Creates and downloads the configuration of the specified on-premises connector. + Moves the specified saved user assessment or future scheduled assessments into a different compartment. + To start storing scheduled user assessments on a different compartment, first call the operation ListUserAssessments with + the filters \"type = save_schedule\". That call returns the scheduleAssessmentId. Then call + ChangeUserAssessmentCompartment with the scheduleAssessmentId. The existing saved user assessments created per the schedule + are not be moved. However, all new saves will be associated with the new compartment. - :param oci.data_safe.models.GenerateOnPremConnectorConfigurationDetails generate_on_prem_connector_configuration_details: (required) - The details used to create and download on-premises connector's configuration. + :param str user_assessment_id: (required) + The OCID of the user assessment. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param oci.data_safe.models.ChangeUserAssessmentCompartmentDetails change_user_assessment_compartment_details: (required) + The details used to change the compartment of a user assessment. + + :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 @@ -2344,13 +2524,6 @@ def generate_on_prem_connector_configuration(self, generate_on_prem_connector_co :param str opc_request_id: (optional) Unique identifier for the request. - :param str if_match: (optional) - For optimistic concurrency control. In the PUT or DELETE call - for a resource, set the if-match parameter to the value of the - etag from a previous GET or POST response for that resource. - The resource will be updated or deleted only if the etag you - provide matches the resource's current etag value. - :param 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. @@ -2363,30 +2536,30 @@ def generate_on_prem_connector_configuration(self, generate_on_prem_connector_co 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 stream + :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 generate_on_prem_connector_configuration API. + Click `here `__ to see an example of how to use change_user_assessment_compartment API. """ - resource_path = "/onPremConnectors/{onPremConnectorId}/actions/generateConfiguration" + resource_path = "/userAssessments/{userAssessmentId}/actions/changeCompartment" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", + "if_match", "opc_retry_token", - "opc_request_id", - "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( - "generate_on_prem_connector_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + "change_user_assessment_compartment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "onPremConnectorId": on_prem_connector_id + "userAssessmentId": user_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -2396,11 +2569,11 @@ def generate_on_prem_connector_configuration(self, generate_on_prem_connector_co raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { - "accept": "application/octet-stream", + "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing), - "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} @@ -2420,35 +2593,26 @@ def generate_on_prem_connector_configuration(self, generate_on_prem_connector_co method=method, path_params=path_params, header_params=header_params, - body=generate_on_prem_connector_configuration_details, - response_type="stream") + body=change_user_assessment_compartment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=generate_on_prem_connector_configuration_details, - response_type="stream") + body=change_user_assessment_compartment_details) - def generate_security_assessment_report(self, security_assessment_id, generate_security_assessment_report_details, **kwargs): + def compare_security_assessment(self, security_assessment_id, compare_security_assessment_details, **kwargs): """ - Generates the report of the specified security assessment. You can get the report in PDF or XLS format. - After generating the report, use DownloadSecurityAssessmentReport to download it in the preferred format. + Compares two security assessments. For this comparison, a security assessment can be a saved assessment, a latest assessment, or a baseline assessment. + For example, you can compare saved assessment or a latest assessment against a baseline. :param str security_assessment_id: (required) The OCID of the security assessment. - :param oci.data_safe.models.GenerateSecurityAssessmentReportDetails generate_security_assessment_report_details: (required) - Details of the report. - - :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 oci.data_safe.models.CompareSecurityAssessmentDetails compare_security_assessment_details: (required) + Details of the security assessment comparison. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -2459,6 +2623,13 @@ def generate_security_assessment_report(self, security_assessment_id, generate_s :param str opc_request_id: (optional) Unique identifier for the request. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param 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. @@ -2475,23 +2646,23 @@ def generate_security_assessment_report(self, security_assessment_id, generate_s :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use generate_security_assessment_report API. + Click `here `__ to see an example of how to use compare_security_assessment API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/generateReport" + resource_path = "/securityAssessments/{securityAssessmentId}/actions/compare" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", "opc_retry_token", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "generate_security_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + "compare_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "securityAssessmentId": security_assessment_id @@ -2506,9 +2677,9 @@ def generate_security_assessment_report(self, security_assessment_id, generate_s header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2528,33 +2699,26 @@ def generate_security_assessment_report(self, security_assessment_id, generate_s method=method, path_params=path_params, header_params=header_params, - body=generate_security_assessment_report_details) + body=compare_security_assessment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=generate_security_assessment_report_details) + body=compare_security_assessment_details) - def generate_user_assessment_report(self, user_assessment_id, generate_user_assessment_report_details, **kwargs): + def compare_user_assessment(self, user_assessment_id, compare_user_assessment_details, **kwargs): """ - Generates the report of the specified user assessment. The report is available in PDF or XLS format. - After generating the report, use DownloadUserAssessmentReport to download it in the preferred format. + Compares two user assessments. For this comparison, a user assessment can be a saved, a latest assessment, or a baseline. + As an example, it can be used to compare a user assessment saved or a latest assessment with a baseline. :param str user_assessment_id: (required) The OCID of the user assessment. - :param oci.data_safe.models.GenerateUserAssessmentReportDetails generate_user_assessment_report_details: (required) - Details of the report. - - :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 oci.data_safe.models.CompareUserAssessmentDetails compare_user_assessment_details: (required) + Details of the user assessment comparison. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -2565,6 +2729,13 @@ def generate_user_assessment_report(self, user_assessment_id, generate_user_asse :param str opc_request_id: (optional) Unique identifier for the request. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + :param 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. @@ -2581,23 +2752,23 @@ def generate_user_assessment_report(self, user_assessment_id, generate_user_asse :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use generate_user_assessment_report API. + Click `here `__ to see an example of how to use compare_user_assessment API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/generateReport" + resource_path = "/userAssessments/{userAssessmentId}/actions/compare" method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", "opc_retry_token", - "opc_request_id" + "opc_request_id", + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "generate_user_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + "compare_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { "userAssessmentId": user_assessment_id @@ -2612,9 +2783,9 @@ def generate_user_assessment_report(self, user_assessment_id, generate_user_asse header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2634,22 +2805,30 @@ def generate_user_assessment_report(self, user_assessment_id, generate_user_asse method=method, path_params=path_params, header_params=header_params, - body=generate_user_assessment_report_details) + body=compare_user_assessment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=generate_user_assessment_report_details) + body=compare_user_assessment_details) - def get_data_safe_configuration(self, **kwargs): + def create_audit_archive_retrieval(self, create_audit_archive_retrieval_details, **kwargs): """ - Gets the details of the Data Safe configuration. + Creates a work request to retrieve archived audit data. This asynchronous process will usually take over an hour to complete. + Save the id from the response of this operation. Call GetAuditArchiveRetrieval operation after an hour, passing the id to know the status of + this operation. - :param str compartment_id: (optional) - A filter to return only resources that match the specified compartment OCID. + :param oci.data_safe.models.CreateAuditArchiveRetrievalDetails create_audit_archive_retrieval_details: (required) + Details for creating retrieving archived audit data. + + :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) Unique identifier for the request. @@ -2666,35 +2845,31 @@ def get_data_safe_configuration(self, **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.data_safe.models.DataSafeConfiguration` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.AuditArchiveRetrieval` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_data_safe_configuration API. + Click `here `__ to see an example of how to use create_audit_archive_retrieval API. """ - resource_path = "/configuration" - method = "GET" + resource_path = "/auditArchiveRetrievals" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "compartment_id", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "get_data_safe_configuration got unknown kwargs: {!r}".format(extra_kwargs)) - - query_params = { - "compartmentId": kwargs.get("compartment_id", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + "create_audit_archive_retrieval got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2706,30 +2881,37 @@ def get_data_safe_configuration(self, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, header_params=header_params, - response_type="DataSafeConfiguration") + body=create_audit_archive_retrieval_details, + response_type="AuditArchiveRetrieval") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, header_params=header_params, - response_type="DataSafeConfiguration") + body=create_audit_archive_retrieval_details, + response_type="AuditArchiveRetrieval") - def get_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs): + def create_data_safe_private_endpoint(self, create_data_safe_private_endpoint_details, **kwargs): """ - Gets the details of the specified Data Safe private endpoint. + Creates a new Data Safe private endpoint. - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + :param oci.data_safe.models.CreateDataSafePrivateEndpointDetails create_data_safe_private_endpoint_details: (required) + Details to create a new private endpoint. + + :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) Unique identifier for the request. @@ -2750,35 +2932,27 @@ def get_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use create_data_safe_private_endpoint API. """ - resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" - method = "GET" + resource_path = "/dataSafePrivateEndpoints" + method = "POST" # 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( - "get_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "dataSafePrivateEndpointId": data_safe_private_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2790,30 +2964,41 @@ def get_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_data_safe_private_endpoint_details, response_type="DataSafePrivateEndpoint") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, + body=create_data_safe_private_endpoint_details, response_type="DataSafePrivateEndpoint") - def get_on_prem_connector(self, on_prem_connector_id, **kwargs): + def create_discovery_job(self, create_discovery_job_details, **kwargs): """ - Gets the details of the specified on-premises connector. + Performs incremental data discovery for the specified sensitive data model. It uses the target database associated + with the sensitive data model. + After performing data discovery, you can use ListDiscoveryJobResults to view the discovery results, PatchDiscoveryJobResults + to specify the action you want perform on these results, and then ApplyDiscoveryJobResults to process the results + and apply them to the sensitive data model. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param oci.data_safe.models.CreateDiscoveryJobDetails create_discovery_job_details: (required) + The details used to run an incremental data discovery 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) Unique identifier for the request. @@ -2830,39 +3015,31 @@ def get_on_prem_connector(self, on_prem_connector_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.data_safe.models.OnPremConnector` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.DiscoveryJob` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_on_prem_connector API. + Click `here `__ to see an example of how to use create_discovery_job API. """ - resource_path = "/onPremConnectors/{onPremConnectorId}" - method = "GET" + resource_path = "/discoveryJobs" + method = "POST" # 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( - "get_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "onPremConnectorId": on_prem_connector_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_discovery_job got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2874,30 +3051,41 @@ def get_on_prem_connector(self, on_prem_connector_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="OnPremConnector") + body=create_discovery_job_details, + response_type="DiscoveryJob") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="OnPremConnector") + body=create_discovery_job_details, + response_type="DiscoveryJob") - def get_security_assessment(self, security_assessment_id, **kwargs): + def create_library_masking_format(self, create_library_masking_format_details, **kwargs): """ - Gets the details of the specified security assessment. + Creates a new library masking format. A masking format can have one or more + format entries. The combined output of all the format entries is used for masking. + It provides the flexibility to define a masking format that can generate different + parts of a data value separately and then combine them to get the final data value + for masking. Note that you cannot define masking condition in a library masking format. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param oci.data_safe.models.CreateLibraryMaskingFormatDetails create_library_masking_format_details: (required) + Details to create a new library masking format. + + :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) Unique identifier for the request. @@ -2914,39 +3102,31 @@ def get_security_assessment(self, security_assessment_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.data_safe.models.SecurityAssessment` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.LibraryMaskingFormat` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_security_assessment API. + Click `here `__ to see an example of how to use create_library_masking_format API. """ - resource_path = "/securityAssessments/{securityAssessmentId}" - method = "GET" + resource_path = "/libraryMaskingFormats" + method = "POST" # 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( - "get_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "securityAssessmentId": security_assessment_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_library_masking_format got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -2958,33 +3138,59 @@ def get_security_assessment(self, security_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="SecurityAssessment") + body=create_library_masking_format_details, + response_type="LibraryMaskingFormat") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="SecurityAssessment") + body=create_library_masking_format_details, + response_type="LibraryMaskingFormat") - def get_security_assessment_comparison(self, security_assessment_id, comparison_security_assessment_id, **kwargs): + def create_masking_column(self, create_masking_column_details, masking_policy_id, **kwargs): """ - Gets the details of the comparison report on the security assessments submitted for comparison. - - - :param str security_assessment_id: (required) - The OCID of the security assessment. + Creates a new masking column in the specified masking policy. Use this operation + to add parent columns only. It automatically adds the child columns from the + associated sensitive data model or target database. If you provide the + sensitiveTypeId attribute but not the maskingFormats attribute, it automatically + assigns the default masking format associated with the specified sensitive type. + Alternatively, if you provide the maskingFormats attribute, the specified masking + formats are assigned to the column. + + Using the maskingFormats attribute, you can assign one or more masking formats + to a column. You need to specify a condition as part of each masking format. It + enables you to do conditional masking + so that you can mask the column data values differently using different + masking conditions. A masking format can have one or more format entries. The + combined output of all the format entries is used for masking. It provides the + flexibility to define a masking format that can generate different parts of a data + value separately and then combine them to get the final data value for masking. + + You can use the maskingColumnGroup attribute to group the columns that you would + like to mask together. It enables you to do group or compound masking that ensures that the + masked data across the columns in a group continue to retain the same logical relationship. + + + :param oci.data_safe.models.CreateMaskingColumnDetails create_masking_column_details: (required) + Details to create a new masking column. + + :param str masking_policy_id: (required) + The OCID of the masking policy. - :param str comparison_security_assessment_id: (required) - The OCID of the baseline security assessment. + :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) Unique identifier for the request. @@ -3001,29 +3207,29 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_ 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.data_safe.models.SecurityAssessmentComparison` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_security_assessment_comparison API. + Click `here `__ to see an example of how to use create_masking_column API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/comparison/{comparisonSecurityAssessmentId}" - method = "GET" + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns" + method = "POST" # 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( - "get_security_assessment_comparison got unknown kwargs: {!r}".format(extra_kwargs)) + "create_masking_column got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id, - "comparisonSecurityAssessmentId": comparison_security_assessment_id + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -3035,6 +3241,7 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_ 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} @@ -3046,6 +3253,7 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_ 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( @@ -3054,22 +3262,44 @@ def get_security_assessment_comparison(self, security_assessment_id, comparison_ method=method, path_params=path_params, header_params=header_params, - response_type="SecurityAssessmentComparison") + body=create_masking_column_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - response_type="SecurityAssessmentComparison") + body=create_masking_column_details) - def get_target_database(self, target_database_id, **kwargs): + def create_masking_policy(self, create_masking_policy_details, **kwargs): """ - Returns the details of the specified Data Safe target database. + Creates a new masking policy and associates it with a sensitive data model or a reference target database. + To use a sensitive data model as the source of masking columns, set the columnSource attribute to + SENSITIVE_DATA_MODEL and provide the sensitiveDataModelId attribute. After creating a masking policy, + you can use the AddMaskingColumnsFromSdm operation to automatically add all the columns from + the associated sensitive data model. In this case, the target database associated with the + sensitive data model is used for column and masking format validations. - :param str target_database_id: (required) - The OCID of the Data Safe target database. + You can also create a masking policy without using a sensitive data model. In this case, + you need to associate your masking policy with a target database by setting the columnSource + attribute to TARGET and providing the targetId attribute. The specified target database + is used for column and masking format validations. + + After creating a masking policy, you can use the CreateMaskingColumn or PatchMaskingColumns + operation to manually add columns to the policy. You need to add the parent columns only, + and it automatically adds the child columns (in referential relationship with the parent columns) + from the associated sensitive data model or target database. + + + :param oci.data_safe.models.CreateMaskingPolicyDetails create_masking_policy_details: (required) + Details to create a new masking policy. + + :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) Unique identifier for the request. @@ -3086,39 +3316,31 @@ def get_target_database(self, target_database_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.data_safe.models.TargetDatabase` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.MaskingPolicy` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_target_database API. + Click `here `__ to see an example of how to use create_masking_policy API. """ - resource_path = "/targetDatabases/{targetDatabaseId}" - method = "GET" + resource_path = "/maskingPolicies" + method = "POST" # 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( - "get_target_database got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "targetDatabaseId": target_database_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_masking_policy got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -3130,30 +3352,37 @@ def get_target_database(self, target_database_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="TargetDatabase") + body=create_masking_policy_details, + response_type="MaskingPolicy") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="TargetDatabase") + body=create_masking_policy_details, + response_type="MaskingPolicy") - def get_user_assessment(self, user_assessment_id, **kwargs): + def create_on_prem_connector(self, create_on_prem_connector_details, **kwargs): """ - Gets a user assessment by identifier. + Creates a new on-premises connector. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param oci.data_safe.models.CreateOnPremConnectorDetails create_on_prem_connector_details: (required) + The details used to create a new on-premises connector. + + :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) Unique identifier for the request. @@ -3170,39 +3399,31 @@ def get_user_assessment(self, user_assessment_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.data_safe.models.UserAssessment` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.OnPremConnector` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_user_assessment API. + Click `here `__ to see an example of how to use create_on_prem_connector API. """ - resource_path = "/userAssessments/{userAssessmentId}" - method = "GET" + resource_path = "/onPremConnectors" + method = "POST" # 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( - "get_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "userAssessmentId": user_assessment_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -3214,33 +3435,37 @@ def get_user_assessment(self, user_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="UserAssessment") + body=create_on_prem_connector_details, + response_type="OnPremConnector") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="UserAssessment") + body=create_on_prem_connector_details, + response_type="OnPremConnector") - def get_user_assessment_comparison(self, user_assessment_id, comparison_user_assessment_id, **kwargs): + def create_report_definition(self, create_report_definition_details, **kwargs): """ - Gets the details of the comparison report for the user assessments provided. + Creates a new report definition with parameters specified in the body. The report definition is stored in the specified compartment. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param oci.data_safe.models.CreateReportDefinitionDetails create_report_definition_details: (required) + Details for the new report definition. - :param str comparison_user_assessment_id: (required) - The OCID of the baseline user assessment. + :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) Unique identifier for the request. @@ -3257,40 +3482,31 @@ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_ass 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.data_safe.models.UserAssessmentComparison` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.ReportDefinition` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_user_assessment_comparison API. + Click `here `__ to see an example of how to use create_report_definition API. """ - resource_path = "/userAssessments/{userAssessmentId}/comparison/{comparisonUserAssessmentId}" - method = "GET" + resource_path = "/reportDefinitions" + method = "POST" # 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( - "get_user_assessment_comparison got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "userAssessmentId": user_assessment_id, - "comparisonUserAssessmentId": comparison_user_assessment_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_report_definition got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -3302,30 +3518,41 @@ def get_user_assessment_comparison(self, user_assessment_id, comparison_user_ass if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="UserAssessmentComparison") + body=create_report_definition_details, + response_type="ReportDefinition") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="UserAssessmentComparison") + body=create_report_definition_details, + response_type="ReportDefinition") - def get_work_request(self, work_request_id, **kwargs): + def create_security_assessment(self, create_security_assessment_details, **kwargs): """ - Gets the details of the specified work request. + Creates a new saved security assessment for one or multiple targets in a compartment. When this operation is performed, + it will save the latest assessments in the specified compartment. If a schedule is passed, it will persist the latest assessments, + at the defined date and time, in the format defined by `RFC3339`__. + __ https://tools.ietf.org/html/rfc3339 - :param str work_request_id: (required) - The OCID of the work request. + + :param oci.data_safe.models.CreateSecurityAssessmentDetails create_security_assessment_details: (required) + The details used to create a new saved security assessment. + + :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) Unique identifier for the request. @@ -3342,39 +3569,31 @@ def get_work_request(self, work_request_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.data_safe.models.WorkRequest` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SecurityAssessment` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use get_work_request API. + Click `here `__ to see an example of how to use create_security_assessment API. """ - resource_path = "/workRequests/{workRequestId}" - method = "GET" - + resource_path = "/securityAssessments" + method = "POST" + # 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( - "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "workRequestId": work_request_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + "create_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -3386,79 +3605,44 @@ def get_work_request(self, work_request_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="WorkRequest") + body=create_security_assessment_details, + response_type="SecurityAssessment") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, header_params=header_params, - response_type="WorkRequest") + body=create_security_assessment_details, + response_type="SecurityAssessment") - def list_data_safe_private_endpoints(self, compartment_id, **kwargs): + def create_sensitive_column(self, sensitive_data_model_id, create_sensitive_column_details, **kwargs): """ - Gets a list of Data Safe private endpoints. - - - :param str compartment_id: (required) - A filter to return only resources that match the specified compartment OCID. + Creates a new sensitive column in the specified sensitive data model. - :param str display_name: (optional) - A filter to return only resources that match the specified display name. - - :param str vcn_id: (optional) - A filter to return only resources that match the specified VCN OCID. - - :param str lifecycle_state: (optional) - A filter to return only resources that match the specified lifecycle state. - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA" - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). - - Allowed values are: "ASC", "DESC" + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. - :param str sort_by: (optional) - The field used for sorting. Only one sorting order (sortOrder) can be specified. - The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. - The DISPLAYNAME sort order is case sensitive. + :param oci.data_safe.models.CreateSensitiveColumnDetails create_sensitive_column_details: (required) + Details to create a new sensitive column. - Allowed values are: "TIMECREATED", "DISPLAYNAME" + :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) Unique identifier for the request. - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. - - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - - Allowed values are: "RESTRICTED", "ACCESSIBLE" - :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. @@ -3471,80 +3655,41 @@ def list_data_safe_private_endpoints(self, compartment_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 list of :class:`~oci.data_safe.models.DataSafePrivateEndpointSummary` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_data_safe_private_endpoints API. + Click `here `__ to see an example of how to use create_sensitive_column API. """ - resource_path = "/dataSafePrivateEndpoints" - method = "GET" + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "display_name", - "vcn_id", - "lifecycle_state", - "limit", - "page", - "sort_order", - "sort_by", - "opc_request_id", - "compartment_id_in_subtree", - "access_level" + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_data_safe_private_endpoints got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA"] - if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) + "create_sensitive_column got unknown kwargs: {!r}".format(extra_kwargs)) - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) - - if 'sort_by' in kwargs: - sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "compartmentId": compartment_id, - "displayName": kwargs.get("display_name", missing), - "vcnId": kwargs.get("vcn_id", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "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} @@ -3556,64 +3701,43 @@ def list_data_safe_private_endpoints(self, compartment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[DataSafePrivateEndpointSummary]") + body=create_sensitive_column_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[DataSafePrivateEndpointSummary]") + body=create_sensitive_column_details) - def list_findings(self, security_assessment_id, **kwargs): + def create_sensitive_data_model(self, create_sensitive_data_model_details, **kwargs): """ - List all the findings from all the targets in the specified assessment. + Creates a new sensitive data model. If schemas and sensitive types are provided, it automatically runs data discovery + and adds the discovered columns to the sensitive data model. Otherwise, it creates an empty sensitive data model + that can be updated later. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param oci.data_safe.models.CreateSensitiveDataModelDetails create_sensitive_data_model_details: (required) + Details to create a new sensitive data model. + + :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) Unique identifier for the request. - :param str severity: (optional) - A filter to return only findings of a particular risk level. - - Allowed values are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS" - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. - - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - - Allowed values are: "RESTRICTED", "ACCESSIBLE" - - :param str finding_key: (optional) - Each finding has a key. This key is same for the finding across targets - :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. @@ -3626,69 +3750,31 @@ def list_findings(self, security_assessment_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 list of :class:`~oci.data_safe.models.FindingSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveDataModel` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_findings API. + Click `here `__ to see an example of how to use create_sensitive_data_model API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/findings" - method = "GET" + resource_path = "/sensitiveDataModels" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "severity", - "limit", - "page", - "compartment_id_in_subtree", - "access_level", - "finding_key" + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_findings got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "securityAssessmentId": security_assessment_id - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - - if 'severity' in kwargs: - severity_allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"] - if kwargs['severity'] not in severity_allowed_values: - raise ValueError( - "Invalid value for `severity`, must be one of {0}".format(severity_allowed_values) - ) - - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - query_params = { - "severity": kwargs.get("severity", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing), - "findingKey": kwargs.get("finding_key", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + "create_sensitive_data_model got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -3700,79 +3786,39 @@ def list_findings(self, security_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[FindingSummary]") + body=create_sensitive_data_model_details, + response_type="SensitiveDataModel") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[FindingSummary]") + body=create_sensitive_data_model_details, + response_type="SensitiveDataModel") - def list_grants(self, user_assessment_id, user_key, **kwargs): + def create_sensitive_type(self, create_sensitive_type_details, **kwargs): """ - Gets a list of grants for a particular user in the specified user assessment. A user grant contains details such as the - privilege name, type, category, and depth level. The depth level indicates how deep in the hierarchy of roles granted to - roles a privilege grant is. The userKey in this operation is a system-generated identifier. Perform the operation ListUsers - to get the userKey for a particular user. + Creates a new sensitive type, which can be a basic sensitive type with regular expressions or a sensitive category. + While sensitive types are used for data discovery, sensitive categories are used for logically grouping the related + or similar sensitive types. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param oci.data_safe.models.CreateSensitiveTypeDetails create_sensitive_type_details: (required) + Details to create a new sensitive type. - :param str user_key: (required) - The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user. - - :param str grant_key: (optional) - A filter to return only items that match the specified user grant key. - - :param str grant_name: (optional) - A filter to return only items that match the specified user grant name. - - :param str privilege_type: (optional) - A filter to return only items that match the specified privilege grant type. - - :param str privilege_category: (optional) - A filter to return only items that match the specified user privilege category. - - :param int depth_level: (optional) - A filter to return only items that match the specified user grant depth level. - - :param int depth_level_greater_than_or_equal_to: (optional) - A filter to return only items that are at a level greater than or equal to the specified user grant depth level. - - :param int depth_level_less_than: (optional) - A filter to return only items that are at a level less than the specified user grant depth level. - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). - - Allowed values are: "ASC", "DESC" - - :param str sort_by: (optional) - The field to sort by. You can specify only one sort order (sortOrder). The default order for grantName is ascending. - - Allowed values are: "grantName", "grantType", "privilegeCategory", "depthLevel", "key" + :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) Unique identifier for the request. @@ -3789,80 +3835,31 @@ def list_grants(self, user_assessment_id, user_key, **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 list of :class:`~oci.data_safe.models.GrantSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.SensitiveType` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_grants API. + Click `here `__ to see an example of how to use create_sensitive_type API. """ - resource_path = "/userAssessments/{userAssessmentId}/users/{userKey}/grants" - method = "GET" + resource_path = "/sensitiveTypes" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "grant_key", - "grant_name", - "privilege_type", - "privilege_category", - "depth_level", - "depth_level_greater_than_or_equal_to", - "depth_level_less_than", - "limit", - "page", - "sort_order", - "sort_by", + "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_grants got unknown kwargs: {!r}".format(extra_kwargs)) - - path_params = { - "userAssessmentId": user_assessment_id, - "userKey": user_key - } - - path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - - for (k, v) in six.iteritems(path_params): - if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): - raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) - - if 'sort_by' in kwargs: - sort_by_allowed_values = ["grantName", "grantType", "privilegeCategory", "depthLevel", "key"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) - - query_params = { - "grantKey": kwargs.get("grant_key", missing), - "grantName": kwargs.get("grant_name", missing), - "privilegeType": kwargs.get("privilege_type", missing), - "privilegeCategory": kwargs.get("privilege_category", missing), - "depthLevel": kwargs.get("depth_level", missing), - "depthLevelGreaterThanOrEqualTo": kwargs.get("depth_level_greater_than_or_equal_to", missing), - "depthLevelLessThan": kwargs.get("depth_level_less_than", 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} + "create_sensitive_type got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -3874,81 +3871,41 @@ def list_grants(self, user_assessment_id, user_key, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[GrantSummary]") + body=create_sensitive_type_details, + response_type="SensitiveType") else: return self.base_client.call_api( resource_path=resource_path, method=method, - path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[GrantSummary]") + body=create_sensitive_type_details, + response_type="SensitiveType") - def list_on_prem_connectors(self, compartment_id, **kwargs): + def create_target_alert_policy_association(self, create_target_alert_policy_association_details, **kwargs): """ - Gets a list of on-premises connectors. - - - :param str compartment_id: (required) - A filter to return only resources that match the specified compartment OCID. - - :param str on_prem_connector_id: (optional) - A filter to return only the on-premises connector that matches the specified id. - - :param str display_name: (optional) - A filter to return only resources that match the specified display name. - - :param str on_prem_connector_lifecycle_state: (optional) - A filter to return only on-premises connector resources that match the specified lifecycle state. - - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). + Creates a new target-alert policy association to track a alert policy applied on target. - Allowed values are: "ASC", "DESC" - :param str sort_by: (optional) - The field used for sorting. Only one sorting order (sortOrder) can be specified. - The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. - The DISPLAYNAME sort order is case sensitive. + :param oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails create_target_alert_policy_association_details: (required) + The details used to create a new target-alert policy association. - Allowed values are: "TIMECREATED", "DISPLAYNAME" + :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) Unique identifier for the request. - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. - - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - - Allowed values are: "RESTRICTED", "ACCESSIBLE" - :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. @@ -3961,80 +3918,31 @@ def list_on_prem_connectors(self, compartment_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 list of :class:`~oci.data_safe.models.OnPremConnectorSummary` + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.TargetAlertPolicyAssociation` :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_on_prem_connectors API. + Click `here `__ to see an example of how to use create_target_alert_policy_association API. """ - resource_path = "/onPremConnectors" - method = "GET" + resource_path = "/targetAlertPolicyAssociations" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "on_prem_connector_id", - "display_name", - "on_prem_connector_lifecycle_state", - "limit", - "page", - "sort_order", - "sort_by", - "opc_request_id", - "compartment_id_in_subtree", - "access_level" + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_on_prem_connectors got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'on_prem_connector_lifecycle_state' in kwargs: - on_prem_connector_lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] - if kwargs['on_prem_connector_lifecycle_state'] not in on_prem_connector_lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `on_prem_connector_lifecycle_state`, must be one of {0}".format(on_prem_connector_lifecycle_state_allowed_values) - ) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) - - if 'sort_by' in kwargs: - sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) - - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - query_params = { - "compartmentId": compartment_id, - "onPremConnectorId": kwargs.get("on_prem_connector_id", missing), - "displayName": kwargs.get("display_name", missing), - "onPremConnectorLifecycleState": kwargs.get("on_prem_connector_lifecycle_state", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing), - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + "create_target_alert_policy_association got unknown kwargs: {!r}".format(extra_kwargs)) header_params = { "accept": "application/json", "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -4046,126 +3954,16208 @@ def list_on_prem_connectors(self, compartment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, header_params=header_params, - response_type="list[OnPremConnectorSummary]") + body=create_target_alert_policy_association_details, + response_type="TargetAlertPolicyAssociation") else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, header_params=header_params, - response_type="list[OnPremConnectorSummary]") + body=create_target_alert_policy_association_details, + response_type="TargetAlertPolicyAssociation") - def list_security_assessments(self, compartment_id, **kwargs): + def create_target_database(self, create_target_database_details, **kwargs): """ - Gets a list of security assessments. + Registers the specified database with Data Safe and creates a Data Safe target database in the Data Safe Console. - The ListSecurityAssessments operation returns only the assessments in the specified `compartmentId`. - The list does not include any subcompartments of the compartmentId passed. - The parameter `accessLevel` specifies whether to return only those compartments for which the - requestor has INSPECT permissions on at least one resource directly - or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if - Principal doesn't have access to even one of the child compartments. This is valid only when - `compartmentIdInSubtree` is set to `true`. + :param oci.data_safe.models.CreateTargetDatabaseDetails create_target_database_details: (required) + Details of the target database. - The parameter `compartmentIdInSubtree` applies when you perform ListSecurityAssessments on the - `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. - To get a full list of all compartments and subcompartments in the tenancy (root compartment), - set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + :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) + Unique identifier for the request. - :param str compartment_id: (required) + :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.data_safe.models.TargetDatabase` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_target_database API. + """ + resource_path = "/targetDatabases" + method = "POST" + + # 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( + "create_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_target_database_details, + response_type="TargetDatabase") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_target_database_details, + response_type="TargetDatabase") + + def create_user_assessment(self, create_user_assessment_details, **kwargs): + """ + Creates a new saved user assessment for one or multiple targets in a compartment. It saves the latest assessments in the + specified compartment. If a scheduled is passed in, this operation persists the latest assessments that exist at the defined + date and time, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param oci.data_safe.models.CreateUserAssessmentDetails create_user_assessment_details: (required) + The details used to create a new saved user assessment. + + :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) + Unique identifier for the request. + + :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.data_safe.models.UserAssessment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use create_user_assessment API. + """ + resource_path = "/userAssessments" + method = "POST" + + # 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( + "create_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_user_assessment_details, + response_type="UserAssessment") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=create_user_assessment_details, + response_type="UserAssessment") + + def deactivate_target_database(self, target_database_id, **kwargs): + """ + Deactivates a target database in Data Safe. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :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 if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use deactivate_target_database API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}/actions/deactivate" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "if_match", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "deactivate_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): + """ + To unload retrieved archive data, call the operation ListAuditArchiveRetrieval first. + This will return the auditArchiveRetrievalId. Then call this operation with auditArchiveRetrievalId. + + + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_audit_archive_retrieval API. + """ + resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" + method = "DELETE" + + # 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( + "delete_audit_archive_retrieval got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditArchiveRetrievalId": audit_archive_retrieval_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_audit_trail(self, audit_trail_id, **kwargs): + """ + Deletes the specified audit trail. + + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_audit_trail API. + """ + resource_path = "/auditTrails/{auditTrailId}" + method = "DELETE" + + # 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( + "delete_audit_trail got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditTrailId": audit_trail_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs): + """ + Deletes the specified Data Safe private endpoint. + + + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_data_safe_private_endpoint API. + """ + resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + method = "DELETE" + + # 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( + "delete_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "dataSafePrivateEndpointId": data_safe_private_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_discovery_job(self, discovery_job_id, **kwargs): + """ + Deletes the specified discovery job. + + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_discovery_job API. + """ + resource_path = "/discoveryJobs/{discoveryJobId}" + method = "DELETE" + + # 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( + "delete_discovery_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_discovery_job_result(self, discovery_job_id, result_key, **kwargs): + """ + Deletes the specified discovery result. + + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param str result_key: (required) + The unique key that identifies the discovery result. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_discovery_job_result API. + """ + resource_path = "/discoveryJobs/{discoveryJobId}/results/{resultKey}" + method = "DELETE" + + # 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( + "delete_discovery_job_result got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_job_id, + "resultKey": result_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_library_masking_format(self, library_masking_format_id, **kwargs): + """ + Deletes the specified library masking format. + + + :param str library_masking_format_id: (required) + The OCID of the library masking format. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_library_masking_format API. + """ + resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}" + method = "DELETE" + + # 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( + "delete_library_masking_format got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "libraryMaskingFormatId": library_masking_format_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_masking_column(self, masking_column_key, masking_policy_id, **kwargs): + """ + Deletes the specified masking column. + + + :param str masking_column_key: (required) + The unique key that identifies the masking column. It's numeric and unique within a masking policy. + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_masking_column API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" + method = "DELETE" + + # 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( + "delete_masking_column got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingColumnKey": masking_column_key, + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_masking_policy(self, masking_policy_id, **kwargs): + """ + Deletes the specified masking policy. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_masking_policy API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}" + method = "DELETE" + + # 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( + "delete_masking_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_on_prem_connector(self, on_prem_connector_id, **kwargs): + """ + Deletes the specified on-premises connector. + + + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_on_prem_connector API. + """ + resource_path = "/onPremConnectors/{onPremConnectorId}" + method = "DELETE" + + # 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( + "delete_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "onPremConnectorId": on_prem_connector_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_report_definition(self, report_definition_id, **kwargs): + """ + Deletes the specified report definition. Only the user created report definition can be deleted. The seeded report definitions cannot be deleted. + + + :param str report_definition_id: (required) + Unique report definition identifier + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_report_definition API. + """ + resource_path = "/reportDefinitions/{reportDefinitionId}" + method = "DELETE" + + # 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( + "delete_report_definition got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "reportDefinitionId": report_definition_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_security_assessment(self, security_assessment_id, **kwargs): + """ + Deletes the specified saved security assessment or schedule. To delete a security assessment schedule, + first call the operation ListSecurityAssessments with filters \"type = save_schedule\". + That operation returns the scheduleAssessmentId. Then, call DeleteSecurityAssessment with the scheduleAssessmentId. + If the assessment being deleted is the baseline for that compartment, then it will impact all baselines in the compartment. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_security_assessment API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}" + method = "DELETE" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "delete_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **kwargs): + """ + Deletes the specified sensitive column. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param str sensitive_column_key: (required) + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_sensitive_column API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns/{sensitiveColumnKey}" + method = "DELETE" + + # 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( + "delete_sensitive_column got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id, + "sensitiveColumnKey": sensitive_column_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_sensitive_data_model(self, sensitive_data_model_id, **kwargs): + """ + Deletes the specified sensitive data model. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_sensitive_data_model API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}" + method = "DELETE" + + # 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( + "delete_sensitive_data_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_sensitive_type(self, sensitive_type_id, **kwargs): + """ + Deletes the specified sensitive type. + + + :param str sensitive_type_id: (required) + The OCID of the sensitive type. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_sensitive_type API. + """ + resource_path = "/sensitiveTypes/{sensitiveTypeId}" + method = "DELETE" + + # 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( + "delete_sensitive_type got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveTypeId": sensitive_type_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_target_alert_policy_association(self, target_alert_policy_association_id, **kwargs): + """ + Deletes the specified target-alert policy Association. + + + :param str target_alert_policy_association_id: (required) + The OCID of the target-alert policy association. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_target_alert_policy_association API. + """ + resource_path = "/targetAlertPolicyAssociations/{targetAlertPolicyAssociationId}" + method = "DELETE" + + # 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( + "delete_target_alert_policy_association got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetAlertPolicyAssociationId": target_alert_policy_association_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_target_database(self, target_database_id, **kwargs): + """ + Deregisters the specified database from Data Safe and removes the target database from the Data Safe Console. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_target_database API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}" + method = "DELETE" + + # 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( + "delete_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def delete_user_assessment(self, user_assessment_id, **kwargs): + """ + Deletes the specified saved user assessment or schedule. To delete a user assessment schedule, first call the operation + ListUserAssessments with filters \"type = save_schedule\". + That call returns the scheduleAssessmentId. Then call DeleteUserAssessment with the scheduleAssessmentId. + If the assessment being deleted is the baseline for that compartment, then it will impact all baselines in the compartment. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use delete_user_assessment API. + """ + resource_path = "/userAssessments/{userAssessmentId}" + method = "DELETE" + + # 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( + "delete_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def discover_audit_trails(self, audit_profile_id, **kwargs): + """ + Updates the list of audit trails created under audit profile.The + operation can be used to create new audit trails for target database + when they become available for audit collection because of change of database version + or change of database unified mode or change of data base edition or being deleted previously etc. + + + :param str audit_profile_id: (required) + The OCID of the audit. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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 discover_audit_trails API. + """ + resource_path = "/auditProfiles/{auditProfileId}/actions/discoverAuditTrails" + method = "POST" + + # 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( + "discover_audit_trails got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditProfileId": audit_profile_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def download_discovery_report(self, sensitive_data_model_id, download_discovery_report_details, **kwargs): + """ + Downloads an already-generated discovery report. Note that the GenerateDiscoveryReportForDownload operation is a + prerequisite for the DownloadDiscoveryReport operation. Use GenerateDiscoveryReportForDownload to generate a discovery + report file and then use DownloadDiscoveryReport to download the generated file. By default, it downloads report for + all the columns in a sensitive data model. Use the discoveryJobId attribute to download report for a specific discovery job. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.DownloadDiscoveryReportDetails download_discovery_report_details: (required) + Details to download a discovery report. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_discovery_report API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/actions/downloadReport" + method = "POST" + + # 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( + "download_discovery_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_discovery_report_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_discovery_report_details, + response_type="stream") + + def download_masking_log(self, masking_policy_id, download_masking_log_details, **kwargs): + """ + Downloads the masking log generated by the last masking operation on a target database using the specified masking policy. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.DownloadMaskingLogDetails download_masking_log_details: (required) + Details to download masking log. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_masking_log API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/downloadLog" + method = "POST" + + # 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( + "download_masking_log got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_masking_log_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_masking_log_details, + response_type="stream") + + def download_masking_policy(self, masking_policy_id, download_masking_policy_details, **kwargs): + """ + Downloads an already-generated file corresponding to the specified masking policy. + Note that the GenerateMaskingPolicyForDownload operation is a prerequisite for the + DownloadMaskingPolicy operation. Use GenerateMaskingPolicyForDownload to generate + a masking policy file and then use DownloadMaskingPolicy to download the generated file. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.DownloadMaskingPolicyDetails download_masking_policy_details: (required) + Details to download a masking policy file. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_masking_policy API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/download" + method = "POST" + + # 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( + "download_masking_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_masking_policy_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_masking_policy_details, + response_type="stream") + + def download_masking_report(self, masking_policy_id, download_masking_report_details, **kwargs): + """ + Downloads an already-generated masking report. Note that the GenerateMaskingReportForDownload + operation is a prerequisite for the DownloadMaskingReport operation. Use GenerateMaskingReportForDownload + to generate a masking report file and then use DownloadMaskingReport to download the generated file. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.DownloadMaskingReportDetails download_masking_report_details: (required) + Details to download a masking report. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_masking_report API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/downloadReport" + method = "POST" + + # 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( + "download_masking_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_masking_report_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_masking_report_details, + response_type="stream") + + def download_privilege_script(self, **kwargs): + """ + Downloads the privilege script to grant/revoke required roles from the Data Safe account on the target database. + + + :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) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_privilege_script API. + """ + resource_path = "/actions/downloadPrivilegeScript" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "download_privilege_script got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + response_type="stream") + + def download_security_assessment_report(self, security_assessment_id, download_security_assessment_report_details, **kwargs): + """ + Downloads the report of the specified security assessment. To download the security assessment report, it needs to be generated first. + Please use GenerateSecurityAssessmentReport to generate a downloadable report in the preferred format (PDF, XLS). + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param oci.data_safe.models.DownloadSecurityAssessmentReportDetails download_security_assessment_report_details: (required) + Details of the report. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_security_assessment_report API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/actions/downloadReport" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "download_security_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_security_assessment_report_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_security_assessment_report_details, + response_type="stream") + + def download_sensitive_data_model(self, sensitive_data_model_id, download_sensitive_data_model_details, **kwargs): + """ + Downloads an already-generated file corresponding to the specified sensitive data model. Note that the + GenerateSensitiveDataModelForDownload operation is a prerequisite for the DownloadSensitiveDataModel operation. + Use GenerateSensitiveDataModelForDownload to generate a data model file and then use DownloadSensitiveDataModel + to download the generated file. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.DownloadSensitiveDataModelDetails download_sensitive_data_model_details: (required) + Details to download a sensitive data model file. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_sensitive_data_model API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/actions/download" + method = "POST" + + # 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( + "download_sensitive_data_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_sensitive_data_model_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_sensitive_data_model_details, + response_type="stream") + + def download_user_assessment_report(self, user_assessment_id, download_user_assessment_report_details, **kwargs): + """ + Downloads the report of the specified user assessment. To download the user assessment report, it needs to be generated first. + Please use GenerateUserAssessmentReport to generate a downloadable report in the preferred format (PDF, XLS). + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param oci.data_safe.models.DownloadUserAssessmentReportDetails download_user_assessment_report_details: (required) + Details of the report. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use download_user_assessment_report API. + """ + resource_path = "/userAssessments/{userAssessmentId}/actions/downloadReport" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "download_user_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_user_assessment_report_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=download_user_assessment_report_details, + response_type="stream") + + def enable_data_safe_configuration(self, enable_data_safe_configuration_details, **kwargs): + """ + Enables Data Safe in the tenancy and region. + + + :param oci.data_safe.models.EnableDataSafeConfigurationDetails enable_data_safe_configuration_details: (required) + The details used to enable Data Safe. + + :param str compartment_id: (optional) + A filter to return only resources that match the specified compartment OCID. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use enable_data_safe_configuration API. + """ + resource_path = "/configuration" + method = "PUT" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "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( + "enable_data_safe_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=enable_data_safe_configuration_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + body=enable_data_safe_configuration_details) + + def generate_discovery_report_for_download(self, sensitive_data_model_id, generate_discovery_report_for_download_details, **kwargs): + """ + Generates a downloadable discovery report. It's a prerequisite for the DownloadDiscoveryReport operation. Use this + endpoint to generate a discovery report file and then use DownloadDiscoveryReport to download the generated file. + By default, it generates report for all the columns in a sensitive data model. Use the discoveryJobId attribute + to generate report for a specific discovery job. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails generate_discovery_report_for_download_details: (required) + Details to generate a downloadable discovery report. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_discovery_report_for_download API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/actions/generateReportForDownload" + method = "POST" + + # 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( + "generate_discovery_report_for_download got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_discovery_report_for_download_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_discovery_report_for_download_details) + + def generate_masking_policy_for_download(self, masking_policy_id, generate_masking_policy_for_download_details, **kwargs): + """ + Generates a downloadable file corresponding to the specified masking policy. It's + a prerequisite for the DownloadMaskingPolicy operation. Use this endpoint to generate + a masking policy file and then use DownloadMaskingPolicy to download the generated file. + Note that file generation and download are serial operations. The download operation + can't be invoked while the generate operation is in progress. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails generate_masking_policy_for_download_details: (required) + Details to generate a masking policy file. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_masking_policy_for_download API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/generatePolicyForDownload" + method = "POST" + + # 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( + "generate_masking_policy_for_download got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_masking_policy_for_download_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_masking_policy_for_download_details) + + def generate_masking_report_for_download(self, masking_policy_id, generate_masking_report_for_download_details, **kwargs): + """ + Generates a downloadable masking report. It's a prerequisite for the + DownloadMaskingReport operation. Use this endpoint to generate a + masking report file and then use DownloadMaskingReport to download + the generated file. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.GenerateMaskingReportForDownloadDetails generate_masking_report_for_download_details: (required) + Details to generate a downloadable masking report. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_masking_report_for_download API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/generateReportForDownload" + method = "POST" + + # 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( + "generate_masking_report_for_download got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_masking_report_for_download_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_masking_report_for_download_details) + + def generate_on_prem_connector_configuration(self, generate_on_prem_connector_configuration_details, on_prem_connector_id, **kwargs): + """ + Creates and downloads the configuration of the specified on-premises connector. + + + :param oci.data_safe.models.GenerateOnPremConnectorConfigurationDetails generate_on_prem_connector_configuration_details: (required) + The details used to create and download on-premises connector's configuration. + + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. + + :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) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_on_prem_connector_configuration API. + """ + resource_path = "/onPremConnectors/{onPremConnectorId}/actions/generateConfiguration" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "generate_on_prem_connector_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "onPremConnectorId": on_prem_connector_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/octet-stream", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_on_prem_connector_configuration_details, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_on_prem_connector_configuration_details, + response_type="stream") + + def generate_report(self, report_definition_id, generate_report_details, **kwargs): + """ + Generates a PDF or XLS report based on parameters and report definition. + + + :param str report_definition_id: (required) + Unique report definition identifier + + :param oci.data_safe.models.GenerateReportDetails generate_report_details: (required) + Details for report generation. It contains details such as PDF/XLS and filter parameters like audit event time limits, number of rows and target databases etc + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 scim_query: (optional) + The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + of the System for Cross-Domain Identity Management (SCIM) specification, which is available + at `RFC3339`__. In SCIM filtering expressions, + text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + (Numeric and boolean values should not be quoted.) + + **Example:** query=(dateGenerated ge '2021-12-18T01-00-26') and (ilmTarget eq 'dscs-target') + + __ https://tools.ietf.org/html/draft-ietf-scim-api-12 + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_report API. + """ + resource_path = "/reportDefinitions/{reportDefinitionId}/actions/generateReport" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_request_id", + "opc_retry_token", + "scim_query" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "generate_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "reportDefinitionId": report_definition_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "scimQuery": kwargs.get("scim_query", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=generate_report_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + body=generate_report_details) + + def generate_security_assessment_report(self, security_assessment_id, generate_security_assessment_report_details, **kwargs): + """ + Generates the report of the specified security assessment. You can get the report in PDF or XLS format. + After generating the report, use DownloadSecurityAssessmentReport to download it in the preferred format. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param oci.data_safe.models.GenerateSecurityAssessmentReportDetails generate_security_assessment_report_details: (required) + Details of the report. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_security_assessment_report API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/actions/generateReport" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "generate_security_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_security_assessment_report_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_security_assessment_report_details) + + def generate_sensitive_data_model_for_download(self, sensitive_data_model_id, generate_sensitive_data_model_for_download_details, **kwargs): + """ + Generates a downloadable file corresponding to the specified sensitive data model. It's a prerequisite for the + DownloadSensitiveDataModel operation. Use this endpoint to generate a data model file and then use DownloadSensitiveDataModel + to download the generated file. Note that file generation and download are serial operations. The download operation + can't be invoked while the generate operation is in progress. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails generate_sensitive_data_model_for_download_details: (required) + Details to generate a sensitive data model file. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_sensitive_data_model_for_download API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/actions/generateDataModelForDownload" + method = "POST" + + # 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( + "generate_sensitive_data_model_for_download got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_sensitive_data_model_for_download_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_sensitive_data_model_for_download_details) + + def generate_user_assessment_report(self, user_assessment_id, generate_user_assessment_report_details, **kwargs): + """ + Generates the report of the specified user assessment. The report is available in PDF or XLS format. + After generating the report, use DownloadUserAssessmentReport to download it in the preferred format. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param oci.data_safe.models.GenerateUserAssessmentReportDetails generate_user_assessment_report_details: (required) + Details of the report. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use generate_user_assessment_report API. + """ + resource_path = "/userAssessments/{userAssessmentId}/actions/generateReport" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "generate_user_assessment_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_user_assessment_report_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=generate_user_assessment_report_details) + + def get_alert(self, alert_id, **kwargs): + """ + Gets the details of alert by its ID. + + + :param str alert_id: (required) + The OCID of alert. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.Alert` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_alert API. + """ + resource_path = "/alerts/{alertId}" + method = "GET" + + # 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( + "get_alert got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "alertId": alert_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Alert") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Alert") + + def get_alert_policy(self, alert_policy_id, **kwargs): + """ + Gets the details of alert policy by its ID. + + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AlertPolicy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_alert_policy API. + """ + resource_path = "/alertPolicies/{alertPolicyId}" + method = "GET" + + # 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( + "get_alert_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "alertPolicyId": alert_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AlertPolicy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AlertPolicy") + + def get_audit_archive_retrieval(self, audit_archive_retrieval_id, **kwargs): + """ + Gets the details of the specified archive retreival. + + + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditArchiveRetrieval` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_audit_archive_retrieval API. + """ + resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" + method = "GET" + + # 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( + "get_audit_archive_retrieval got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditArchiveRetrievalId": audit_archive_retrieval_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditArchiveRetrieval") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditArchiveRetrieval") + + def get_audit_policy(self, audit_policy_id, **kwargs): + """ + Gets a audit policy by identifier. + + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditPolicy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_audit_policy API. + """ + resource_path = "/auditPolicies/{auditPolicyId}" + method = "GET" + + # 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( + "get_audit_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditPolicyId": audit_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditPolicy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditPolicy") + + def get_audit_profile(self, audit_profile_id, **kwargs): + """ + Gets the details of audit profile resource and associated audit trails of the audit profile. + + + :param str audit_profile_id: (required) + The OCID of the audit. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditProfile` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_audit_profile API. + """ + resource_path = "/auditProfiles/{auditProfileId}" + method = "GET" + + # 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( + "get_audit_profile got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditProfileId": audit_profile_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditProfile") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditProfile") + + def get_audit_trail(self, audit_trail_id, **kwargs): + """ + Gets the details of audit trail. + + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditTrail` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_audit_trail API. + """ + resource_path = "/auditTrails/{auditTrailId}" + method = "GET" + + # 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( + "get_audit_trail got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditTrailId": audit_trail_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditTrail") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="AuditTrail") + + def get_compatible_formats_for_data_types(self, **kwargs): + """ + Gets a list of basic masking formats compatible with the supported data types. + The data types are grouped into the following categories - + Character - Includes CHAR, NCHAR, VARCHAR2, and NVARCHAR2 + Numeric - Includes NUMBER, FLOAT, RAW, BINARY_FLOAT, and BINARY_DOUBLE + Date - Includes DATE and TIMESTAMP + LOB - Includes BLOB, CLOB, and NCLOB + All - Includes all the supported data types + + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.CompatibleFormatsForDataTypes` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_compatible_formats_for_data_types API. + """ + resource_path = "/compatibleFormatsForDataTypes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_compatible_formats_for_data_types got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CompatibleFormatsForDataTypes") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CompatibleFormatsForDataTypes") + + def get_compatible_formats_for_sensitive_types(self, compartment_id, **kwargs): + """ + Gets a list of library masking formats compatible with the existing sensitive types. + For each sensitive type, it returns the assigned default masking format as well as + the other library masking formats that have the sensitiveTypeIds attribute containing + the OCID of the sensitive type. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.CompatibleFormatsForSensitiveTypes` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_compatible_formats_for_sensitive_types API. + """ + resource_path = "/compatibleFormatsForSensitiveTypes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "limit", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_compatible_formats_for_sensitive_types got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CompatibleFormatsForSensitiveTypes") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="CompatibleFormatsForSensitiveTypes") + + def get_data_safe_configuration(self, **kwargs): + """ + Gets the details of the Data Safe configuration. + + + :param str compartment_id: (optional) + A filter to return only resources that match the specified compartment OCID. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.DataSafeConfiguration` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_data_safe_configuration API. + """ + resource_path = "/configuration" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "get_data_safe_configuration got unknown kwargs: {!r}".format(extra_kwargs)) + + query_params = { + "compartmentId": kwargs.get("compartment_id", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DataSafeConfiguration") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DataSafeConfiguration") + + def get_data_safe_private_endpoint(self, data_safe_private_endpoint_id, **kwargs): + """ + Gets the details of the specified Data Safe private endpoint. + + + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.DataSafePrivateEndpoint` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_data_safe_private_endpoint API. + """ + resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + method = "GET" + + # 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( + "get_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "dataSafePrivateEndpointId": data_safe_private_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DataSafePrivateEndpoint") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DataSafePrivateEndpoint") + + def get_discovery_job(self, discovery_job_id, **kwargs): + """ + Gets the details of the specified discovery job. + + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.DiscoveryJob` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_discovery_job API. + """ + resource_path = "/discoveryJobs/{discoveryJobId}" + method = "GET" + + # 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( + "get_discovery_job got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DiscoveryJob") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DiscoveryJob") + + def get_discovery_job_result(self, discovery_job_id, result_key, **kwargs): + """ + Gets the details of the specified discovery result. + + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param str result_key: (required) + The unique key that identifies the discovery result. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.DiscoveryJobResult` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_discovery_job_result API. + """ + resource_path = "/discoveryJobs/{discoveryJobId}/results/{resultKey}" + method = "GET" + + # 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( + "get_discovery_job_result got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_job_id, + "resultKey": result_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DiscoveryJobResult") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="DiscoveryJobResult") + + def get_library_masking_format(self, library_masking_format_id, **kwargs): + """ + Gets the details of the specified library masking format. + + + :param str library_masking_format_id: (required) + The OCID of the library masking format. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.LibraryMaskingFormat` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_library_masking_format API. + """ + resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}" + method = "GET" + + # 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( + "get_library_masking_format got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "libraryMaskingFormatId": library_masking_format_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="LibraryMaskingFormat") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="LibraryMaskingFormat") + + def get_masking_column(self, masking_policy_id, masking_column_key, **kwargs): + """ + Gets the details of the specified masking column. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param str masking_column_key: (required) + The unique key that identifies the masking column. It's numeric and unique within a masking policy. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskingColumn` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_masking_column API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" + method = "GET" + + # 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( + "get_masking_column got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id, + "maskingColumnKey": masking_column_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="MaskingColumn") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="MaskingColumn") + + def get_masking_policy(self, masking_policy_id, **kwargs): + """ + Gets the details of the specified masking policy. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskingPolicy` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_masking_policy API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}" + method = "GET" + + # 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( + "get_masking_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="MaskingPolicy") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="MaskingPolicy") + + def get_masking_report(self, masking_report_id, **kwargs): + """ + Gets the details of the specified masking report. + + + :param str masking_report_id: (required) + The OCID of the masking report. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskingReport` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_masking_report API. + """ + resource_path = "/maskingReports/{maskingReportId}" + method = "GET" + + # 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( + "get_masking_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingReportId": masking_report_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="MaskingReport") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="MaskingReport") + + def get_on_prem_connector(self, on_prem_connector_id, **kwargs): + """ + Gets the details of the specified on-premises connector. + + + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.OnPremConnector` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_on_prem_connector API. + """ + resource_path = "/onPremConnectors/{onPremConnectorId}" + method = "GET" + + # 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( + "get_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "onPremConnectorId": on_prem_connector_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="OnPremConnector") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="OnPremConnector") + + def get_report(self, report_id, **kwargs): + """ + Gets a report by identifier + + + :param str report_id: (required) + Unique report identifier + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.Report` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_report API. + """ + resource_path = "/reports/{reportId}" + method = "GET" + + # 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( + "get_report got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "reportId": report_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Report") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="Report") + + def get_report_content(self, report_id, **kwargs): + """ + Downloads the specified report in the form of PDF or XLXS. + + + :param str report_id: (required) + Unique report identifier + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 stream + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_report_content API. + """ + resource_path = "/reports/{reportId}/content" + method = "GET" + + # 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( + "get_report_content got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "reportId": report_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="stream") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="stream") + + def get_report_definition(self, report_definition_id, **kwargs): + """ + Gets the details of report definition specified by the identifier + + + :param str report_definition_id: (required) + Unique report definition identifier + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.ReportDefinition` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_report_definition API. + """ + resource_path = "/reportDefinitions/{reportDefinitionId}" + method = "GET" + + # 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( + "get_report_definition got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "reportDefinitionId": report_definition_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ReportDefinition") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="ReportDefinition") + + def get_security_assessment(self, security_assessment_id, **kwargs): + """ + Gets the details of the specified security assessment. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.SecurityAssessment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_security_assessment API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}" + method = "GET" + + # 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( + "get_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SecurityAssessment") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SecurityAssessment") + + def get_security_assessment_comparison(self, security_assessment_id, comparison_security_assessment_id, **kwargs): + """ + Gets the details of the comparison report on the security assessments submitted for comparison. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str comparison_security_assessment_id: (required) + The OCID of the baseline security assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.SecurityAssessmentComparison` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_security_assessment_comparison API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/comparison/{comparisonSecurityAssessmentId}" + method = "GET" + + # 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( + "get_security_assessment_comparison got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id, + "comparisonSecurityAssessmentId": comparison_security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SecurityAssessmentComparison") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SecurityAssessmentComparison") + + def get_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, **kwargs): + """ + Gets the details of the specified sensitive column. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param str sensitive_column_key: (required) + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.SensitiveColumn` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_sensitive_column API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns/{sensitiveColumnKey}" + method = "GET" + + # 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( + "get_sensitive_column got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id, + "sensitiveColumnKey": sensitive_column_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SensitiveColumn") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SensitiveColumn") + + def get_sensitive_data_model(self, sensitive_data_model_id, **kwargs): + """ + Gets the details of the specified sensitive data model. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.SensitiveDataModel` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_sensitive_data_model API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}" + method = "GET" + + # 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( + "get_sensitive_data_model got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SensitiveDataModel") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SensitiveDataModel") + + def get_sensitive_type(self, sensitive_type_id, **kwargs): + """ + Gets the details of the specified sensitive type. + + + :param str sensitive_type_id: (required) + The OCID of the sensitive type. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.SensitiveType` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_sensitive_type API. + """ + resource_path = "/sensitiveTypes/{sensitiveTypeId}" + method = "GET" + + # 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( + "get_sensitive_type got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveTypeId": sensitive_type_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SensitiveType") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="SensitiveType") + + def get_target_alert_policy_association(self, target_alert_policy_association_id, **kwargs): + """ + Gets the details of target-alert policy association by its ID. + + + :param str target_alert_policy_association_id: (required) + The OCID of the target-alert policy association. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.TargetAlertPolicyAssociation` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_target_alert_policy_association API. + """ + resource_path = "/targetAlertPolicyAssociations/{targetAlertPolicyAssociationId}" + method = "GET" + + # 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( + "get_target_alert_policy_association got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetAlertPolicyAssociationId": target_alert_policy_association_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="TargetAlertPolicyAssociation") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="TargetAlertPolicyAssociation") + + def get_target_database(self, target_database_id, **kwargs): + """ + Returns the details of the specified Data Safe target database. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.TargetDatabase` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_target_database API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}" + method = "GET" + + # 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( + "get_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="TargetDatabase") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="TargetDatabase") + + def get_user_assessment(self, user_assessment_id, **kwargs): + """ + Gets a user assessment by identifier. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.UserAssessment` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_user_assessment API. + """ + resource_path = "/userAssessments/{userAssessmentId}" + method = "GET" + + # 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( + "get_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="UserAssessment") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="UserAssessment") + + def get_user_assessment_comparison(self, user_assessment_id, comparison_user_assessment_id, **kwargs): + """ + Gets the details of the comparison report for the user assessments provided. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param str comparison_user_assessment_id: (required) + The OCID of the baseline user assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.UserAssessmentComparison` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_user_assessment_comparison API. + """ + resource_path = "/userAssessments/{userAssessmentId}/comparison/{comparisonUserAssessmentId}" + method = "GET" + + # 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( + "get_user_assessment_comparison got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id, + "comparisonUserAssessmentId": comparison_user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="UserAssessmentComparison") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="UserAssessmentComparison") + + def get_work_request(self, work_request_id, **kwargs): + """ + Gets the details of the specified work request. + + + :param str work_request_id: (required) + The OCID of the work request. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.WorkRequest` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_work_request API. + """ + resource_path = "/workRequests/{workRequestId}" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "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( + "get_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + response_type="WorkRequest") + + def list_alert_analytics(self, compartment_id, **kwargs): + """ + Returns aggregation details of alerts. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param datetime time_started: (optional) + An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified, + in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_ended: (optional) + An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified, + in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + :param str query_time_zone: (optional) + Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. If no value is specified timeCreated is default. + + Allowed values are: "displayName", "timeCreated" + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str scim_query: (optional) + The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + of the System for Cross-Domain Identity Management (SCIM) specification, which is available + at `RFC3339`__. In SCIM filtering expressions, + text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + (Numeric and boolean values should not be quoted.) + + **Example:** query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1') + Supported fields: + severity + status + alertType + targetIds + targetNames + operationTime + lifecycleState + displayName + timeCreated + timeUpdated + + __ https://tools.ietf.org/html/draft-ietf-scim-api-12 + + :param list[str] summary_field: (optional) + Specifies a subset of summarized fields to be returned in the response. + + Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount" + + :param list[str] group_by: (optional) + A groupBy can only be used in combination with summaryField parameter. + A groupBy value has to be a subset of the values mentioned in summaryField parameter. + + Allowed values are: "alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId" + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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.data_safe.models.AlertAnalyticsCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_alert_analytics API. + """ + resource_path = "/alertAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "limit", + "page", + "opc_request_id", + "if_match", + "time_started", + "time_ended", + "query_time_zone", + "sort_order", + "sort_by", + "access_level", + "scim_query", + "summary_field", + "group_by", + "opc_retry_token" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_alert_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["displayName", "timeCreated"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'summary_field' in kwargs: + summary_field_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId", "open", "closed", "critical", "high", "medium", "low", "alertcount"] + for summary_field_item in kwargs['summary_field']: + if summary_field_item not in summary_field_allowed_values: + raise ValueError( + "Invalid value for `summary_field`, must be one of {0}".format(summary_field_allowed_values) + ) + + if 'group_by' in kwargs: + group_by_allowed_values = ["alertType", "targetIds", "targetNames", "alertSeverity", "alertStatus", "timeCreated", "policyId"] + for group_by_item in kwargs['group_by']: + if group_by_item not in group_by_allowed_values: + raise ValueError( + "Invalid value for `group_by`, must be one of {0}".format(group_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "timeStarted": kwargs.get("time_started", missing), + "timeEnded": kwargs.get("time_ended", missing), + "queryTimeZone": kwargs.get("query_time_zone", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "accessLevel": kwargs.get("access_level", missing), + "scimQuery": kwargs.get("scim_query", missing), + "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'), + "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AlertAnalyticsCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AlertAnalyticsCollection") + + def list_alert_policies(self, compartment_id, **kwargs): + """ + Gets a list of all alert policies. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str alert_policy_id: (optional) + A filter to return policy by it's OCID. + + :param str type: (optional) + An optional filter to return only alert policies of a certain type. + + Allowed values are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT" + + :param bool is_user_defined: (optional) + An optional filter to return only alert policies that are user-defined or not. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str lifecycle_state: (optional) + An optional filter to return only alert policies that have the given life-cycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. + + Allowed values are: "displayName", "timeCreated" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :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.data_safe.models.AlertPolicyCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_alert_policies API. + """ + resource_path = "/alertPolicies" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "alert_policy_id", + "type", + "is_user_defined", + "display_name", + "lifecycle_state", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "compartment_id_in_subtree", + "access_level" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_alert_policies got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'type' in kwargs: + type_allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"] + if kwargs['type'] not in type_allowed_values: + raise ValueError( + "Invalid value for `type`, must be one of {0}".format(type_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["displayName", "timeCreated"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "alertPolicyId": kwargs.get("alert_policy_id", missing), + "type": kwargs.get("type", missing), + "isUserDefined": kwargs.get("is_user_defined", missing), + "displayName": kwargs.get("display_name", missing), + "compartmentId": compartment_id, + "lifecycleState": kwargs.get("lifecycle_state", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AlertPolicyCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AlertPolicyCollection") + + def list_alert_policy_rules(self, alert_policy_id, **kwargs): + """ + Lists the rules of the specified alert policy. The alert policy is said to be satisfied when all rules in the policy evaulate to true. + If there are three rules: rule1,rule2 and rule3, the policy is satisfied if rule1 AND rule2 AND rule3 is True. + + + :param str alert_policy_id: (required) + The OCID of the alert policy. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. 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.data_safe.models.AlertPolicyRuleCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_alert_policy_rules API. + """ + resource_path = "/alertPolicies/{alertPolicyId}/rules" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_alert_policy_rules got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "alertPolicyId": alert_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AlertPolicyRuleCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AlertPolicyRuleCollection") + + def list_alerts(self, compartment_id, **kwargs): + """ + Gets a list of all alerts. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str id: (optional) + A filter to return alert by it's OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeCreated is descending. If no value is specified timeCreated is default. + + Allowed values are: "displayName", "timeCreated" + + :param str scim_query: (optional) + The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + of the System for Cross-Domain Identity Management (SCIM) specification, which is available + at `RFC3339`__. In SCIM filtering expressions, + text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + (Numeric and boolean values should not be quoted.) + + **Example:** query=(timeCreated ge '2021-06-04T01-00-26') and (targetNames eq 'target_1') + Supported fields: + severity + status + alertType + targetIds + targetNames + operationTime + lifecycleState + displayName + timeCreated + timeUpdated + + __ https://tools.ietf.org/html/draft-ietf-scim-api-12 + + :param list[str] field: (optional) + Specifies a subset of fields to be returned in the response. + + Allowed values are: "id", "displayName", "alertType", "targetIds", "targetNames", "severity", "status", "operationTime", "operation", "operationStatus", "timeCreated", "timeUpdated", "policyId", "lifecycleState" + + :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.data_safe.models.AlertCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_alerts API. + """ + resource_path = "/alerts" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "id", + "compartment_id_in_subtree", + "limit", + "page", + "opc_request_id", + "access_level", + "sort_order", + "sort_by", + "scim_query", + "field" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_alerts got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["displayName", "timeCreated"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'field' in kwargs: + field_allowed_values = ["id", "displayName", "alertType", "targetIds", "targetNames", "severity", "status", "operationTime", "operation", "operationStatus", "timeCreated", "timeUpdated", "policyId", "lifecycleState"] + for field_item in kwargs['field']: + if field_item not in field_allowed_values: + raise ValueError( + "Invalid value for `field`, must be one of {0}".format(field_allowed_values) + ) + + query_params = { + "id": kwargs.get("id", missing), + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "accessLevel": kwargs.get("access_level", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "scimQuery": kwargs.get("scim_query", missing), + "field": self.base_client.generate_collection_format_param(kwargs.get("field", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AlertCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AlertCollection") + + def list_audit_archive_retrievals(self, compartment_id, **kwargs): + """ + Returns the list of audit archive retrieval. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str audit_archive_retrieval_id: (optional) + OCID of the archive retrieval. + + :param str target_id: (optional) + The OCID of the target associated with the archive retrieval. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A filter to return only resources that matches the specified lifecycle state. + + Allowed values are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED" + + :param datetime time_of_expiry: (optional) + The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditArchiveRetrievalCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_archive_retrievals API. + """ + resource_path = "/auditArchiveRetrievals" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "display_name", + "compartment_id_in_subtree", + "access_level", + "audit_archive_retrieval_id", + "target_id", + "limit", + "page", + "lifecycle_state", + "time_of_expiry", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_archive_retrievals got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "DELETING", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "displayName": kwargs.get("display_name", missing), + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "auditArchiveRetrievalId": kwargs.get("audit_archive_retrieval_id", missing), + "targetId": kwargs.get("target_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "timeOfExpiry": kwargs.get("time_of_expiry", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditArchiveRetrievalCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditArchiveRetrievalCollection") + + def list_audit_event_analytics(self, compartment_id, **kwargs): + """ + By default ListAuditEventAnalytics operation will return all of the summary columns. To filter desired summary columns, specify + it in the `summaryOf` query parameter. + + **Example:** /ListAuditEventAnalytics?summaryField=targetName&summaryField=userName&summaryField=clientHostName&summaryField + &summaryField=dmls&summaryField=privilege_changes&summaryField=ddls&summaryField=login_failure&summaryField=login_success + &summaryField=eventcount&q=(operationTime ge '2021-06-13T23:49:14')&groupBy=targetName + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param int limit: (optional) + For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + It is usually retrieved from a previous \"List\" call. For details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str scim_query: (optional) + The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + of the System for Cross-Domain Identity Management (SCIM) specification, which is available + at `RFC3339`__. In SCIM filtering expressions, + text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + (Numeric and boolean values should not be quoted.) + + **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + + __ https://tools.ietf.org/html/draft-ietf-scim-api-12 + + :param list[str] summary_field: (optional) + Specifies a subset of summarized fields to be returned in the response. + + Allowed values are: "auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName", "allRecord", "auditSettingsChange", "dbSchemaChange", "entitlementChange", "loginFailure", "loginSuccess", "allViolations", "realmViolations", "ruleViolations", "dvconfigActivities", "ddls", "dmls", "privilegeChanges", "auditSettingsEnables", "auditSettingsDisables", "selects", "creates", "alters", "drops", "grants", "revokes" + + :param datetime time_started: (optional) + An optional filter to return audit events whose creation time in the database is greater than and equal to the date-time specified, + in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_ended: (optional) + An optional filter to return audit events whose creation time in the database is less than and equal to the date-time specified, + in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + :param str query_time_zone: (optional) + Default time zone is UTC if no time zone provided. The date-time considerations of the resource will be in accordance with the specified time zone. + + :param list[str] group_by: (optional) + A groupBy can only be used in combination with summaryField parameter. + A groupBy value has to be a subset of the values mentioned in summaryField parameter. + + Allowed values are: "auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName" + + :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 sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + If this query parameter is specified, the result is ordered based on this query parameter value. + + Allowed values are: "targetId", "targetClass", "targetName", "objectType", "dbUserName", "eventName", "auditEventTime", "clientHostname", "clientProgram", "clientId", "auditType" + + :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.data_safe.models.AuditEventAnalyticsCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_event_analytics API. + """ + resource_path = "/auditEventAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match", + "limit", + "page", + "compartment_id_in_subtree", + "access_level", + "scim_query", + "summary_field", + "time_started", + "time_ended", + "query_time_zone", + "group_by", + "opc_retry_token", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_event_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'summary_field' in kwargs: + summary_field_allowed_values = ["auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName", "allRecord", "auditSettingsChange", "dbSchemaChange", "entitlementChange", "loginFailure", "loginSuccess", "allViolations", "realmViolations", "ruleViolations", "dvconfigActivities", "ddls", "dmls", "privilegeChanges", "auditSettingsEnables", "auditSettingsDisables", "selects", "creates", "alters", "drops", "grants", "revokes"] + for summary_field_item in kwargs['summary_field']: + if summary_field_item not in summary_field_allowed_values: + raise ValueError( + "Invalid value for `summary_field`, must be one of {0}".format(summary_field_allowed_values) + ) + + if 'group_by' in kwargs: + group_by_allowed_values = ["auditEventTime", "dbUserName", "targetId", "targetName", "targetClass", "objectType", "clientHostname", "clientProgram", "clientId", "auditType", "eventName"] + for group_by_item in kwargs['group_by']: + if group_by_item not in group_by_allowed_values: + raise ValueError( + "Invalid value for `group_by`, must be one of {0}".format(group_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["targetId", "targetClass", "targetName", "objectType", "dbUserName", "eventName", "auditEventTime", "clientHostname", "clientProgram", "clientId", "auditType"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "scimQuery": kwargs.get("scim_query", missing), + "summaryField": self.base_client.generate_collection_format_param(kwargs.get("summary_field", missing), 'multi'), + "timeStarted": kwargs.get("time_started", missing), + "timeEnded": kwargs.get("time_ended", missing), + "queryTimeZone": kwargs.get("query_time_zone", missing), + "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'), + "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), + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditEventAnalyticsCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditEventAnalyticsCollection") + + def list_audit_events(self, compartment_id, **kwargs): + """ + The ListAuditEvents operation returns specified `compartmentId` audit Events only. + The list does not include any audit Events associated with the `subcompartments` of the specified `compartmentId`. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform ListAuditEvents on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param int limit: (optional) + For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + It is usually retrieved from a previous \"List\" call. For details about how pagination works, + see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str scim_query: (optional) + The scimQuery query parameter accepts filter expressions that use the syntax described in Section 3.2.2.2 + of the System for Cross-Domain Identity Management (SCIM) specification, which is available + at `RFC3339`__. In SCIM filtering expressions, + text, date, and time values must be enclosed in quotation marks, with date and time values using ISO-8601 format. + (Numeric and boolean values should not be quoted.) + + **Example:** query=(operationTime ge '2021-06-04T01-00-26') and (eventName eq 'LOGON') + + __ https://tools.ietf.org/html/draft-ietf-scim-api-12 + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + If this query parameter is specified, the result is sorted by this query parameter value. + + Allowed values are: "dbUserName", "targetName", "databaseType", "targetClass", "auditEventTime", "timeCollected", "osUserName", "operation", "operationStatus", "eventName", "errorCode", "errorMessage", "objectType", "objectName", "objectOwner", "clientHostname", "clientIp", "isAlerted", "actionTaken", "clientProgram", "commandText", "commandParam", "extendedEventAttributes", "auditLocation", "osTerminal", "clientId", "auditPolicies", "auditType" + + :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.data_safe.models.AuditEventCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_events API. + """ + resource_path = "/auditEvents" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "compartment_id_in_subtree", + "access_level", + "limit", + "page", + "scim_query", + "sort_order", + "sort_by" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_events got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["dbUserName", "targetName", "databaseType", "targetClass", "auditEventTime", "timeCollected", "osUserName", "operation", "operationStatus", "eventName", "errorCode", "errorMessage", "objectType", "objectName", "objectOwner", "clientHostname", "clientIp", "isAlerted", "actionTaken", "clientProgram", "commandText", "commandParam", "extendedEventAttributes", "auditLocation", "osTerminal", "clientId", "auditPolicies", "auditType"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "scimQuery": kwargs.get("scim_query", 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, application/xml", + "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="AuditEventCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditEventCollection") + + def list_audit_policies(self, compartment_id, **kwargs): + """ + Retrieves a list of all audited targets with their corresponding provisioned audit policies, and their provisioning conditions. + + The ListAuditPolicies operation returns only the audit policies in the specified `compartmentId`. + The list does not include any subcompartments of the compartmentId passed. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform ListAuditPolicies on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str lifecycle_state: (optional) + The current state of the audit policy. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED" + + :param str audit_policy_id: (optional) + An optional filter to return only resources that match the specified id. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditPolicyCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_policies API. + """ + resource_path = "/auditPolicies" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "limit", + "page", + "target_id", + "lifecycle_state", + "audit_policy_id", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_policies got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "DELETING", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "targetId": kwargs.get("target_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "auditPolicyId": kwargs.get("audit_policy_id", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditPolicyCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditPolicyCollection") + + def list_audit_profile_analytics(self, compartment_id, **kwargs): + """ + Gets a list of audit profile aggregated details . A audit profile aggregation helps understand the overall state of audit profile profiles. + As an example, it helps understand how many audit profiles have paid usage. It is especially useful to create dashboards or to support analytics. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform AuditProfileAnalytics on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param list[str] group_by: (optional) + The group by parameter for summarize operation on audit. + + Allowed values are: "isPaidUsageEnabled" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditProfileAnalyticCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_profile_analytics API. + """ + resource_path = "/auditProfileAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "limit", + "page", + "group_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_profile_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'group_by' in kwargs: + group_by_allowed_values = ["isPaidUsageEnabled"] + for group_by_item in kwargs['group_by']: + if group_by_item not in group_by_allowed_values: + raise ValueError( + "Invalid value for `group_by`, must be one of {0}".format(group_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi') + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditProfileAnalyticCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditProfileAnalyticCollection") + + def list_audit_profiles(self, compartment_id, **kwargs): + """ + Gets a list of all audit profiles. + + The ListAuditProfiles operation returns only the audit profiles in the specified `compartmentId`. + The list does not include any subcompartments of the compartmentId passed. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform ListAuditProfiles on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str audit_profile_id: (optional) + A optional filter to return only resources that match the specified id. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A optional filter to return only resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED" + + :param bool is_override_global_retention_setting: (optional) + A optional filter to return only resources that match the specified retention configured value. + + :param bool is_paid_usage_enabled: (optional) + Indicates if you want to continue audit record collection beyond the free limit + of one million audit records per month per target database, incurring additional charges. + The default value is inherited from the global settings. You can change at the global level + or at the target level. + + :param int audit_collected_volume_greater_than_or_equal_to: (optional) + A filter to return only items that have count of audit records collected greater than or equal to the specified value. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditProfileCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_profiles API. + """ + resource_path = "/auditProfiles" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "audit_profile_id", + "target_id", + "display_name", + "limit", + "page", + "lifecycle_state", + "is_override_global_retention_setting", + "is_paid_usage_enabled", + "audit_collected_volume_greater_than_or_equal_to", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_profiles got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "auditProfileId": kwargs.get("audit_profile_id", missing), + "targetId": kwargs.get("target_id", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "isOverrideGlobalRetentionSetting": kwargs.get("is_override_global_retention_setting", missing), + "isPaidUsageEnabled": kwargs.get("is_paid_usage_enabled", missing), + "auditCollectedVolumeGreaterThanOrEqualTo": kwargs.get("audit_collected_volume_greater_than_or_equal_to", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditProfileCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditProfileCollection") + + def list_audit_trail_analytics(self, compartment_id, **kwargs): + """ + Gets a list of audit trail aggregated details . A audit trail aggregation helps understand the overall state of trails. + As an example, it helps understand how many trails are running or stopped. It is especially useful to create dashboards or to support analytics. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform AuditTrailAnalytics on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param list[str] group_by: (optional) + The group by parameter for summarize operation on audit trail. + + Allowed values are: "location", "lifecycleState", "status", "targetId" + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditTrailAnalyticCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_trail_analytics API. + """ + resource_path = "/auditTrailAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "limit", + "page", + "group_by", + "target_id", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_trail_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'group_by' in kwargs: + group_by_allowed_values = ["location", "lifecycleState", "status", "targetId"] + for group_by_item in kwargs['group_by']: + if group_by_item not in group_by_allowed_values: + raise ValueError( + "Invalid value for `group_by`, must be one of {0}".format(group_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "groupBy": self.base_client.generate_collection_format_param(kwargs.get("group_by", missing), 'multi'), + "targetId": kwargs.get("target_id", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditTrailAnalyticCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditTrailAnalyticCollection") + + def list_audit_trails(self, compartment_id, **kwargs): + """ + Gets a list of all audit trails. + The ListAuditTrails operation returns only the audit trails in the specified `compartmentId`. + The list does not include any subcompartments of the compartmentId passed. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform ListAuditTrails on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str audit_trail_id: (optional) + A optional filter to return only resources that match the specified id. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A optional filter to return only resources that match the specified lifecycle state. + + Allowed values are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION" + + :param str status: (optional) + A optional filter to return only resources that match the specified sub-state of audit trail. + + Allowed values are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AuditTrailCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_audit_trails API. + """ + resource_path = "/auditTrails" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "audit_trail_id", + "display_name", + "target_id", + "limit", + "page", + "lifecycle_state", + "status", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_audit_trails got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'status' in kwargs: + status_allowed_values = ["STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING"] + if kwargs['status'] not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "auditTrailId": kwargs.get("audit_trail_id", missing), + "displayName": kwargs.get("display_name", missing), + "targetId": kwargs.get("target_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "status": kwargs.get("status", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditTrailCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="AuditTrailCollection") + + def list_available_audit_volumes(self, audit_profile_id, work_request_id, **kwargs): + """ + Retrieves a list of audit trails, and associated audit event volume for each trail up to defined start date. + + + :param str audit_profile_id: (required) + The OCID of the audit. + + :param str work_request_id: (required) + The OCID of the work request. + + :param str trail_location: (optional) + The audit trail location. + + :param datetime month_in_consideration_greater_than: (optional) + Specifying `monthInConsiderationGreaterThan` parameter + will retrieve all items for which the event month is + greater than the date and time specified, + in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T00:00:00.000Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime month_in_consideration_less_than: (optional) + Specifying `monthInConsiderationLessThan` parameter + will retrieve all items for which the event month is + less than the date and time specified, + in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T00:00:00.000Z + + __ https://tools.ietf.org/html/rfc3339 + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order(sortOrder). The default order for all fields is ascending. + + Allowed values are: "monthInConsideration", "volume", "trailLocation" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.AvailableAuditVolumeCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_available_audit_volumes API. + """ + resource_path = "/auditProfiles/{auditProfileId}/availableAuditVolumes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "trail_location", + "month_in_consideration_greater_than", + "month_in_consideration_less_than", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_available_audit_volumes got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditProfileId": audit_profile_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["monthInConsideration", "volume", "trailLocation"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "workRequestId": work_request_id, + "trailLocation": kwargs.get("trail_location", missing), + "monthInConsiderationGreaterThan": kwargs.get("month_in_consideration_greater_than", missing), + "monthInConsiderationLessThan": kwargs.get("month_in_consideration_less_than", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AvailableAuditVolumeCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="AvailableAuditVolumeCollection") + + def list_collected_audit_volumes(self, audit_profile_id, work_request_id, **kwargs): + """ + Gets a list of all collected audit volume data points. + + + :param str audit_profile_id: (required) + The OCID of the audit. + + :param str work_request_id: (required) + The OCID of the work request. + + :param datetime month_in_consideration_greater_than: (optional) + Specifying `monthInConsiderationGreaterThan` parameter + will retrieve all items for which the event month is + greater than the date and time specified, + in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T00:00:00.000Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime month_in_consideration_less_than: (optional) + Specifying `monthInConsiderationLessThan` parameter + will retrieve all items for which the event month is + less than the date and time specified, + in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T00:00:00.000Z + + __ https://tools.ietf.org/html/rfc3339 + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order(sortOrder). The default order for all fields is ascending. + + Allowed values are: "monthInConsideration", "onlineVolume", "archivedVolume" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.CollectedAuditVolumeCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_collected_audit_volumes API. + """ + resource_path = "/auditProfiles/{auditProfileId}/collectedAuditVolumes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "month_in_consideration_greater_than", + "month_in_consideration_less_than", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_collected_audit_volumes got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditProfileId": audit_profile_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["monthInConsideration", "onlineVolume", "archivedVolume"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "workRequestId": work_request_id, + "monthInConsiderationGreaterThan": kwargs.get("month_in_consideration_greater_than", missing), + "monthInConsiderationLessThan": kwargs.get("month_in_consideration_less_than", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CollectedAuditVolumeCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="CollectedAuditVolumeCollection") + + def list_columns(self, target_database_id, **kwargs): + """ + Returns a list of column metadata objects. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param list[str] table_name: (optional) + A filter to return only items related to specific table name. + + :param list[str] column_name: (optional) + A filter to return only a specific column based on column name. + + :param list[str] datatype: (optional) + A filter to return only items related to specific datatype. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + + Allowed values are: "SCHEMANAME", "TABLENAME", "COLUMNNAME", "DATATYPE" + + :param str schema_name_contains: (optional) + A filter to return only items if schema name contains a specific string. + + :param str table_name_contains: (optional) + A filter to return only items if table name contains a specific string. + + :param str column_name_contains: (optional) + A filter to return only items if column name contains a specific string. + + :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 list of :class:`~oci.data_safe.models.ColumnSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_columns API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}/columns" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page", + "schema_name", + "table_name", + "column_name", + "datatype", + "sort_order", + "sort_by", + "schema_name_contains", + "table_name_contains", + "column_name_contains" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_columns got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["SCHEMANAME", "TABLENAME", "COLUMNNAME", "DATATYPE"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "tableName": self.base_client.generate_collection_format_param(kwargs.get("table_name", missing), 'multi'), + "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'), + "datatype": self.base_client.generate_collection_format_param(kwargs.get("datatype", missing), 'multi'), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "schemaNameContains": kwargs.get("schema_name_contains", missing), + "tableNameContains": kwargs.get("table_name_contains", missing), + "columnNameContains": kwargs.get("column_name_contains", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[ColumnSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[ColumnSummary]") + + def list_data_safe_private_endpoints(self, compartment_id, **kwargs): + """ + Gets a list of Data Safe private endpoints. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str vcn_id: (optional) + A filter to return only resources that match the specified VCN OCID. + + :param str lifecycle_state: (optional) + A filter to return only resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :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 list of :class:`~oci.data_safe.models.DataSafePrivateEndpointSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_data_safe_private_endpoints API. + """ + resource_path = "/dataSafePrivateEndpoints" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "display_name", + "vcn_id", + "lifecycle_state", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "compartment_id_in_subtree", + "access_level" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_data_safe_private_endpoints got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", "NA"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "vcnId": kwargs.get("vcn_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[DataSafePrivateEndpointSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[DataSafePrivateEndpointSummary]") + + def list_discovery_analytics(self, compartment_id, **kwargs): + """ + Gets consolidated discovery analytics data based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str group_by: (optional) + Attribute by which the discovery analytics data should be grouped. + + Allowed values are: "targetId", "sensitiveDataModelId" + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str sensitive_data_model_id: (optional) + A filter to return only the resources that match the specified sensitive data model OCID. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.DiscoveryAnalyticsCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_discovery_analytics API. + """ + resource_path = "/discoveryAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "group_by", + "target_id", + "sensitive_data_model_id", + "limit", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_discovery_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'group_by' in kwargs: + group_by_allowed_values = ["targetId", "sensitiveDataModelId"] + if kwargs['group_by'] not in group_by_allowed_values: + raise ValueError( + "Invalid value for `group_by`, must be one of {0}".format(group_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "groupBy": kwargs.get("group_by", missing), + "targetId": kwargs.get("target_id", missing), + "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DiscoveryAnalyticsCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DiscoveryAnalyticsCollection") + + def list_discovery_job_results(self, discovery_job_id, **kwargs): + """ + Gets a list of discovery results based on the specified query parameters. + + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param str discovery_type: (optional) + A filter to return only the resources that match the specified discovery type. + + Allowed values are: "ALL", "NEW", "MODIFIED", "DELETED" + + :param str planned_action: (optional) + A filter to return only the resources that match the specified planned action. + + Allowed values are: "NONE", "ACCEPT", "INVALIDATE", "REJECT" + + :param bool is_result_applied: (optional) + A filter to return the discovery result resources based on the value of their isResultApplied attribute. + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param list[str] object_name: (optional) + A filter to return only items related to a specific object name. + + :param list[str] column_name: (optional) + A filter to return only a specific column based on column name. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeFinished is descending. + The default order for discoveryType, schemaName, objectName, columnName and plannedAction is ascending. + + Allowed values are: "discoveryType", "timeFinished", "schemaName", "objectName", "columnName", "plannedAction" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. 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.data_safe.models.DiscoveryJobResultCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_discovery_job_results API. + """ + resource_path = "/discoveryJobs/{discoveryJobId}/results" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "discovery_type", + "planned_action", + "is_result_applied", + "schema_name", + "object_name", + "column_name", + "sort_order", + "sort_by", + "opc_request_id", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_discovery_job_results got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'discovery_type' in kwargs: + discovery_type_allowed_values = ["ALL", "NEW", "MODIFIED", "DELETED"] + if kwargs['discovery_type'] not in discovery_type_allowed_values: + raise ValueError( + "Invalid value for `discovery_type`, must be one of {0}".format(discovery_type_allowed_values) + ) + + if 'planned_action' in kwargs: + planned_action_allowed_values = ["NONE", "ACCEPT", "INVALIDATE", "REJECT"] + if kwargs['planned_action'] not in planned_action_allowed_values: + raise ValueError( + "Invalid value for `planned_action`, must be one of {0}".format(planned_action_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["discoveryType", "timeFinished", "schemaName", "objectName", "columnName", "plannedAction"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "discoveryType": kwargs.get("discovery_type", missing), + "plannedAction": kwargs.get("planned_action", missing), + "isResultApplied": kwargs.get("is_result_applied", missing), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'), + "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="DiscoveryJobResultCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="DiscoveryJobResultCollection") + + def list_discovery_jobs(self, compartment_id, **kwargs): + """ + Gets a list of incremental discovery jobs based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str discovery_job_id: (optional) + A filter to return only the resources that match the specified discovery job OCID. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str lifecycle_state: (optional) + A filter to return only the resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :param str sensitive_data_model_id: (optional) + A filter to return only the resources that match the specified sensitive data model OCID. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeFinished is descending. + The default order for displayName is ascending. + + Allowed values are: "timeStarted", "displayName" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. 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.data_safe.models.DiscoveryJobCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_discovery_jobs API. + """ + resource_path = "/discoveryJobs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "discovery_job_id", + "target_id", + "lifecycle_state", + "sensitive_data_model_id", + "sort_order", + "sort_by", + "opc_request_id", + "limit", + "page" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_discovery_jobs got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeStarted", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "discoveryJobId": kwargs.get("discovery_job_id", missing), + "targetId": kwargs.get("target_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + 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="DiscoveryJobCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="DiscoveryJobCollection") + + def list_findings(self, security_assessment_id, **kwargs): + """ + List all the findings from all the targets in the specified assessment. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str severity: (optional) + A filter to return only findings of a particular risk level. + + Allowed values are: "HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str finding_key: (optional) + Each finding has a key. This key is same for the finding across targets + + :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 list of :class:`~oci.data_safe.models.FindingSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_findings API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/findings" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "severity", + "limit", + "page", + "compartment_id_in_subtree", + "access_level", + "finding_key" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_findings got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'severity' in kwargs: + severity_allowed_values = ["HIGH", "MEDIUM", "LOW", "EVALUATE", "ADVISORY", "PASS"] + if kwargs['severity'] not in severity_allowed_values: + raise ValueError( + "Invalid value for `severity`, must be one of {0}".format(severity_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "severity": kwargs.get("severity", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "findingKey": kwargs.get("finding_key", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[FindingSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[FindingSummary]") + + def list_grants(self, user_assessment_id, user_key, **kwargs): + """ + Gets a list of grants for a particular user in the specified user assessment. A user grant contains details such as the + privilege name, type, category, and depth level. The depth level indicates how deep in the hierarchy of roles granted to + roles a privilege grant is. The userKey in this operation is a system-generated identifier. Perform the operation ListUsers + to get the userKey for a particular user. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param str user_key: (required) + The unique user key. This is a system-generated identifier. ListUsers gets the user key for a user. + + :param str grant_key: (optional) + A filter to return only items that match the specified user grant key. + + :param str grant_name: (optional) + A filter to return only items that match the specified user grant name. + + :param str privilege_type: (optional) + A filter to return only items that match the specified privilege grant type. + + :param str privilege_category: (optional) + A filter to return only items that match the specified user privilege category. + + :param int depth_level: (optional) + A filter to return only items that match the specified user grant depth level. + + :param int depth_level_greater_than_or_equal_to: (optional) + A filter to return only items that are at a level greater than or equal to the specified user grant depth level. + + :param int depth_level_less_than: (optional) + A filter to return only items that are at a level less than the specified user grant depth level. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for grantName is ascending. + + Allowed values are: "grantName", "grantType", "privilegeCategory", "depthLevel", "key" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 list of :class:`~oci.data_safe.models.GrantSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_grants API. + """ + resource_path = "/userAssessments/{userAssessmentId}/users/{userKey}/grants" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "grant_key", + "grant_name", + "privilege_type", + "privilege_category", + "depth_level", + "depth_level_greater_than_or_equal_to", + "depth_level_less_than", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_grants got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id, + "userKey": user_key + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["grantName", "grantType", "privilegeCategory", "depthLevel", "key"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "grantKey": kwargs.get("grant_key", missing), + "grantName": kwargs.get("grant_name", missing), + "privilegeType": kwargs.get("privilege_type", missing), + "privilegeCategory": kwargs.get("privilege_category", missing), + "depthLevel": kwargs.get("depth_level", missing), + "depthLevelGreaterThanOrEqualTo": kwargs.get("depth_level_greater_than_or_equal_to", missing), + "depthLevelLessThan": kwargs.get("depth_level_less_than", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[GrantSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[GrantSummary]") + + def list_library_masking_formats(self, compartment_id, **kwargs): + """ + Gets a list of library masking formats based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str library_masking_format_id: (optional) + A filter to return only the resources that match the specified library masking format OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A filter to return only the resources that match the specified lifecycle states. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param str library_masking_format_source: (optional) + A filter to return the library masking format resources based on the value of their source attribute. + + Allowed values are: "ORACLE", "USER" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + The default order for displayName is ascending. The displayName sort order is case sensitive. + + Allowed values are: "displayName", "timeCreated" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.LibraryMaskingFormatCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_library_masking_formats API. + """ + resource_path = "/libraryMaskingFormats" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "library_masking_format_id", + "compartment_id_in_subtree", + "access_level", + "display_name", + "limit", + "page", + "lifecycle_state", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "library_masking_format_source", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_library_masking_formats got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'library_masking_format_source' in kwargs: + library_masking_format_source_allowed_values = ["ORACLE", "USER"] + if kwargs['library_masking_format_source'] not in library_masking_format_source_allowed_values: + raise ValueError( + "Invalid value for `library_masking_format_source`, must be one of {0}".format(library_masking_format_source_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["displayName", "timeCreated"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "libraryMaskingFormatId": kwargs.get("library_masking_format_id", missing), + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "libraryMaskingFormatSource": kwargs.get("library_masking_format_source", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="LibraryMaskingFormatCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="LibraryMaskingFormatCollection") + + def list_masked_columns(self, masking_report_id, **kwargs): + """ + Gets a list of masked columns present in the specified masking report and based on the specified query parameters. + + + :param str masking_report_id: (required) + The OCID of the masking report. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for all the fields is ascending. + + Allowed values are: "schemaName", "objectName" + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param list[str] object_name: (optional) + A filter to return only items related to a specific object name. + + :param list[str] column_name: (optional) + A filter to return only a specific column based on column name. + + :param list[str] object_type: (optional) + A filter to return only items related to a specific object type. + + Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW" + + :param list[str] masking_column_group: (optional) + A filter to return only the resources that match the specified masking column group. + + :param str sensitive_type_id: (optional) + A filter to return only items related to a specific sensitive type OCID. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskedColumnCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_masked_columns API. + """ + resource_path = "/maskingReports/{maskingReportId}/maskedColumns" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "sort_order", + "sort_by", + "schema_name", + "object_name", + "column_name", + "object_type", + "masking_column_group", + "sensitive_type_id", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_masked_columns got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingReportId": masking_report_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["schemaName", "objectName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'object_type' in kwargs: + object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"] + for object_type_item in kwargs['object_type']: + if object_type_item not in object_type_allowed_values: + raise ValueError( + "Invalid value for `object_type`, must be one of {0}".format(object_type_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'), + "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'), + "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'), + "maskingColumnGroup": self.base_client.generate_collection_format_param(kwargs.get("masking_column_group", missing), 'multi'), + "sensitiveTypeId": kwargs.get("sensitive_type_id", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="MaskedColumnCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="MaskedColumnCollection") + + def list_masking_analytics(self, compartment_id, **kwargs): + """ + Gets consolidated masking analytics data based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str group_by: (optional) + Attribute by which the masking analytics data should be grouped. + + Allowed values are: "targetId", "policyId" + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str masking_policy_id: (optional) + A filter to return only the resources that match the specified masking policy OCID. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskingAnalyticsCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_masking_analytics API. + """ + resource_path = "/maskingAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "group_by", + "target_id", + "masking_policy_id", + "limit", + "page", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_masking_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'group_by' in kwargs: + group_by_allowed_values = ["targetId", "policyId"] + if kwargs['group_by'] not in group_by_allowed_values: + raise ValueError( + "Invalid value for `group_by`, must be one of {0}".format(group_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "groupBy": kwargs.get("group_by", missing), + "targetId": kwargs.get("target_id", missing), + "maskingPolicyId": kwargs.get("masking_policy_id", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="MaskingAnalyticsCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="MaskingAnalyticsCollection") + + def list_masking_columns(self, masking_policy_id, **kwargs): + """ + Gets a list of masking columns present in the specified masking policy and based on the specified query parameters. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + The default order for other fields is ascending. + + Allowed values are: "timeCreated", "schemaName", "objectName" + + :param str masking_column_lifecycle_state: (optional) + A filter to return only the resources that match the specified lifecycle states. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED" + + :param list[str] data_type: (optional) + A filter to return only resources that match the specified data types. + + Allowed values are: "CHARACTER", "DATE", "LOB", "NUMERIC" + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param list[str] object_name: (optional) + A filter to return only items related to a specific object name. + + :param list[str] column_name: (optional) + A filter to return only a specific column based on column name. + + :param list[str] object_type: (optional) + A filter to return only items related to a specific object type. + + Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW" + + :param list[str] masking_column_group: (optional) + A filter to return only the resources that match the specified masking column group. + + :param str sensitive_type_id: (optional) + A filter to return only items related to a specific sensitive type OCID. + + :param bool is_masking_enabled: (optional) + A filter to return the masking column resources based on the value of their isMaskingEnabled attribute. + A value of true returns only those columns for which masking is enabled. A value of false returns only those columns + for which masking is disabled. Omitting this parameter returns all the masking columns in a masking policy. + + :param bool is_seed_required: (optional) + A filter to return masking columns based on whether the assigned masking formats need a + seed value for masking. A value of true returns those masking columns that are using + Deterministic Encryption or Deterministic Substitution masking format. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param datetime time_updated_greater_than_or_equal_to: (optional) + Search for resources that were updated after a specific date. + Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo` + parameter will retrieve all resources updated after the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + :param datetime time_updated_less_than: (optional) + Search for resources that were updated before a specific date. + Specifying this parameter corresponding `timeUpdatedLessThan` + parameter will retrieve all resources updated before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskingColumnCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_masking_columns API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "sort_order", + "sort_by", + "masking_column_lifecycle_state", + "data_type", + "schema_name", + "object_name", + "column_name", + "object_type", + "masking_column_group", + "sensitive_type_id", + "is_masking_enabled", + "is_seed_required", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "time_updated_greater_than_or_equal_to", + "time_updated_less_than", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_masking_columns got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "schemaName", "objectName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'masking_column_lifecycle_state' in kwargs: + masking_column_lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"] + if kwargs['masking_column_lifecycle_state'] not in masking_column_lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `masking_column_lifecycle_state`, must be one of {0}".format(masking_column_lifecycle_state_allowed_values) + ) + + if 'data_type' in kwargs: + data_type_allowed_values = ["CHARACTER", "DATE", "LOB", "NUMERIC"] + for data_type_item in kwargs['data_type']: + if data_type_item not in data_type_allowed_values: + raise ValueError( + "Invalid value for `data_type`, must be one of {0}".format(data_type_allowed_values) + ) + + if 'object_type' in kwargs: + object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"] + for object_type_item in kwargs['object_type']: + if object_type_item not in object_type_allowed_values: + raise ValueError( + "Invalid value for `object_type`, must be one of {0}".format(object_type_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "maskingColumnLifecycleState": kwargs.get("masking_column_lifecycle_state", missing), + "dataType": self.base_client.generate_collection_format_param(kwargs.get("data_type", missing), 'multi'), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'), + "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'), + "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'), + "maskingColumnGroup": self.base_client.generate_collection_format_param(kwargs.get("masking_column_group", missing), 'multi'), + "sensitiveTypeId": kwargs.get("sensitive_type_id", missing), + "isMaskingEnabled": kwargs.get("is_masking_enabled", missing), + "isSeedRequired": kwargs.get("is_seed_required", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing), + "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="MaskingColumnCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="MaskingColumnCollection") + + def list_masking_policies(self, compartment_id, **kwargs): + """ + Gets a list of masking policies based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str masking_policy_id: (optional) + A filter to return only the resources that match the specified masking policy OCID. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A filter to return only the resources that match the specified lifecycle states. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + The default order for displayName is ascending. The displayName sort order is case sensitive. + + Allowed values are: "displayName", "timeCreated" + + :param str sensitive_data_model_id: (optional) + A filter to return only the resources that match the specified sensitive data model OCID. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.MaskingPolicyCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_masking_policies API. + """ + resource_path = "/maskingPolicies" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "masking_policy_id", + "display_name", + "limit", + "page", + "lifecycle_state", + "sort_order", + "sort_by", + "sensitive_data_model_id", + "target_id", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "compartment_id_in_subtree", + "access_level", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_masking_policies got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["displayName", "timeCreated"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "maskingPolicyId": kwargs.get("masking_policy_id", missing), + "compartmentId": compartment_id, + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing), + "targetId": kwargs.get("target_id", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="MaskingPolicyCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="MaskingPolicyCollection") + + def list_masking_reports(self, compartment_id, **kwargs): + """ + Gets a list of masking reports based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str masking_policy_id: (optional) + A filter to return only the resources that match the specified masking policy OCID. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeMaskingFinished is descending. + + Allowed values are: "timeMaskingFinished" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :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.data_safe.models.MaskingReportCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_masking_reports API. + """ + resource_path = "/maskingReports" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "masking_policy_id", + "target_id", + "sort_order", + "sort_by", + "opc_request_id", + "compartment_id_in_subtree", + "access_level" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_masking_reports got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeMaskingFinished"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "maskingPolicyId": kwargs.get("masking_policy_id", missing), + "targetId": kwargs.get("target_id", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="MaskingReportCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="MaskingReportCollection") + + def list_on_prem_connectors(self, compartment_id, **kwargs): + """ + Gets a list of on-premises connectors. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str on_prem_connector_id: (optional) + A filter to return only the on-premises connector that matches the specified id. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str on_prem_connector_lifecycle_state: (optional) + A filter to return only on-premises connector resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :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 list of :class:`~oci.data_safe.models.OnPremConnectorSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_on_prem_connectors API. + """ + resource_path = "/onPremConnectors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "on_prem_connector_id", + "display_name", + "on_prem_connector_lifecycle_state", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "compartment_id_in_subtree", + "access_level" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_on_prem_connectors got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'on_prem_connector_lifecycle_state' in kwargs: + on_prem_connector_lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "FAILED"] + if kwargs['on_prem_connector_lifecycle_state'] not in on_prem_connector_lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `on_prem_connector_lifecycle_state`, must be one of {0}".format(on_prem_connector_lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "onPremConnectorId": kwargs.get("on_prem_connector_id", missing), + "displayName": kwargs.get("display_name", missing), + "onPremConnectorLifecycleState": kwargs.get("on_prem_connector_lifecycle_state", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[OnPremConnectorSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[OnPremConnectorSummary]") + + def list_report_definitions(self, compartment_id, **kwargs): + """ + Gets a list of report definitions. + The ListReportDefinitions operation returns only the report definitions in the specified `compartmentId`. + It also returns the seeded report definitions which are available to all the compartments. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + The name of the report definition to query. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME", "DISPLAYORDER" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param bool is_seeded: (optional) + A boolean flag indicating to list seeded report definitions. Set this parameter to get list of seeded report definitions. + + :param str data_source: (optional) + Specifies the name of a resource that provides data for the report. For example alerts, events. + + Allowed values are: "EVENTS", "ALERTS" + + :param str lifecycle_state: (optional) + An optional filter to return only resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED" + + :param str category: (optional) + An optional filter to return only resources that match the specified category. + + Allowed values are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING" + + :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.data_safe.models.ReportDefinitionCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_report_definitions API. + """ + resource_path = "/reportDefinitions" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "is_seeded", + "data_source", + "lifecycle_state", + "category" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_report_definitions got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME", "DISPLAYORDER"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'data_source' in kwargs: + data_source_allowed_values = ["EVENTS", "ALERTS"] + if kwargs['data_source'] not in data_source_allowed_values: + raise ValueError( + "Invalid value for `data_source`, must be one of {0}".format(data_source_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'category' in kwargs: + category_allowed_values = ["CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"] + if kwargs['category'] not in category_allowed_values: + raise ValueError( + "Invalid value for `category`, must be one of {0}".format(category_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "isSeeded": kwargs.get("is_seeded", missing), + "dataSource": kwargs.get("data_source", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "category": kwargs.get("category", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ReportDefinitionCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ReportDefinitionCollection") + + def list_reports(self, compartment_id, **kwargs): + """ + Gets a list of all the reports in the compartment. It contains information such as report generation time. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + The name of the report definition to query. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. Only one sort order may be provided. Default order for timeGenerated is descending. Default order for displayName is ascending. If no value is specified timeGenerated is default. + + Allowed values are: "timeGenerated", "displayName" + + :param str report_definition_id: (optional) + The ID of the report definition to filter the list of reports + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str lifecycle_state: (optional) + An optional filter to return only resources that match the specified lifecycle state. + + Allowed values are: "UPDATING", "ACTIVE" + + :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.data_safe.models.ReportCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_reports API. + """ + resource_path = "/reports" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "limit", + "page", + "sort_order", + "sort_by", + "report_definition_id", + "opc_request_id", + "lifecycle_state" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_reports got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeGenerated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["UPDATING", "ACTIVE"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "reportDefinitionId": kwargs.get("report_definition_id", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ReportCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ReportCollection") + + def list_roles(self, target_database_id, **kwargs): + """ + Returns a list of role metadata objects. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param list[str] role_name: (optional) + A filter to return only a specific role based on role name. + + :param bool is_oracle_maintained: (optional) + A filter to return roles based on whether they are maintained by oracle or not. + + :param str authentication_type: (optional) + A filter to return roles based on authentication type. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + + Allowed values are: "ROLENAME" + + :param str role_name_contains: (optional) + A filter to return only items if role name contains a specific string. + + :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 list of :class:`~oci.data_safe.models.RoleSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_roles API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}/roles" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page", + "role_name", + "is_oracle_maintained", + "authentication_type", + "sort_order", + "sort_by", + "role_name_contains" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_roles got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["ROLENAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "roleName": self.base_client.generate_collection_format_param(kwargs.get("role_name", missing), 'multi'), + "isOracleMaintained": kwargs.get("is_oracle_maintained", missing), + "authenticationType": kwargs.get("authentication_type", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "roleNameContains": kwargs.get("role_name_contains", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[RoleSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[RoleSummary]") + + def list_schemas(self, target_database_id, **kwargs): + """ + Returns list of schema. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + + Allowed values are: "SCHEMANAME" + + :param bool is_oracle_maintained: (optional) + A filter to return only items related to specific type of schema. + + :param str schema_name_contains: (optional) + A filter to return only items if schema name contains a specific string. + + :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 list of :class:`~oci.data_safe.models.SchemaSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_schemas API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}/schemas" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page", + "schema_name", + "sort_order", + "sort_by", + "is_oracle_maintained", + "schema_name_contains" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_schemas got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["SCHEMANAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "isOracleMaintained": kwargs.get("is_oracle_maintained", missing), + "schemaNameContains": kwargs.get("schema_name_contains", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[SchemaSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[SchemaSummary]") + + def list_security_assessments(self, compartment_id, **kwargs): + """ + Gets a list of security assessments. + + The ListSecurityAssessments operation returns only the assessments in the specified `compartmentId`. + The list does not include any subcompartments of the compartmentId passed. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform ListSecurityAssessments on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str type: (optional) + A filter to return only items that match the specified security assessment type. + + Allowed values are: "LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT" + + :param str schedule_assessment_id: (optional) + The OCID of the security assessment of type SAVE_SCHEDULE. + + :param bool is_schedule_assessment: (optional) + A filter to return only security assessments of type save schedule. + + :param str triggered_by: (optional) + A filter to return only security asessments that were created by either user or system. + + Allowed values are: "USER", "SYSTEM" + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param bool is_baseline: (optional) + A filter to return only security assessments that are set as baseline. + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order(sortOrder). The default order for timeCreated is descending. + + Allowed values are: "timeCreated", "displayName" + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A filter to return only resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED" + + :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 list of :class:`~oci.data_safe.models.SecurityAssessmentSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_security_assessments API. + """ + resource_path = "/securityAssessments" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "type", + "schedule_assessment_id", + "is_schedule_assessment", + "triggered_by", + "target_id", + "sort_order", + "is_baseline", + "sort_by", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "opc_request_id", + "limit", + "page", + "lifecycle_state" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_security_assessments got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'type' in kwargs: + type_allowed_values = ["LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT"] + if kwargs['type'] not in type_allowed_values: + raise ValueError( + "Invalid value for `type`, must be one of {0}".format(type_allowed_values) + ) + + if 'triggered_by' in kwargs: + triggered_by_allowed_values = ["USER", "SYSTEM"] + if kwargs['triggered_by'] not in triggered_by_allowed_values: + raise ValueError( + "Invalid value for `triggered_by`, must be one of {0}".format(triggered_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "type": kwargs.get("type", missing), + "scheduleAssessmentId": kwargs.get("schedule_assessment_id", missing), + "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing), + "triggeredBy": kwargs.get("triggered_by", missing), + "targetId": kwargs.get("target_id", missing), + "sortOrder": kwargs.get("sort_order", missing), + "isBaseline": kwargs.get("is_baseline", missing), + "sortBy": kwargs.get("sort_by", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[SecurityAssessmentSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[SecurityAssessmentSummary]") + + def list_sensitive_columns(self, sensitive_data_model_id, **kwargs): + """ + Gets a list of sensitive columns present in the specified sensitive data model based on the specified query parameters. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param datetime time_updated_greater_than_or_equal_to: (optional) + Search for resources that were updated after a specific date. + Specifying this parameter corresponding `timeUpdatedGreaterThanOrEqualTo` + parameter will retrieve all resources updated after the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + :param datetime time_updated_less_than: (optional) + Search for resources that were updated before a specific date. + Specifying this parameter corresponding `timeUpdatedLessThan` + parameter will retrieve all resources updated before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + :param str sensitive_column_lifecycle_state: (optional) + Filters the sensitive column resources with the given lifecycle state values. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED" + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param list[str] object_name: (optional) + A filter to return only items related to a specific object name. + + :param list[str] column_name: (optional) + A filter to return only a specific column based on column name. + + :param list[str] object_type: (optional) + A filter to return only items related to a specific object type. + + Allowed values are: "ALL", "TABLE", "EDITIONING_VIEW" + + :param list[str] data_type: (optional) + A filter to return only the resources that match the specified data types. + + :param list[str] status: (optional) + A filter to return only the sensitive columns that match the specified status. + + Allowed values are: "VALID", "INVALID" + + :param list[str] sensitive_type_id: (optional) + A filter to return only the sensitive columns that are associated with one of the sensitive types identified by the specified OCIDs. + + :param list[str] parent_column_key: (optional) + A filter to return only the sensitive columns that are children of one of the columns identified by the specified keys. + + :param list[str] relation_type: (optional) + A filter to return sensitive columns based on their relationship with their parent columns. If set to NONE, + it returns the sensitive columns that do not have any parent. The response includes the parent columns as + well as the independent columns that are not in any relationship. If set to APP_DEFINED, it returns all the + child columns that have application-level (non-dictionary) relationship with their parents. If set to DB_DEFINED, + it returns all the child columns that have database-level (dictionary-defined) relationship with their parents. + + Allowed values are: "NONE", "APP_DEFINED", "DB_DEFINED" + + :param str column_group: (optional) + A filter to return only the sensitive columns that belong to the specified column group. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + The default order for schemaName, objectName, and columnName is ascending. + + Allowed values are: "timeCreated", "schemaName", "objectName", "columnName" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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.data_safe.models.SensitiveColumnCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sensitive_columns API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "time_updated_greater_than_or_equal_to", + "time_updated_less_than", + "sensitive_column_lifecycle_state", + "schema_name", + "object_name", + "column_name", + "object_type", + "data_type", + "status", + "sensitive_type_id", + "parent_column_key", + "relation_type", + "column_group", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_sensitive_columns got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sensitive_column_lifecycle_state' in kwargs: + sensitive_column_lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"] + if kwargs['sensitive_column_lifecycle_state'] not in sensitive_column_lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `sensitive_column_lifecycle_state`, must be one of {0}".format(sensitive_column_lifecycle_state_allowed_values) + ) + + if 'object_type' in kwargs: + object_type_allowed_values = ["ALL", "TABLE", "EDITIONING_VIEW"] + for object_type_item in kwargs['object_type']: + if object_type_item not in object_type_allowed_values: + raise ValueError( + "Invalid value for `object_type`, must be one of {0}".format(object_type_allowed_values) + ) + + if 'status' in kwargs: + status_allowed_values = ["VALID", "INVALID"] + for status_item in kwargs['status']: + if status_item not in status_allowed_values: + raise ValueError( + "Invalid value for `status`, must be one of {0}".format(status_allowed_values) + ) + + if 'relation_type' in kwargs: + relation_type_allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + for relation_type_item in kwargs['relation_type']: + if relation_type_item not in relation_type_allowed_values: + raise ValueError( + "Invalid value for `relation_type`, must be one of {0}".format(relation_type_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "schemaName", "objectName", "columnName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing), + "timeUpdatedLessThan": kwargs.get("time_updated_less_than", missing), + "sensitiveColumnLifecycleState": kwargs.get("sensitive_column_lifecycle_state", missing), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "objectName": self.base_client.generate_collection_format_param(kwargs.get("object_name", missing), 'multi'), + "columnName": self.base_client.generate_collection_format_param(kwargs.get("column_name", missing), 'multi'), + "objectType": self.base_client.generate_collection_format_param(kwargs.get("object_type", missing), 'multi'), + "dataType": self.base_client.generate_collection_format_param(kwargs.get("data_type", missing), 'multi'), + "status": self.base_client.generate_collection_format_param(kwargs.get("status", missing), 'multi'), + "sensitiveTypeId": self.base_client.generate_collection_format_param(kwargs.get("sensitive_type_id", missing), 'multi'), + "parentColumnKey": self.base_client.generate_collection_format_param(kwargs.get("parent_column_key", missing), 'multi'), + "relationType": self.base_client.generate_collection_format_param(kwargs.get("relation_type", missing), 'multi'), + "columnGroup": kwargs.get("column_group", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="SensitiveColumnCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="SensitiveColumnCollection") + + def list_sensitive_data_models(self, compartment_id, **kwargs): + """ + Gets a list of sensitive data models based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str sensitive_data_model_id: (optional) + A filter to return only the resources that match the specified sensitive data model OCID. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + The default order for displayName is ascending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A filter to return only the resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :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.data_safe.models.SensitiveDataModelCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sensitive_data_models API. + """ + resource_path = "/sensitiveDataModels" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "sensitive_data_model_id", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "target_id", + "sort_order", + "sort_by", + "opc_request_id", + "limit", + "page", + "lifecycle_state" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_sensitive_data_models got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "sensitiveDataModelId": kwargs.get("sensitive_data_model_id", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "targetId": kwargs.get("target_id", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SensitiveDataModelCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SensitiveDataModelCollection") + + def list_sensitive_types(self, compartment_id, **kwargs): + """ + Gets a list of sensitive types based on the specified query parameters. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str sensitive_type_id: (optional) + A filter to return only items related to a specific sensitive type OCID. + + :param str sensitive_type_source: (optional) + A filter to return the sensitive type resources based on the value of their source attribute. + + Allowed values are: "ORACLE", "USER" + + :param str entity_type: (optional) + A filter to return the sensitive type resources based on the value of their entityType attribute. + + Allowed values are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + + :param str parent_category_id: (optional) + A filter to return only the sensitive types that are children of the sensitive category identified by the specified OCID. + + :param str default_masking_format_id: (optional) + A filter to return only the sensitive types that have the default masking format identified by the specified OCID. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + The default order for displayName is ascending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + A filter to return only the resources that match the specified lifecycle state. + + Allowed values are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + + :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.data_safe.models.SensitiveTypeCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_sensitive_types API. + """ + resource_path = "/sensitiveTypes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "sensitive_type_id", + "sensitive_type_source", + "entity_type", + "parent_category_id", + "default_masking_format_id", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "sort_order", + "sort_by", + "opc_request_id", + "limit", + "page", + "lifecycle_state" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_sensitive_types got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sensitive_type_source' in kwargs: + sensitive_type_source_allowed_values = ["ORACLE", "USER"] + if kwargs['sensitive_type_source'] not in sensitive_type_source_allowed_values: + raise ValueError( + "Invalid value for `sensitive_type_source`, must be one of {0}".format(sensitive_type_source_allowed_values) + ) + + if 'entity_type' in kwargs: + entity_type_allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"] + if kwargs['entity_type'] not in entity_type_allowed_values: + raise ValueError( + "Invalid value for `entity_type`, must be one of {0}".format(entity_type_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "sensitiveTypeId": kwargs.get("sensitive_type_id", missing), + "sensitiveTypeSource": kwargs.get("sensitive_type_source", missing), + "entityType": kwargs.get("entity_type", missing), + "parentCategoryId": kwargs.get("parent_category_id", missing), + "defaultMaskingFormatId": kwargs.get("default_masking_format_id", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SensitiveTypeCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="SensitiveTypeCollection") + + def list_tables(self, target_database_id, **kwargs): + """ + Returns a list of table metadata objects. + + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param list[str] schema_name: (optional) + A filter to return only items related to specific schema name. + + :param list[str] table_name: (optional) + A filter to return only items related to specific table name. + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + + Allowed values are: "SCHEMANAME", "TABLENAME" + + :param str table_name_contains: (optional) + A filter to return only items if table name contains a specific string. + + :param str schema_name_contains: (optional) + A filter to return only items if schema name contains a specific string. + + :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 list of :class:`~oci.data_safe.models.TableSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_tables API. + """ + resource_path = "/targetDatabases/{targetDatabaseId}/tables" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "limit", + "page", + "schema_name", + "table_name", + "sort_order", + "sort_by", + "table_name_contains", + "schema_name_contains" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_tables got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "targetDatabaseId": target_database_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["SCHEMANAME", "TABLENAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "schemaName": self.base_client.generate_collection_format_param(kwargs.get("schema_name", missing), 'multi'), + "tableName": self.base_client.generate_collection_format_param(kwargs.get("table_name", missing), 'multi'), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "tableNameContains": kwargs.get("table_name_contains", missing), + "schemaNameContains": kwargs.get("schema_name_contains", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[TableSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[TableSummary]") + + def list_target_alert_policy_associations(self, compartment_id, **kwargs): + """ + Gets a list of all target-alert policy associations. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str target_alert_policy_association_id: (optional) + A filter to return only items related to a specific target-alert policy association ID. + + :param str alert_policy_id: (optional) + A filter to return policy by it's OCID. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str lifecycle_state: (optional) + An optional filter to return only alert policies that have the given life-cycle state. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only the resources that were created after the specified date and time, as defined by `RFC3339`__. + Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all resources created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :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.data_safe.models.TargetAlertPolicyAssociationCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_target_alert_policy_associations API. + """ + resource_path = "/targetAlertPolicyAssociations" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "target_alert_policy_association_id", + "alert_policy_id", + "target_id", + "lifecycle_state", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "compartment_id_in_subtree", + "access_level" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_target_alert_policy_associations got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + query_params = { + "targetAlertPolicyAssociationId": kwargs.get("target_alert_policy_association_id", missing), + "alertPolicyId": kwargs.get("alert_policy_id", missing), + "targetId": kwargs.get("target_id", missing), + "compartmentId": compartment_id, + "lifecycleState": kwargs.get("lifecycle_state", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="TargetAlertPolicyAssociationCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="TargetAlertPolicyAssociationCollection") + + def list_target_databases(self, compartment_id, **kwargs): + """ + Returns the list of registered target databases in Data Safe. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param str associated_resource_id: (optional) + A filter to return the target databases that are associated to the resource id passed in as a parameter value. + + :param str target_database_id: (optional) + A filter to return the target database that matches the specified OCID. + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str lifecycle_state: (optional) + A filter to return the target databases that matches the current state of the target database. + + Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" + + :param str database_type: (optional) + A filter to return target databases that match the database type of the target database. + + Allowed values are: "DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE" + + :param str infrastructure_type: (optional) + A filter to return target databases that match the infrastructure type of the target database. + + Allowed values are: "ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. + The DISPLAYNAME sort order is case sensitive. + + Allowed values are: "TIMECREATED", "DISPLAYNAME" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 list of :class:`~oci.data_safe.models.TargetDatabaseSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_target_databases API. + """ + resource_path = "/targetDatabases" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "associated_resource_id", + "target_database_id", + "display_name", + "lifecycle_state", + "database_type", + "infrastructure_type", + "limit", + "page", + "compartment_id_in_subtree", + "access_level", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_target_databases got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'database_type' in kwargs: + database_type_allowed_values = ["DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"] + if kwargs['database_type'] not in database_type_allowed_values: + raise ValueError( + "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) + ) + + if 'infrastructure_type' in kwargs: + infrastructure_type_allowed_values = ["ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD"] + if kwargs['infrastructure_type'] not in infrastructure_type_allowed_values: + raise ValueError( + "Invalid value for `infrastructure_type`, must be one of {0}".format(infrastructure_type_allowed_values) + ) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "associatedResourceId": kwargs.get("associated_resource_id", missing), + "targetDatabaseId": kwargs.get("target_database_id", missing), + "displayName": kwargs.get("display_name", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "databaseType": kwargs.get("database_type", missing), + "infrastructureType": kwargs.get("infrastructure_type", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[TargetDatabaseSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[TargetDatabaseSummary]") + + def list_user_analytics(self, user_assessment_id, **kwargs): + """ + Gets a list of aggregated user details from the specified user assessment. This provides information about the overall state + of database user security. For example, the user details include how many users have the DBA role and how many users are in + the critical category. This data is especially useful content for dashboards or to support analytics. + + When you perform the ListUserAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the + parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT + permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the + root compartment. If the requestor does not have access to at least one subcompartment of the compartment specified by + compartmentId, then \"Not Authorized\" is returned. + + The parameter compartmentIdInSubtree applies when you perform ListUserAnalytics on the compartmentId passed and when it is + set to true, the entire hierarchy of compartments can be returned. + + To use ListUserAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment, + set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str user_category: (optional) + A filter to return only items that match the specified user category. + + :param str user_key: (optional) + A filter to return only items that match the specified user key. + + :param str account_status: (optional) + A filter to return only items that match the specified account status. + + :param str authentication_type: (optional) + A filter to return only items that match the specified authentication type. + + :param str user_name: (optional) + A filter to return only items that match the specified user name. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param datetime time_last_login_greater_than_or_equal_to: (optional) + A filter to return users whose last login time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_last_login_less_than: (optional) + A filter to return users whose last login time in the database is less than the date and time specified, in the format defined by `RFC3339`__. + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_user_created_greater_than_or_equal_to: (optional) + A filter to return users whose creation time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_user_created_less_than: (optional) + A filter to return users whose creation time in the database is less than the date and time specified, in the format defined by `RFC3339`__. + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_password_last_changed_greater_than_or_equal_to: (optional) + A filter to return users whose last password change in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_password_last_changed_less_than: (optional) + A filter to return users whose last password change in the database is less than the date and time specified, in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending. + + Allowed values are: "userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 list of :class:`~oci.data_safe.models.UserAggregation` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_user_analytics API. + """ + resource_path = "/userAssessments/{userAssessmentId}/userAnalytics" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "limit", + "user_category", + "user_key", + "account_status", + "authentication_type", + "user_name", + "target_id", + "time_last_login_greater_than_or_equal_to", + "time_last_login_less_than", + "time_user_created_greater_than_or_equal_to", + "time_user_created_less_than", + "time_password_last_changed_greater_than_or_equal_to", + "time_password_last_changed_less_than", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_user_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "limit": kwargs.get("limit", missing), + "userCategory": kwargs.get("user_category", missing), + "userKey": kwargs.get("user_key", missing), + "accountStatus": kwargs.get("account_status", missing), + "authenticationType": kwargs.get("authentication_type", missing), + "userName": kwargs.get("user_name", missing), + "targetId": kwargs.get("target_id", missing), + "timeLastLoginGreaterThanOrEqualTo": kwargs.get("time_last_login_greater_than_or_equal_to", missing), + "timeLastLoginLessThan": kwargs.get("time_last_login_less_than", missing), + "timeUserCreatedGreaterThanOrEqualTo": kwargs.get("time_user_created_greater_than_or_equal_to", missing), + "timeUserCreatedLessThan": kwargs.get("time_user_created_less_than", missing), + "timePasswordLastChangedGreaterThanOrEqualTo": kwargs.get("time_password_last_changed_greater_than_or_equal_to", missing), + "timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[UserAggregation]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[UserAggregation]") + + def list_user_assessments(self, compartment_id, **kwargs): + """ + Gets a list of user assessments. + + The ListUserAssessments operation returns only the assessments in the specified `compartmentId`. + The list does not include any subcompartments of the compartmentId passed. + + The parameter `accessLevel` specifies whether to return only those compartments for which the + requestor has INSPECT permissions on at least one resource directly + or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if + Principal doesn't have access to even one of the child compartments. This is valid only when + `compartmentIdInSubtree` is set to `true`. + + The parameter `compartmentIdInSubtree` applies when you perform ListUserAssessments on the + `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. + To get a full list of all compartments and subcompartments in the tenancy (root compartment), + set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. + + + :param str compartment_id: (required) + A filter to return only resources that match the specified compartment OCID. + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str display_name: (optional) + A filter to return only resources that match the specified display name. + + :param str schedule_user_assessment_id: (optional) + The OCID of the user assessment of type SAVE_SCHEDULE. + + :param bool is_schedule_assessment: (optional) + A filter to return only user assessments of type SAVE_SCHEDULE. + + :param bool is_baseline: (optional) + A filter to return only user assessments that are set as baseline. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param str type: (optional) + A filter to return only items that match the specified assessment type. + + Allowed values are: "LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE" + + :param str triggered_by: (optional) + A filter to return user assessments that were created by either the system or by a user only. + + Allowed values are: "USER", "SYSTEM" + + :param datetime time_created_greater_than_or_equal_to: (optional) + A filter to return only user assessments that were created after the specified date and time, as defined by `RFC3339`__. + Using timeCreatedGreaterThanOrEqualTo parameter retrieves all assessments created after that date. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_created_less_than: (optional) + Search for resources that were created before a specific date. + Specifying this parameter corresponding `timeCreatedLessThan` + parameter will retrieve all resources created before the + specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as + defined by RFC 3339. + + **Example:** 2016-12-19T16:39:57.600Z + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str lifecycle_state: (optional) + The current state of the user assessment. + + Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + + Allowed values are: "timeCreated", "displayName" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 list of :class:`~oci.data_safe.models.UserAssessmentSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_user_assessments API. + """ + resource_path = "/userAssessments" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "compartment_id_in_subtree", + "access_level", + "display_name", + "schedule_user_assessment_id", + "is_schedule_assessment", + "is_baseline", + "target_id", + "type", + "triggered_by", + "time_created_greater_than_or_equal_to", + "time_created_less_than", + "limit", + "page", + "lifecycle_state", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_user_assessments got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'type' in kwargs: + type_allowed_values = ["LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE"] + if kwargs['type'] not in type_allowed_values: + raise ValueError( + "Invalid value for `type`, must be one of {0}".format(type_allowed_values) + ) + + if 'triggered_by' in kwargs: + triggered_by_allowed_values = ["USER", "SYSTEM"] + if kwargs['triggered_by'] not in triggered_by_allowed_values: + raise ValueError( + "Invalid value for `triggered_by`, must be one of {0}".format(triggered_by_allowed_values) + ) + + if 'lifecycle_state' in kwargs: + lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED"] + if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: + raise ValueError( + "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["timeCreated", "displayName"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "displayName": kwargs.get("display_name", missing), + "scheduleUserAssessmentId": kwargs.get("schedule_user_assessment_id", missing), + "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing), + "isBaseline": kwargs.get("is_baseline", missing), + "targetId": kwargs.get("target_id", missing), + "type": kwargs.get("type", missing), + "triggeredBy": kwargs.get("triggered_by", missing), + "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), + "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "lifecycleState": kwargs.get("lifecycle_state", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[UserAssessmentSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[UserAssessmentSummary]") + + def list_users(self, user_assessment_id, **kwargs): + """ + Gets a list of users of the specified user assessment. The result contains the database user details for each user, such + as user type, account status, last login time, user creation time, authentication type, user profile, and the date and time + of the latest password change. It also contains the user category derived from these user details as well as privileges + granted to each user. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param bool compartment_id_in_subtree: (optional) + Default is false. + When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + + :param str access_level: (optional) + Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. + Setting this to ACCESSIBLE returns only those compartments for which the + user has INSPECT permissions directly or indirectly (permissions can be on a + resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + + Allowed values are: "RESTRICTED", "ACCESSIBLE" + + :param str user_category: (optional) + A filter to return only items that match the specified user category. + + :param str user_key: (optional) + A filter to return only items that match the specified user key. + + :param str account_status: (optional) + A filter to return only items that match the specified account status. + + :param str authentication_type: (optional) + A filter to return only items that match the specified authentication type. + + :param str user_name: (optional) + A filter to return only items that match the specified user name. + + :param str target_id: (optional) + A filter to return only items related to a specific target OCID. + + :param datetime time_last_login_greater_than_or_equal_to: (optional) + A filter to return users whose last login time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_last_login_less_than: (optional) + A filter to return users whose last login time in the database is less than the date and time specified, in the format defined by `RFC3339`__. + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_user_created_greater_than_or_equal_to: (optional) + A filter to return users whose creation time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_user_created_less_than: (optional) + A filter to return users whose creation time in the database is less than the date and time specified, in the format defined by `RFC3339`__. + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_password_last_changed_greater_than_or_equal_to: (optional) + A filter to return users whose last password change in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param datetime time_password_last_changed_less_than: (optional) + A filter to return users whose last password change in the database is less than the date and time specified, in the format defined by `RFC3339`__. + + **Example:** 2016-12-19T16:39:57.600Z + + __ https://tools.ietf.org/html/rfc3339 + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str sort_by: (optional) + The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending. + + Allowed values are: "userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged" + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 list of :class:`~oci.data_safe.models.UserSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_users API. + """ + resource_path = "/userAssessments/{userAssessmentId}/users" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "compartment_id_in_subtree", + "access_level", + "user_category", + "user_key", + "account_status", + "authentication_type", + "user_name", + "target_id", + "time_last_login_greater_than_or_equal_to", + "time_last_login_less_than", + "time_user_created_greater_than_or_equal_to", + "time_user_created_less_than", + "time_password_last_changed_greater_than_or_equal_to", + "time_password_last_changed_less_than", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_users got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + if 'access_level' in kwargs: + access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] + if kwargs['access_level'] not in access_level_allowed_values: + raise ValueError( + "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "limit": kwargs.get("limit", missing), + "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), + "accessLevel": kwargs.get("access_level", missing), + "userCategory": kwargs.get("user_category", missing), + "userKey": kwargs.get("user_key", missing), + "accountStatus": kwargs.get("account_status", missing), + "authenticationType": kwargs.get("authentication_type", missing), + "userName": kwargs.get("user_name", missing), + "targetId": kwargs.get("target_id", missing), + "timeLastLoginGreaterThanOrEqualTo": kwargs.get("time_last_login_greater_than_or_equal_to", missing), + "timeLastLoginLessThan": kwargs.get("time_last_login_less_than", missing), + "timeUserCreatedGreaterThanOrEqualTo": kwargs.get("time_user_created_greater_than_or_equal_to", missing), + "timeUserCreatedLessThan": kwargs.get("time_user_created_less_than", missing), + "timePasswordLastChangedGreaterThanOrEqualTo": kwargs.get("time_password_last_changed_greater_than_or_equal_to", missing), + "timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[UserSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[UserSummary]") + + def list_work_request_errors(self, work_request_id, **kwargs): + """ + Gets a list of errors for the specified work request. + + + :param str work_request_id: (required) + The OCID of the work request. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. 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 list of :class:`~oci.data_safe.models.WorkRequestError` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_errors API. + """ + resource_path = "/workRequests/{workRequestId}/errors" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestError]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestError]") + + def list_work_request_logs(self, work_request_id, **kwargs): + """ + Gets a list of log entries for the specified work request. + + + :param str work_request_id: (required) + The OCID of the work request. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. 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 list of :class:`~oci.data_safe.models.WorkRequestLogEntry` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_request_logs API. + """ + resource_path = "/workRequests/{workRequestId}/logs" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestLogEntry]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestLogEntry]") + + def list_work_requests(self, compartment_id, **kwargs): + """ + Gets a list of work requests. + + + :param str compartment_id: (required) A filter to return only resources that match the specified compartment OCID. - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + :param str operation_type: (optional) + A filter to return only work requests that match the specific operation type. + + :param str sort_by: (optional) + The field used for sorting. Only one sorting order (sortOrder) can be specified. + The default order for STARTTIME and FINISHTIME is descending. + + Allowed values are: "STARTTIME", "FINISHTIME" + + :param str sort_order: (optional) + The sort order to use, either ascending (ASC) or descending (DESC). + + Allowed values are: "ASC", "DESC" + + :param str resource_id: (optional) + A filter to return only work requests that match the specified resource OCID. + + :param str target_database_id: (optional) + A filter to return only work requests that are associated to the specified target database OCID. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str page: (optional) + For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param int limit: (optional) + For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. 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 list of :class:`~oci.data_safe.models.WorkRequestSummary` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_work_requests API. + """ + resource_path = "/workRequests" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "operation_type", + "sort_by", + "sort_order", + "resource_id", + "target_database_id", + "opc_request_id", + "page", + "limit" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["STARTTIME", "FINISHTIME"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "operationType": kwargs.get("operation_type", missing), + "sortBy": kwargs.get("sort_by", missing), + "sortOrder": kwargs.get("sort_order", missing), + "resourceId": kwargs.get("resource_id", missing), + "targetDatabaseId": kwargs.get("target_database_id", missing), + "page": kwargs.get("page", missing), + "limit": kwargs.get("limit", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestSummary]") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="list[WorkRequestSummary]") + + def mask_data(self, masking_policy_id, mask_data_details, **kwargs): + """ + Masks data using the specified masking policy. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.MaskDataDetails mask_data_details: (required) + Details to mask data. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use mask_data API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/mask" + method = "POST" + + # 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( + "mask_data got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=mask_data_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=mask_data_details) + + def modify_global_settings(self, modify_global_settings_details, compartment_id, **kwargs): + """ + Modifies Global Settings in Data Safe in the tenancy and region. + + + :param oci.data_safe.models.ModifyGlobalSettingsDetails modify_global_settings_details: (required) + The details used to update global settings in Data Safe. + + :param str compartment_id: (required) + The OCID of the compartment. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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 modify_global_settings API. + """ + resource_path = "/configuration/{compartmentId}/actions/modifyGlobalSettings" + method = "POST" + + # 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( + "modify_global_settings got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "compartmentId": compartment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=modify_global_settings_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=modify_global_settings_details) + + def patch_alerts(self, patch_alerts_details, **kwargs): + """ + Patch alerts. Updates one or more alerts by specifying alert Ids. + + + :param oci.data_safe.models.PatchAlertsDetails patch_alerts_details: (required) + Details to patch alerts. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_alerts API. + """ + resource_path = "/alerts" + method = "PATCH" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "patch_alerts got unknown kwargs: {!r}".format(extra_kwargs)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + header_params=header_params, + body=patch_alerts_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + header_params=header_params, + body=patch_alerts_details) + + def patch_discovery_job_results(self, discovery_job_id, patch_discovery_job_result_details, **kwargs): + """ + Patches one or more discovery results. You can use this operation to set the plannedAction attribute before using + ApplyDiscoveryJobResults to process the results based on this attribute. + + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param oci.data_safe.models.PatchDiscoveryJobResultDetails patch_discovery_job_result_details: (required) + Details to patch discovery results. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_discovery_job_results API. + """ + resource_path = "/discoveryJobs/{discoveryJobId}/results" + method = "PATCH" + + # 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( + "patch_discovery_job_results got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "discoveryJobId": discovery_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('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=patch_discovery_job_result_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=patch_discovery_job_result_details) + + def patch_masking_columns(self, masking_policy_id, patch_masking_columns_details, **kwargs): + """ + Patches one or more columns in the specified masking policy. Use it to create, or update + masking columns. To create masking columns, use CreateMaskingColumnDetails as the patch + value. And to update masking columns, use UpdateMaskingColumnDetails as the patch value. + + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.PatchMaskingColumnsDetails patch_masking_columns_details: (required) + Details to patch masking columns. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_masking_columns API. + """ + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns" + method = "PATCH" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "patch_masking_columns got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "maskingPolicyId": masking_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=patch_masking_columns_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=patch_masking_columns_details) + + def patch_sensitive_columns(self, sensitive_data_model_id, patch_sensitive_column_details, **kwargs): + """ + Patches one or more columns in the specified sensitive data model. Use it to create, update, or delete sensitive columns. + To create sensitive columns, use CreateSensitiveColumnDetails as the patch value. And to update sensitive columns, + use UpdateSensitiveColumnDetails as the patch value. + + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.PatchSensitiveColumnDetails patch_sensitive_column_details: (required) + Details to patch sensitive columns. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use patch_sensitive_columns API. + """ + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns" + method = "PATCH" + + # 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( + "patch_sensitive_columns got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "sensitiveDataModelId": sensitive_data_model_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=patch_sensitive_column_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=patch_sensitive_column_details) + + def provision_audit_policy(self, provision_audit_policy_details, audit_policy_id, **kwargs): + """ + Provision audit policy. + + + :param oci.data_safe.models.ProvisionAuditPolicyDetails provision_audit_policy_details: (required) + Details for provisioning the given policies on the source target database. + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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 provision_audit_policy API. + """ + resource_path = "/auditPolicies/{auditPolicyId}/actions/provision" + method = "POST" + + # 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( + "provision_audit_policy got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditPolicyId": audit_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=provision_audit_policy_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=provision_audit_policy_details) + + def refresh_security_assessment(self, security_assessment_id, run_security_assessment_details, **kwargs): + """ + Runs a security assessment, refreshes the latest assessment, and saves it for future reference. + The assessment runs with a securityAssessmentId of type LATEST. Before you start, first call the ListSecurityAssessments operation with filter \"type = latest\" to get the security assessment id for the target's latest assessment. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param oci.data_safe.models.RunSecurityAssessmentDetails run_security_assessment_details: (required) + Details to create an on-demand saved security assessment. + + :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) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use refresh_security_assessment API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/actions/refresh" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "refresh_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=run_security_assessment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=run_security_assessment_details) + + def refresh_user_assessment(self, user_assessment_id, run_user_assessment_details, **kwargs): + """ + Refreshes the latest assessment and saves it for future reference. This operation runs with a userAssessmentId of type LATEST. + Before you start, first call the ListUserAssessments operation with filter \"type = latest\" to get the user assessment ID for + the target's latest assessment. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param oci.data_safe.models.RunUserAssessmentDetails run_user_assessment_details: (required) + The details required to create an on-demand saved user assessment. + + :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) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use refresh_user_assessment API. + """ + resource_path = "/userAssessments/{userAssessmentId}/actions/refresh" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "refresh_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=run_user_assessment_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=run_user_assessment_details) + + def resume_audit_trail(self, audit_trail_id, **kwargs): + """ + Resumes the specified audit trail once it got stopped. + + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use resume_audit_trail API. + """ + resource_path = "/auditTrails/{auditTrailId}/actions/resume" + method = "POST" + + # 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( + "resume_audit_trail got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditTrailId": audit_trail_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def resume_work_request(self, work_request_id, **kwargs): + """ + Resume the given work request. Issuing a resume does not guarantee of immediate resume of the work request. + + + :param str work_request_id: (required) + The OCID of the work request. + + :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) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use resume_work_request API. + """ + resource_path = "/workRequests/{workRequestId}/actions/resume" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "resume_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def retrieve_audit_policies(self, audit_policy_id, **kwargs): + """ + Retrieves the audit policy details from the source target database. + + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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 retrieve_audit_policies API. + """ + resource_path = "/auditPolicies/{auditPolicyId}/actions/retrieveFromTarget" + method = "POST" + + # 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( + "retrieve_audit_policies got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditPolicyId": audit_policy_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def set_security_assessment_baseline(self, security_assessment_id, **kwargs): + """ + Sets the saved security assessment as the baseline in the compartment where the the specified assessment resides. The security assessment needs to be of type 'SAVED'. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param oci.data_safe.models.SecurityAssessmentBaseLineDetails base_line_details: (optional) + Details of security assessment that need to be updated while setting the baseline. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use set_security_assessment_baseline API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/actions/setBaseline" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id", + "base_line_details" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "set_security_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "securityAssessmentId": security_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=kwargs.get('base_line_details')) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=kwargs.get('base_line_details')) + + def set_user_assessment_baseline(self, user_assessment_id, **kwargs): + """ + Sets the saved user assessment as the baseline in the compartment where the specified assessment resides. The user assessment needs to be of type 'SAVED'. + + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param oci.data_safe.models.UserAssessmentBaseLineDetails base_line_details: (optional) + Details of user assessment that need to be updated while setting the baseline. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use set_user_assessment_baseline API. + """ + resource_path = "/userAssessments/{userAssessmentId}/actions/setBaseline" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id", + "base_line_details" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "set_user_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "userAssessmentId": user_assessment_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=kwargs.get('base_line_details')) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=kwargs.get('base_line_details')) + + def start_audit_trail(self, start_audit_trail_details, audit_trail_id, **kwargs): + """ + Starts collection of audit records on the specified audit trail. + + + :param oci.data_safe.models.StartAuditTrailDetails start_audit_trail_details: (required) + Details for the starting audit. + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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 start_audit_trail API. + """ + resource_path = "/auditTrails/{auditTrailId}/actions/start" + method = "POST" + + # 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( + "start_audit_trail got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "auditTrailId": audit_trail_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=start_audit_trail_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=start_audit_trail_details) + + def stop_audit_trail(self, audit_trail_id, **kwargs): + """ + Stops the specified audit trail. - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - Allowed values are: "RESTRICTED", "ACCESSIBLE" + :param str audit_trail_id: (required) + The OCID of the audit trail. - :param str display_name: (optional) - A filter to return only resources that match the specified display name. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. - :param str type: (optional) - A filter to return only items that match the specified security assessment type. + :param str opc_request_id: (optional) + Unique identifier for the request. - Allowed values are: "LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT" + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - :param str schedule_assessment_id: (optional) - The OCID of the security assessment of type SAVE_SCHEDULE. + 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 `__. - :param bool is_schedule_assessment: (optional) - A filter to return only security assessments of type save schedule. + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :param str triggered_by: (optional) - A filter to return only security asessments that were created by either user or system. + :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 - Allowed values are: "USER", "SYSTEM" + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` - :param str target_id: (optional) - A filter to return only items that match the specified target. + :example: + Click `here `__ to see an example of how to use stop_audit_trail API. + """ + resource_path = "/auditTrails/{auditTrailId}/actions/stop" + method = "POST" - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). + # 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( + "stop_audit_trail got unknown kwargs: {!r}".format(extra_kwargs)) - Allowed values are: "ASC", "DESC" + path_params = { + "auditTrailId": audit_trail_id + } - :param bool is_baseline: (optional) - A filter to return only security assessments that are set as baseline. + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - :param str sort_by: (optional) - The field to sort by. You can specify only one sort order(sortOrder). The default order for timeCreated is descending. + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - Allowed values are: "timeCreated", "displayName" + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def suspend_work_request(self, work_request_id, **kwargs): + """ + Suspend the given work request. Issuing a suspend does not guarantee of a immediate suspend of the work request. + + + :param str work_request_id: (required) + The OCID of the work request. + + :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) + Unique identifier for the request. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param 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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use suspend_work_request API. + """ + resource_path = "/workRequests/{workRequestId}/actions/suspend" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_retry_token", + "opc_request_id", + "if_match" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "suspend_work_request got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "workRequestId": work_request_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + + def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): + """ + Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. + Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. + + :param str opc_retry_token: (optional) + A token that uniquely identifies a request so it can be retried in case of a timeout or + server error without risk of executing that same action again. Retry tokens expire after 24 + hours, but can be invalidated before then due to conflicting operations. For example, if a resource + has been deleted and purged from the system, then a retry of the original creation request might be rejected. + + :param str opc_request_id: (optional) + Unique identifier for the request. + + :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 None + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use unset_security_assessment_baseline API. + """ + resource_path = "/securityAssessments/{securityAssessmentId}/actions/unsetBaseline" + method = "POST" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "if_match", + "opc_retry_token", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "unset_security_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) - :param datetime time_created_greater_than_or_equal_to: (optional) - A filter to return only security assessments that were created after the specified date and time, as defined by `RFC3339`__. - Using TimeCreatedGreaterThanOrEqualToQueryParam parameter retrieves all assessments created after that date. + path_params = { + "securityAssessmentId": security_assessment_id + } - **Example:** 2016-12-19T16:39:57.600Z + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - __ https://tools.ietf.org/html/rfc3339 + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - :param datetime time_created_less_than: (optional) - Search for items that were created before a specific date. - Specifying this parameter corresponding `timeCreatedLessThan` - parameter will retrieve all items created before the - specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as - defined by RFC 3339. + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-retry-token": kwargs.get("opc_retry_token", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} - **Example:** 2016-12-19T16:39:57.600Z + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) - :param str opc_request_id: (optional) - Unique identifier for the request. + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params) - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): + """ + Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. + Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + :param str user_assessment_id: (required) + The OCID of the user assessment. - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + :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 lifecycle_state: (optional) - A filter to return only resources that match the specified lifecycle state. + :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. - Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED" + :param str opc_request_id: (optional) + Unique identifier for the request. :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. @@ -4179,108 +20169,43 @@ def list_security_assessments(self, compartment_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 list of :class:`~oci.data_safe.models.SecurityAssessmentSummary` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_security_assessments API. + Click `here `__ to see an example of how to use unset_user_assessment_baseline API. """ - resource_path = "/securityAssessments" - method = "GET" + resource_path = "/userAssessments/{userAssessmentId}/actions/unsetBaseline" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "compartment_id_in_subtree", - "access_level", - "display_name", - "type", - "schedule_assessment_id", - "is_schedule_assessment", - "triggered_by", - "target_id", - "sort_order", - "is_baseline", - "sort_by", - "time_created_greater_than_or_equal_to", - "time_created_less_than", - "opc_request_id", - "limit", - "page", - "lifecycle_state" + "if_match", + "opc_retry_token", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_security_assessments got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - if 'type' in kwargs: - type_allowed_values = ["LATEST", "SAVED", "SAVE_SCHEDULE", "COMPARTMENT"] - if kwargs['type'] not in type_allowed_values: - raise ValueError( - "Invalid value for `type`, must be one of {0}".format(type_allowed_values) - ) - - if 'triggered_by' in kwargs: - triggered_by_allowed_values = ["USER", "SYSTEM"] - if kwargs['triggered_by'] not in triggered_by_allowed_values: - raise ValueError( - "Invalid value for `triggered_by`, must be one of {0}".format(triggered_by_allowed_values) - ) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) + "unset_user_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) - if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) + path_params = { + "userAssessmentId": user_assessment_id + } - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED"] - if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "compartmentId": compartment_id, - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing), - "displayName": kwargs.get("display_name", missing), - "type": kwargs.get("type", missing), - "scheduleAssessmentId": kwargs.get("schedule_assessment_id", missing), - "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing), - "triggeredBy": kwargs.get("triggered_by", missing), - "targetId": kwargs.get("target_id", missing), - "sortOrder": kwargs.get("sort_order", missing), - "isBaseline": kwargs.get("is_baseline", missing), - "sortBy": kwargs.get("sort_by", missing), - "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), - "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-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} @@ -4292,85 +20217,137 @@ def list_security_assessments(self, compartment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, - header_params=header_params, - response_type="list[SecurityAssessmentSummary]") + path_params=path_params, + header_params=header_params) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, - header_params=header_params, - response_type="list[SecurityAssessmentSummary]") + path_params=path_params, + header_params=header_params) - def list_target_databases(self, compartment_id, **kwargs): + def update_alert(self, alert_id, update_alert_details, **kwargs): """ - Returns the list of registered target databases in Data Safe. + Updates alert status of the specified alert. - :param str compartment_id: (required) - A filter to return only resources that match the specified compartment OCID. + :param str alert_id: (required) + The OCID of alert. - :param str target_database_id: (optional) - A filter to return the target database that matches the specified OCID. + :param oci.data_safe.models.UpdateAlertDetails update_alert_details: (required) + The details used to update alert status. - :param str display_name: (optional) - A filter to return only resources that match the specified display name. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. - :param str lifecycle_state: (optional) - A filter to return the target databases that matches the current state of the target database. + :param str opc_request_id: (optional) + Unique identifier for the request. - Allowed values are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED" + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. - :param str database_type: (optional) - A filter to return target databases that match the database type of the target database. + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. - Allowed values are: "DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE" + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - :param str infrastructure_type: (optional) - A filter to return target databases that match the infrastructure type of the target database. + :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 - Allowed values are: "ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD" + :return: A :class:`~oci.response.Response` object with data of type :class:`~oci.data_safe.models.Alert` + :rtype: :class:`~oci.response.Response` - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + :example: + Click `here `__ to see an example of how to use update_alert API. + """ + resource_path = "/alerts/{alertId}" + method = "PUT" - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + # 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( + "update_alert got unknown kwargs: {!r}".format(extra_kwargs)) - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + path_params = { + "alertId": alert_id + } - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. + 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_alert_details, + response_type="Alert") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_alert_details, + response_type="Alert") - Allowed values are: "RESTRICTED", "ACCESSIBLE" + def update_audit_archive_retrieval(self, audit_archive_retrieval_id, update_audit_archive_retrieval_details, **kwargs): + """ + Updates the audit archive retrieval. - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). - Allowed values are: "ASC", "DESC" + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. - :param str sort_by: (optional) - The field used for sorting. Only one sorting order (sortOrder) can be specified. - The default order for TIMECREATED is descending. The default order for DISPLAYNAME is ascending. - The DISPLAYNAME sort order is case sensitive. + :param oci.data_safe.models.UpdateAuditArchiveRetrievalDetails update_audit_archive_retrieval_details: (required) + Details to update the audit archive retrieval. - Allowed values are: "TIMECREATED", "DISPLAYNAME" + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique identifier for the request. @@ -4387,98 +20364,41 @@ def list_target_databases(self, compartment_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 list of :class:`~oci.data_safe.models.TargetDatabaseSummary` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_target_databases API. + Click `here `__ to see an example of how to use update_audit_archive_retrieval API. """ - resource_path = "/targetDatabases" - method = "GET" + resource_path = "/auditArchiveRetrievals/{auditArchiveRetrievalId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "target_database_id", - "display_name", - "lifecycle_state", - "database_type", - "infrastructure_type", - "limit", - "page", - "compartment_id_in_subtree", - "access_level", - "sort_order", - "sort_by", + "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_target_databases got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] - if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) - - if 'database_type' in kwargs: - database_type_allowed_values = ["DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"] - if kwargs['database_type'] not in database_type_allowed_values: - raise ValueError( - "Invalid value for `database_type`, must be one of {0}".format(database_type_allowed_values) - ) - - if 'infrastructure_type' in kwargs: - infrastructure_type_allowed_values = ["ORACLE_CLOUD", "CLOUD_AT_CUSTOMER", "ON_PREMISES", "NON_ORACLE_CLOUD"] - if kwargs['infrastructure_type'] not in infrastructure_type_allowed_values: - raise ValueError( - "Invalid value for `infrastructure_type`, must be one of {0}".format(infrastructure_type_allowed_values) - ) + "update_audit_archive_retrieval got unknown kwargs: {!r}".format(extra_kwargs)) - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) + path_params = { + "auditArchiveRetrievalId": audit_archive_retrieval_id + } - if 'sort_by' in kwargs: - sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "compartmentId": compartment_id, - "targetDatabaseId": kwargs.get("target_database_id", missing), - "displayName": kwargs.get("display_name", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "databaseType": kwargs.get("database_type", missing), - "infrastructureType": kwargs.get("infrastructure_type", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -4496,127 +20416,130 @@ def list_target_databases(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[TargetDatabaseSummary]") + body=update_audit_archive_retrieval_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[TargetDatabaseSummary]") + body=update_audit_archive_retrieval_details) - def list_user_analytics(self, user_assessment_id, **kwargs): + def update_audit_policy(self, audit_policy_id, update_audit_policy_details, **kwargs): """ - Gets a list of aggregated user details from the specified user assessment. This provides information about the overall state - of database user security. For example, the user details include how many users have the DBA role and how many users are in - the critical category. This data is especially useful content for dashboards or to support analytics. - - When you perform the ListUserAnalytics operation, if the parameter compartmentIdInSubtree is set to \"true,\" and if the - parameter accessLevel is set to ACCESSIBLE, then the operation returns compartments in which the requestor has INSPECT - permissions on at least one resource, directly or indirectly (in subcompartments). If the operation is performed at the - root compartment. If the requestor does not have access to at least one subcompartment of the compartment specified by - compartmentId, then \"Not Authorized\" is returned. - - The parameter compartmentIdInSubtree applies when you perform ListUserAnalytics on the compartmentId passed and when it is - set to true, the entire hierarchy of compartments can be returned. - - To use ListUserAnalytics to get a full list of all compartments and subcompartments in the tenancy from the root compartment, - set the parameter compartmentIdInSubtree to true and accessLevel to ACCESSIBLE. - - - :param str user_assessment_id: (required) - The OCID of the user assessment. - - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. - - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - - Allowed values are: "RESTRICTED", "ACCESSIBLE" - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str user_category: (optional) - A filter to return only items that match the specified user category. - - :param str user_key: (optional) - A filter to return only items that match the specified user key. - - :param str account_status: (optional) - A filter to return only items that match the specified account status. - - :param str authentication_type: (optional) - A filter to return only items that match the specified authentication type. + Updates the audit policy. - :param str user_name: (optional) - A filter to return only items that match the specified user name. - :param str target_id: (optional) - A filter to return only items that match the specified target. + :param str audit_policy_id: (required) + Unique audit policy identifier. - :param datetime time_last_login_greater_than_or_equal_to: (optional) - A filter to return users whose last login time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + :param oci.data_safe.models.UpdateAuditPolicyDetails update_audit_policy_details: (required) + Details to update the audit policy. - **Example:** 2016-12-19T16:39:57.600Z + :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. - __ https://tools.ietf.org/html/rfc3339 + :param str opc_request_id: (optional) + Unique identifier for the request. - :param datetime time_last_login_less_than: (optional) - A filter to return users whose last login time in the database is less than the date and time specified, in the format defined by `RFC3339`__. - **Example:** 2016-12-19T16:39:57.600Z + :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. - __ https://tools.ietf.org/html/rfc3339 + 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 `__. - :param datetime time_user_created_greater_than_or_equal_to: (optional) - A filter to return users whose creation time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. - **Example:** 2016-12-19T16:39:57.600Z + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. - __ https://tools.ietf.org/html/rfc3339 + :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 - :param datetime time_user_created_less_than: (optional) - A filter to return users whose creation time in the database is less than the date and time specified, in the format defined by `RFC3339`__. - **Example:** 2016-12-19T16:39:57.600Z + :return: A :class:`~oci.response.Response` object with data of type None + :rtype: :class:`~oci.response.Response` - __ https://tools.ietf.org/html/rfc3339 + :example: + Click `here `__ to see an example of how to use update_audit_policy API. + """ + resource_path = "/auditPolicies/{auditPolicyId}" + method = "PUT" - :param datetime time_password_last_changed_greater_than_or_equal_to: (optional) - A filter to return users whose last password change in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. + # 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( + "update_audit_policy got unknown kwargs: {!r}".format(extra_kwargs)) - **Example:** 2016-12-19T16:39:57.600Z + path_params = { + "auditPolicyId": audit_policy_id + } - __ https://tools.ietf.org/html/rfc3339 + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - :param datetime time_password_last_changed_less_than: (optional) - A filter to return users whose last password change in the database is less than the date and time specified, in the format defined by `RFC3339`__. + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - **Example:** 2016-12-19T16:39:57.600Z + 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} - __ https://tools.ietf.org/html/rfc3339 + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + 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_audit_policy_details) + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + header_params=header_params, + body=update_audit_policy_details) - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + def update_audit_profile(self, audit_profile_id, update_audit_profile_details, **kwargs): + """ + Updates one or more attributes of the specified audit profile. - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). - Allowed values are: "ASC", "DESC" + :param str audit_profile_id: (required) + The OCID of the audit. - :param str sort_by: (optional) - The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending. + :param oci.data_safe.models.UpdateAuditProfileDetails update_audit_profile_details: (required) + The information to be updated. - Allowed values are: "userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged" + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique identifier for the request. @@ -4633,46 +20556,29 @@ def list_user_analytics(self, user_assessment_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 list of :class:`~oci.data_safe.models.UserAggregation` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_user_analytics API. + Click `here `__ to see an example of how to use update_audit_profile API. """ - resource_path = "/userAssessments/{userAssessmentId}/userAnalytics" - method = "GET" + resource_path = "/auditProfiles/{auditProfileId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "compartment_id_in_subtree", - "access_level", - "limit", - "user_category", - "user_key", - "account_status", - "authentication_type", - "user_name", - "target_id", - "time_last_login_greater_than_or_equal_to", - "time_last_login_less_than", - "time_user_created_greater_than_or_equal_to", - "time_user_created_less_than", - "time_password_last_changed_greater_than_or_equal_to", - "time_password_last_changed_less_than", - "page", - "sort_order", - "sort_by", + "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_user_analytics got unknown kwargs: {!r}".format(extra_kwargs)) + "update_audit_profile got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "auditProfileId": audit_profile_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -4681,52 +20587,10 @@ def list_user_analytics(self, user_assessment_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) - - if 'sort_by' in kwargs: - sort_by_allowed_values = ["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) - - query_params = { - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing), - "limit": kwargs.get("limit", missing), - "userCategory": kwargs.get("user_category", missing), - "userKey": kwargs.get("user_key", missing), - "accountStatus": kwargs.get("account_status", missing), - "authenticationType": kwargs.get("authentication_type", missing), - "userName": kwargs.get("user_name", missing), - "targetId": kwargs.get("target_id", missing), - "timeLastLoginGreaterThanOrEqualTo": kwargs.get("time_last_login_greater_than_or_equal_to", missing), - "timeLastLoginLessThan": kwargs.get("time_last_login_less_than", missing), - "timeUserCreatedGreaterThanOrEqualTo": kwargs.get("time_user_created_greater_than_or_equal_to", missing), - "timeUserCreatedLessThan": kwargs.get("time_user_created_less_than", missing), - "timePasswordLastChangedGreaterThanOrEqualTo": kwargs.get("time_password_last_changed_greater_than_or_equal_to", missing), - "timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", 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", + "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} @@ -4745,118 +20609,33 @@ def list_user_analytics(self, user_assessment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[UserAggregation]") + body=update_audit_profile_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[UserAggregation]") + body=update_audit_profile_details) - def list_user_assessments(self, compartment_id, **kwargs): + def update_audit_trail(self, audit_trail_id, update_audit_trail_details, **kwargs): """ - Gets a list of user assessments. - - The ListUserAssessments operation returns only the assessments in the specified `compartmentId`. - The list does not include any subcompartments of the compartmentId passed. - - The parameter `accessLevel` specifies whether to return only those compartments for which the - requestor has INSPECT permissions on at least one resource directly - or indirectly (ACCESSIBLE) (the resource can be in a subcompartment) or to return Not Authorized if - Principal doesn't have access to even one of the child compartments. This is valid only when - `compartmentIdInSubtree` is set to `true`. - - The parameter `compartmentIdInSubtree` applies when you perform ListUserAssessments on the - `compartmentId` passed and when it is set to true, the entire hierarchy of compartments can be returned. - To get a full list of all compartments and subcompartments in the tenancy (root compartment), - set the parameter `compartmentIdInSubtree` to true and `accessLevel` to ACCESSIBLE. - - - :param str compartment_id: (required) - A filter to return only resources that match the specified compartment OCID. - - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. - - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - - Allowed values are: "RESTRICTED", "ACCESSIBLE" - - :param str display_name: (optional) - A filter to return only resources that match the specified display name. - - :param str schedule_user_assessment_id: (optional) - The OCID of the user assessment of type SAVE_SCHEDULE. - - :param bool is_schedule_assessment: (optional) - A filter to return only user assessments of type SAVE_SCHEDULE. - - :param bool is_baseline: (optional) - A filter to return only user assessments that are set as baseline. - - :param str target_id: (optional) - A filter to return only items that match the specified target. - - :param str type: (optional) - A filter to return only items that match the specified assessment type. - - Allowed values are: "LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE" - - :param str triggered_by: (optional) - A filter to return user assessments that were created by either the system or by a user only. - - Allowed values are: "USER", "SYSTEM" - - :param datetime time_created_greater_than_or_equal_to: (optional) - A filter to return only user assessments that were created after the specified date and time, as defined by `RFC3339`__. - Using timeCreatedGreaterThanOrEqualTo parameter retrieves all assessments created after that date. - - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param datetime time_created_less_than: (optional) - Search for items that were created before a specific date. - Specifying this parameter corresponding `timeCreatedLessThan` - parameter will retrieve all items created before the - specified created date, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as - defined by RFC 3339. - - **Example:** 2016-12-19T16:39:57.600Z - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + Updates one or more attributes of the specified audit trail. - :param str lifecycle_state: (optional) - The current state of the user assessment. - - Allowed values are: "CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED" - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). - - Allowed values are: "ASC", "DESC" + :param str audit_trail_id: (required) + The OCID of the audit trail. - :param str sort_by: (optional) - The field to sort by. You can specify only one sort order (sortOrder). The default order for timeCreated is descending. + :param oci.data_safe.models.UpdateAuditTrailDetails update_audit_trail_details: (required) + The information to be updated. - Allowed values are: "timeCreated", "displayName" + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique identifier for the request. @@ -4873,108 +20652,41 @@ def list_user_assessments(self, compartment_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 list of :class:`~oci.data_safe.models.UserAssessmentSummary` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_user_assessments API. + Click `here `__ to see an example of how to use update_audit_trail API. """ - resource_path = "/userAssessments" - method = "GET" + resource_path = "/auditTrails/{auditTrailId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "compartment_id_in_subtree", - "access_level", - "display_name", - "schedule_user_assessment_id", - "is_schedule_assessment", - "is_baseline", - "target_id", - "type", - "triggered_by", - "time_created_greater_than_or_equal_to", - "time_created_less_than", - "limit", - "page", - "lifecycle_state", - "sort_order", - "sort_by", + "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] - if extra_kwargs: - raise ValueError( - "list_user_assessments got unknown kwargs: {!r}".format(extra_kwargs)) - - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - if 'type' in kwargs: - type_allowed_values = ["LATEST", "SAVED", "COMPARTMENT", "SAVE_SCHEDULE"] - if kwargs['type'] not in type_allowed_values: - raise ValueError( - "Invalid value for `type`, must be one of {0}".format(type_allowed_values) - ) - - if 'triggered_by' in kwargs: - triggered_by_allowed_values = ["USER", "SYSTEM"] - if kwargs['triggered_by'] not in triggered_by_allowed_values: - raise ValueError( - "Invalid value for `triggered_by`, must be one of {0}".format(triggered_by_allowed_values) - ) - - if 'lifecycle_state' in kwargs: - lifecycle_state_allowed_values = ["CREATING", "SUCCEEDED", "UPDATING", "DELETING", "FAILED"] - if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values: - raise ValueError( - "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values) - ) + if extra_kwargs: + raise ValueError( + "update_audit_trail got unknown kwargs: {!r}".format(extra_kwargs)) - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) + path_params = { + "auditTrailId": audit_trail_id + } - if 'sort_by' in kwargs: - sort_by_allowed_values = ["timeCreated", "displayName"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} - query_params = { - "compartmentId": compartment_id, - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing), - "displayName": kwargs.get("display_name", missing), - "scheduleUserAssessmentId": kwargs.get("schedule_user_assessment_id", missing), - "isScheduleAssessment": kwargs.get("is_schedule_assessment", missing), - "isBaseline": kwargs.get("is_baseline", missing), - "targetId": kwargs.get("target_id", missing), - "type": kwargs.get("type", missing), - "triggeredBy": kwargs.get("triggered_by", missing), - "timeCreatedGreaterThanOrEqualTo": kwargs.get("time_created_greater_than_or_equal_to", missing), - "timeCreatedLessThan": kwargs.get("time_created_less_than", missing), - "limit": kwargs.get("limit", missing), - "page": kwargs.get("page", missing), - "lifecycleState": kwargs.get("lifecycle_state", missing), - "sortOrder": kwargs.get("sort_order", missing), - "sortBy": kwargs.get("sort_by", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -4992,116 +20704,34 @@ def list_user_assessments(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[UserAssessmentSummary]") + body=update_audit_trail_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[UserAssessmentSummary]") + body=update_audit_trail_details) - def list_users(self, user_assessment_id, **kwargs): + def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, **kwargs): """ - Gets a list of users of the specified user assessment. The result contains the database user details for each user, such - as user type, account status, last login time, user creation time, authentication type, user profile, and the date and time - of the latest password change. It also contains the user category derived from these user details as well as privileges - granted to each user. - - - :param str user_assessment_id: (required) - The OCID of the user assessment. - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param bool compartment_id_in_subtree: (optional) - Default is false. - When set to true, the hierarchy of compartments is traversed and all compartments and subcompartments in the tenancy are returned. Depends on the 'accessLevel' setting. - - :param str access_level: (optional) - Valid values are RESTRICTED and ACCESSIBLE. Default is RESTRICTED. - Setting this to ACCESSIBLE returns only those compartments for which the - user has INSPECT permissions directly or indirectly (permissions can be on a - resource in a subcompartment). When set to RESTRICTED permissions are checked and no partial results are displayed. - - Allowed values are: "RESTRICTED", "ACCESSIBLE" - - :param str user_category: (optional) - A filter to return only items that match the specified user category. - - :param str user_key: (optional) - A filter to return only items that match the specified user key. - - :param str account_status: (optional) - A filter to return only items that match the specified account status. - - :param str authentication_type: (optional) - A filter to return only items that match the specified authentication type. - - :param str user_name: (optional) - A filter to return only items that match the specified user name. - - :param str target_id: (optional) - A filter to return only items that match the specified target. - - :param datetime time_last_login_greater_than_or_equal_to: (optional) - A filter to return users whose last login time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. - - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param datetime time_last_login_less_than: (optional) - A filter to return users whose last login time in the database is less than the date and time specified, in the format defined by `RFC3339`__. - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param datetime time_user_created_greater_than_or_equal_to: (optional) - A filter to return users whose creation time in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param datetime time_user_created_less_than: (optional) - A filter to return users whose creation time in the database is less than the date and time specified, in the format defined by `RFC3339`__. - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param datetime time_password_last_changed_greater_than_or_equal_to: (optional) - A filter to return users whose last password change in the database is greater than or equal to the date and time specified, in the format defined by `RFC3339`__. - - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param datetime time_password_last_changed_less_than: (optional) - A filter to return users whose last password change in the database is less than the date and time specified, in the format defined by `RFC3339`__. - - **Example:** 2016-12-19T16:39:57.600Z - - __ https://tools.ietf.org/html/rfc3339 - - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + Updates one or more attributes of the specified Data Safe private endpoint. - :param str sort_order: (optional) - The sort order to use, either ascending (ASC) or descending (DESC). - Allowed values are: "ASC", "DESC" + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. - :param str sort_by: (optional) - The field to sort by. You can specify only one sort order (sortOrder). The default order for userName is ascending. + :param oci.data_safe.models.UpdateDataSafePrivateEndpointDetails update_data_safe_private_endpoint_details: (required) + The details used to update a Data Safe private endpoint. - Allowed values are: "userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged" + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique identifier for the request. @@ -5118,46 +20748,29 @@ def list_users(self, user_assessment_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 list of :class:`~oci.data_safe.models.UserSummary` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_users API. + Click `here `__ to see an example of how to use update_data_safe_private_endpoint API. """ - resource_path = "/userAssessments/{userAssessmentId}/users" - method = "GET" + resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "limit", - "compartment_id_in_subtree", - "access_level", - "user_category", - "user_key", - "account_status", - "authentication_type", - "user_name", - "target_id", - "time_last_login_greater_than_or_equal_to", - "time_last_login_less_than", - "time_user_created_greater_than_or_equal_to", - "time_user_created_less_than", - "time_password_last_changed_greater_than_or_equal_to", - "time_password_last_changed_less_than", - "page", - "sort_order", - "sort_by", + "if_match", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_users got unknown kwargs: {!r}".format(extra_kwargs)) + "update_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "dataSafePrivateEndpointId": data_safe_private_endpoint_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5166,52 +20779,10 @@ def list_users(self, user_assessment_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - if 'access_level' in kwargs: - access_level_allowed_values = ["RESTRICTED", "ACCESSIBLE"] - if kwargs['access_level'] not in access_level_allowed_values: - raise ValueError( - "Invalid value for `access_level`, must be one of {0}".format(access_level_allowed_values) - ) - - if 'sort_order' in kwargs: - sort_order_allowed_values = ["ASC", "DESC"] - if kwargs['sort_order'] not in sort_order_allowed_values: - raise ValueError( - "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) - ) - - if 'sort_by' in kwargs: - sort_by_allowed_values = ["userName", "userCategory", "accountStatus", "timeLastLogin", "targetId", "timeUserCreated", "authenticationType", "timePasswordChanged"] - if kwargs['sort_by'] not in sort_by_allowed_values: - raise ValueError( - "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) - ) - - query_params = { - "limit": kwargs.get("limit", missing), - "compartmentIdInSubtree": kwargs.get("compartment_id_in_subtree", missing), - "accessLevel": kwargs.get("access_level", missing), - "userCategory": kwargs.get("user_category", missing), - "userKey": kwargs.get("user_key", missing), - "accountStatus": kwargs.get("account_status", missing), - "authenticationType": kwargs.get("authentication_type", missing), - "userName": kwargs.get("user_name", missing), - "targetId": kwargs.get("target_id", missing), - "timeLastLoginGreaterThanOrEqualTo": kwargs.get("time_last_login_greater_than_or_equal_to", missing), - "timeLastLoginLessThan": kwargs.get("time_last_login_less_than", missing), - "timeUserCreatedGreaterThanOrEqualTo": kwargs.get("time_user_created_greater_than_or_equal_to", missing), - "timeUserCreatedLessThan": kwargs.get("time_user_created_less_than", missing), - "timePasswordLastChangedGreaterThanOrEqualTo": kwargs.get("time_password_last_changed_greater_than_or_equal_to", missing), - "timePasswordLastChangedLessThan": kwargs.get("time_password_last_changed_less_than", 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", + "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} @@ -5230,38 +20801,36 @@ def list_users(self, user_assessment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[UserSummary]") + body=update_data_safe_private_endpoint_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[UserSummary]") + body=update_data_safe_private_endpoint_details) - def list_work_request_errors(self, work_request_id, **kwargs): + def update_library_masking_format(self, library_masking_format_id, update_library_masking_format_details, **kwargs): """ - Gets a list of errors for the specified work request. - + Updates one or more attributes of the specified library masking format. Note that updating the formatEntries attribute replaces all the existing masking format entries with the specified format entries. - :param str work_request_id: (required) - The OCID of the work request. - - :param str opc_request_id: (optional) - Unique identifier for the request. - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + :param str library_masking_format_id: (required) + The OCID of the library masking format. - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + :param oci.data_safe.models.UpdateLibraryMaskingFormatDetails update_library_masking_format_details: (required) + Details to update a library masking format. - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + :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. - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + :param str opc_request_id: (optional) + Unique identifier for the request. :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. @@ -5275,30 +20844,29 @@ def list_work_request_errors(self, work_request_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 list of :class:`~oci.data_safe.models.WorkRequestError` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_request_errors API. + Click `here `__ to see an example of how to use update_library_masking_format API. """ - resource_path = "/workRequests/{workRequestId}/errors" - method = "GET" + resource_path = "/libraryMaskingFormats/{libraryMaskingFormatId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "page", - "limit" + "if_match", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_work_request_errors got unknown kwargs: {!r}".format(extra_kwargs)) + "update_library_masking_format got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workRequestId": work_request_id + "libraryMaskingFormatId": library_masking_format_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5307,15 +20875,10 @@ def list_work_request_errors(self, work_request_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - query_params = { - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json", "content-type": "application/json", + "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} @@ -5334,38 +20897,40 @@ def list_work_request_errors(self, work_request_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[WorkRequestError]") + body=update_library_masking_format_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[WorkRequestError]") + body=update_library_masking_format_details) - def list_work_request_logs(self, work_request_id, **kwargs): + def update_masking_column(self, masking_column_key, masking_policy_id, update_masking_column_details, **kwargs): """ - Gets a list of log entries for the specified work request. - + Updates one or more attributes of the specified masking column. Note that updating the maskingFormats + attribute replaces the currently assigned masking formats with the specified masking formats. - :param str work_request_id: (required) - The OCID of the work request. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param str masking_column_key: (required) + The unique key that identifies the masking column. It's numeric and unique within a masking policy. - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. + :param str masking_policy_id: (required) + The OCID of the masking policy. - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + :param oci.data_safe.models.UpdateMaskingColumnDetails update_masking_column_details: (required) + Details to update a masking column. - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. + :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. - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine + :param str opc_request_id: (optional) + Unique identifier for the request. :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. @@ -5379,30 +20944,30 @@ def list_work_request_logs(self, work_request_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 list of :class:`~oci.data_safe.models.WorkRequestLogEntry` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_request_logs API. + Click `here `__ to see an example of how to use update_masking_column API. """ - resource_path = "/workRequests/{workRequestId}/logs" - method = "GET" + resource_path = "/maskingPolicies/{maskingPolicyId}/maskingColumns/{maskingColumnKey}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "page", - "limit" + "if_match", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_work_request_logs got unknown kwargs: {!r}".format(extra_kwargs)) + "update_masking_column got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "workRequestId": work_request_id + "maskingColumnKey": masking_column_key, + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5411,15 +20976,10 @@ def list_work_request_logs(self, work_request_id, **kwargs): if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) - query_params = { - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) - } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} - header_params = { "accept": "application/json", "content-type": "application/json", + "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} @@ -5438,45 +20998,37 @@ def list_work_request_logs(self, work_request_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[WorkRequestLogEntry]") + body=update_masking_column_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - query_params=query_params, header_params=header_params, - response_type="list[WorkRequestLogEntry]") + body=update_masking_column_details) - def list_work_requests(self, compartment_id, **kwargs): + def update_masking_policy(self, masking_policy_id, update_masking_policy_details, **kwargs): """ - Gets a list of work requests. + Updates one or more attributes of the specified masking policy. - :param str compartment_id: (required) - A filter to return only resources that match the specified compartment OCID. + :param str masking_policy_id: (required) + The OCID of the masking policy. - :param str operation_type: (optional) - A filter to return only work requests that match the specific operation type. + :param oci.data_safe.models.UpdateMaskingPolicyDetails update_masking_policy_details: (required) + Details to update a masking policy. - :param str resource_id: (optional) - A filter to return only work requests that match the specified resource OCID. + :param str if_match: (optional) + For optimistic concurrency control. In the PUT or DELETE call + for a resource, set the if-match parameter to the value of the + etag from a previous GET or POST response for that resource. + The resource will be updated or deleted only if the etag you + provide matches the resource's current etag value. :param str opc_request_id: (optional) Unique identifier for the request. - :param str page: (optional) - For list pagination. The page token representing the page at which to start retrieving results. It is usually retrieved from a previous \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - - :param int limit: (optional) - For list pagination. The maximum number of items to return per page in a paginated \"List\" call. For details about how pagination works, see `List Pagination`__. - - __ https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/usingapi.htm#nine - :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. @@ -5489,42 +21041,41 @@ def list_work_requests(self, compartment_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 list of :class:`~oci.data_safe.models.WorkRequestSummary` + :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use list_work_requests API. + Click `here `__ to see an example of how to use update_masking_policy API. """ - resource_path = "/workRequests" - method = "GET" + resource_path = "/maskingPolicies/{maskingPolicyId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "operation_type", - "resource_id", - "opc_request_id", - "page", - "limit" + "if_match", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "list_work_requests got unknown kwargs: {!r}".format(extra_kwargs)) + "update_masking_policy got unknown kwargs: {!r}".format(extra_kwargs)) - query_params = { - "compartmentId": compartment_id, - "operationType": kwargs.get("operation_type", missing), - "resourceId": kwargs.get("resource_id", missing), - "page": kwargs.get("page", missing), - "limit": kwargs.get("limit", missing) + path_params = { + "maskingPolicyId": masking_policy_id } - query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) header_params = { "accept": "application/json", "content-type": "application/json", + "if-match": kwargs.get("if_match", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -5542,37 +21093,27 @@ def list_work_requests(self, compartment_id, **kwargs): self.base_client.call_api, resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[WorkRequestSummary]") + body=update_masking_policy_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, - query_params=query_params, + path_params=path_params, header_params=header_params, - response_type="list[WorkRequestSummary]") + body=update_masking_policy_details) - def refresh_security_assessment(self, security_assessment_id, run_security_assessment_details, **kwargs): + def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connector_details, **kwargs): """ - Runs a security assessment, refreshes the latest assessment, and saves it for future reference. - The assessment runs with a securityAssessmentId of type LATEST. Before you start, first call the ListSecurityAssessments operation with filter \"type = latest\" to get the security assessment id for the target's latest assessment. - - - :param str security_assessment_id: (required) - The OCID of the security assessment. + Updates one or more attributes of the specified on-premises connector. - :param oci.data_safe.models.RunSecurityAssessmentDetails run_security_assessment_details: (required) - Details to create an on-demand saved security assessment. - :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 on_prem_connector_id: (required) + The OCID of the on-premises connector. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param oci.data_safe.models.UpdateOnPremConnectorDetails update_on_prem_connector_details: (required) + The details used to update a on-premises connector. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -5581,6 +21122,9 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -5597,26 +21141,25 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use refresh_security_assessment API. + Click `here `__ to see an example of how to use update_on_prem_connector API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/refresh" - method = "POST" + resource_path = "/onPremConnectors/{onPremConnectorId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", - "opc_request_id", - "if_match" + "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( - "refresh_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "update_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "onPremConnectorId": on_prem_connector_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5628,9 +21171,8 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses 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), - "if-match": kwargs.get("if_match", missing) + "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} @@ -5641,7 +21183,6 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses 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( @@ -5650,27 +21191,25 @@ def refresh_security_assessment(self, security_assessment_id, run_security_asses method=method, path_params=path_params, header_params=header_params, - body=run_security_assessment_details) + body=update_on_prem_connector_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=run_security_assessment_details) + body=update_on_prem_connector_details) - def refresh_user_assessment(self, user_assessment_id, run_user_assessment_details, **kwargs): + def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_details, on_prem_connector_id, **kwargs): """ - Refreshes the latest assessment and saves it for future reference. This operation runs with a userAssessmentId of type LATEST. - Before you start, first call the ListUserAssessments operation with filter \"type = latest\" to get the user assessment ID for - the target's latest assessment. + Updates the wallet for the specified on-premises connector to a new version. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param oci.data_safe.models.UpdateOnPremConnectorWalletDetails update_on_prem_connector_wallet_details: (required) + The details used to update an on-premises connector's wallet. - :param oci.data_safe.models.RunUserAssessmentDetails run_user_assessment_details: (required) - The details required to create an on-demand saved user assessment. + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. :param str opc_retry_token: (optional) A token that uniquely identifies a request so it can be retried in case of a timeout or @@ -5678,9 +21217,6 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail 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) - Unique identifier for the request. - :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the if-match parameter to the value of the @@ -5688,6 +21224,9 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -5704,26 +21243,26 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use refresh_user_assessment API. + Click `here `__ to see an example of how to use update_on_prem_connector_wallet API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/refresh" - method = "POST" + resource_path = "/onPremConnectors/{onPremConnectorId}/wallet" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "opc_retry_token", - "opc_request_id", - "if_match" + "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( - "refresh_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "update_on_prem_connector_wallet got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "onPremConnectorId": on_prem_connector_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5736,8 +21275,8 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail "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), - "if-match": kwargs.get("if_match", missing) + "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} @@ -5757,22 +21296,25 @@ def refresh_user_assessment(self, user_assessment_id, run_user_assessment_detail method=method, path_params=path_params, header_params=header_params, - body=run_user_assessment_details) + body=update_on_prem_connector_wallet_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=run_user_assessment_details) + body=update_on_prem_connector_wallet_details) - def set_security_assessment_baseline(self, security_assessment_id, **kwargs): + def update_report_definition(self, report_definition_id, update_report_definition_details, **kwargs): """ - Sets the saved security assessment as the baseline in the compartment where the the specified assessment resides. The security assessment needs to be of type 'SAVED'. + Updates the specified report definition. Only user created report definition can be updated. Seeded report definitions need to be saved as new report definition first. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str report_definition_id: (required) + Unique report definition identifier + + :param oci.data_safe.models.UpdateReportDefinitionDetails update_report_definition_details: (required) + Details for the modified report definition. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -5781,18 +21323,15 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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) - Unique identifier for the request. - - :param oci.data_safe.models.SecurityAssessmentBaseLineDetails base_line_details: (optional) - Details of security assessment that need to be updated while setting the baseline. - :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. @@ -5809,27 +21348,26 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use set_security_assessment_baseline API. + Click `here `__ to see an example of how to use update_report_definition API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/setBaseline" - method = "POST" + resource_path = "/reportDefinitions/{reportDefinitionId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id", - "base_line_details" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "set_security_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) + "update_report_definition got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "reportDefinitionId": report_definition_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5842,8 +21380,8 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "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} @@ -5863,22 +21401,28 @@ def set_security_assessment_baseline(self, security_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details')) + body=update_report_definition_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details')) + body=update_report_definition_details) - def set_user_assessment_baseline(self, user_assessment_id, **kwargs): + def update_security_assessment(self, security_assessment_id, update_security_assessment_details, **kwargs): """ - Sets the saved user assessment as the baseline in the compartment where the specified assessment resides. The user assessment needs to be of type 'SAVED'. + Updates one or more attributes of the specified security assessment. This operation allows to update the security assessment displayName, description, or schedule. + + + :param str security_assessment_id: (required) + The OCID of the security assessment. + :param oci.data_safe.models.UpdateSecurityAssessmentDetails update_security_assessment_details: (required) + The information to be updated. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str opc_request_id: (optional) + Unique identifier for the request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -5887,18 +21431,6 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. - - :param str opc_request_id: (optional) - Unique identifier for the request. - - :param oci.data_safe.models.UserAssessmentBaseLineDetails base_line_details: (optional) - Details of user assessment that need to be updated while setting the baseline. - :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. @@ -5915,27 +21447,25 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use set_user_assessment_baseline API. + Click `here `__ to see an example of how to use update_security_assessment API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/setBaseline" - method = "POST" + resource_path = "/securityAssessments/{securityAssessmentId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "if_match", - "opc_retry_token", "opc_request_id", - "base_line_details" + "if_match" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "set_user_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) + "update_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "securityAssessmentId": security_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -5947,9 +21477,8 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): header_params = { "accept": "application/json", "content-type": "application/json", - "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), - "opc-request-id": kwargs.get("opc_request_id", missing) + "opc-request-id": kwargs.get("opc_request_id", missing), + "if-match": kwargs.get("if_match", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -5960,7 +21489,6 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -5969,23 +21497,28 @@ def set_user_assessment_baseline(self, user_assessment_id, **kwargs): method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details')) + body=update_security_assessment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=kwargs.get('base_line_details')) + body=update_security_assessment_details) - def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): + def update_sensitive_column(self, sensitive_data_model_id, sensitive_column_key, update_sensitive_column_details, **kwargs): """ - Removes the baseline setting for the saved security assessment. The saved security assessment is no longer considered a baseline. - Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + Updates one or more attributes of the specified sensitive column. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param str sensitive_column_key: (required) + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + :param oci.data_safe.models.UpdateSensitiveColumnDetails update_sensitive_column_details: (required) + Details to update a sensitive column. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -5994,12 +21527,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. - :param str opc_request_id: (optional) Unique identifier for the request. @@ -6019,26 +21546,26 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use unset_security_assessment_baseline API. + Click `here `__ to see an example of how to use update_sensitive_column API. """ - resource_path = "/securityAssessments/{securityAssessmentId}/actions/unsetBaseline" - method = "POST" + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/sensitiveColumns/{sensitiveColumnKey}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "unset_security_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) + "update_sensitive_column got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "sensitiveDataModelId": sensitive_data_model_id, + "sensitiveColumnKey": sensitive_column_key } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6051,7 +21578,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -6063,7 +21589,6 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -6071,22 +21596,27 @@ def unset_security_assessment_baseline(self, security_assessment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=update_sensitive_column_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=update_sensitive_column_details) - def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): + def update_sensitive_data_model(self, sensitive_data_model_id, update_sensitive_data_model_details, **kwargs): """ - Removes the baseline setting for the saved user assessment. The saved user assessment is no longer considered a baseline. - Sets the if-match parameter to the value of the etag from a previous GET or POST response for that resource. + Updates one or more attributes of the specified sensitive data model. Note that updating any attribute of a sensitive + data model does not perform data discovery. - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.UpdateSensitiveDataModelDetails update_sensitive_data_model_details: (required) + Details to update a sensitive data model. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6095,12 +21625,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. - :param str opc_request_id: (optional) Unique identifier for the request. @@ -6120,26 +21644,25 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use unset_user_assessment_baseline API. + Click `here `__ to see an example of how to use update_sensitive_data_model API. """ - resource_path = "/userAssessments/{userAssessmentId}/actions/unsetBaseline" - method = "POST" + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}" + method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", "if_match", - "opc_retry_token", "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "unset_user_assessment_baseline got unknown kwargs: {!r}".format(extra_kwargs)) + "update_sensitive_data_model got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "sensitiveDataModelId": sensitive_data_model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6152,7 +21675,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): "accept": "application/json", "content-type": "application/json", "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing), "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} @@ -6164,7 +21686,6 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): if retry_strategy: if not isinstance(retry_strategy, retry.NoneRetryStrategy): - self.base_client.add_opc_retry_token_if_needed(header_params) self.base_client.add_opc_client_retries_header(header_params) retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) return retry_strategy.make_retrying_call( @@ -6172,24 +21693,26 @@ def unset_user_assessment_baseline(self, user_assessment_id, **kwargs): resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=update_sensitive_data_model_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, - header_params=header_params) + header_params=header_params, + body=update_sensitive_data_model_details) - def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, **kwargs): + def update_sensitive_type(self, sensitive_type_id, update_sensitive_type_details, **kwargs): """ - Updates one or more attributes of the specified Data Safe private endpoint. + Updates one or more attributes of the specified sensitive type. - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + :param str sensitive_type_id: (required) + The OCID of the sensitive type. - :param oci.data_safe.models.UpdateDataSafePrivateEndpointDetails update_data_safe_private_endpoint_details: (required) - The details used to update a Data Safe private endpoint. + :param oci.data_safe.models.UpdateSensitiveTypeDetails update_sensitive_type_details: (required) + Details to update a sensitive type. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6217,9 +21740,9 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_data_safe_private_endpoint API. + Click `here `__ to see an example of how to use update_sensitive_type API. """ - resource_path = "/dataSafePrivateEndpoints/{dataSafePrivateEndpointId}" + resource_path = "/sensitiveTypes/{sensitiveTypeId}" method = "PUT" # Don't accept unknown kwargs @@ -6232,10 +21755,10 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "update_data_safe_private_endpoint got unknown kwargs: {!r}".format(extra_kwargs)) + "update_sensitive_type got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "dataSafePrivateEndpointId": data_safe_private_endpoint_id + "sensitiveTypeId": sensitive_type_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6267,25 +21790,25 @@ def update_data_safe_private_endpoint(self, data_safe_private_endpoint_id, updat method=method, path_params=path_params, header_params=header_params, - body=update_data_safe_private_endpoint_details) + body=update_sensitive_type_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=update_data_safe_private_endpoint_details) + body=update_sensitive_type_details) - def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connector_details, **kwargs): + def update_target_alert_policy_association(self, target_alert_policy_association_id, update_target_alert_policy_association_details, **kwargs): """ - Updates one or more attributes of the specified on-premises connector. + Updates the specified target-alert policy association. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param str target_alert_policy_association_id: (required) + The OCID of the target-alert policy association. - :param oci.data_safe.models.UpdateOnPremConnectorDetails update_on_prem_connector_details: (required) - The details used to update a on-premises connector. + :param oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails update_target_alert_policy_association_details: (required) + The details used to update the target-alert policy association. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6313,9 +21836,9 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_on_prem_connector API. + Click `here `__ to see an example of how to use update_target_alert_policy_association API. """ - resource_path = "/onPremConnectors/{onPremConnectorId}" + resource_path = "/targetAlertPolicyAssociations/{targetAlertPolicyAssociationId}" method = "PUT" # Don't accept unknown kwargs @@ -6328,10 +21851,10 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "update_on_prem_connector got unknown kwargs: {!r}".format(extra_kwargs)) + "update_target_alert_policy_association got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "onPremConnectorId": on_prem_connector_id + "targetAlertPolicyAssociationId": target_alert_policy_association_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6363,31 +21886,28 @@ def update_on_prem_connector(self, on_prem_connector_id, update_on_prem_connecto method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_details) + body=update_target_alert_policy_association_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_details) + body=update_target_alert_policy_association_details) - def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_details, on_prem_connector_id, **kwargs): + def update_target_database(self, target_database_id, update_target_database_details, **kwargs): """ - Updates the wallet for the specified on-premises connector to a new version. + Updates one or more attributes of the specified Data Safe target database. - :param oci.data_safe.models.UpdateOnPremConnectorWalletDetails update_on_prem_connector_wallet_details: (required) - The details used to update an on-premises connector's wallet. + :param str target_database_id: (required) + The OCID of the Data Safe target database. - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param oci.data_safe.models.UpdateTargetDatabaseDetails update_target_database_details: (required) + Details used to update the target database in Data Safe. - :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) + Unique identifier for the request. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6396,8 +21916,11 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_request_id: (optional) - Unique identifier for the request. + :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. @@ -6415,26 +21938,26 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_on_prem_connector_wallet API. + Click `here `__ to see an example of how to use update_target_database API. """ - resource_path = "/onPremConnectors/{onPremConnectorId}/wallet" + resource_path = "/targetDatabases/{targetDatabaseId}" method = "PUT" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_retry_token", + "opc_request_id", "if_match", - "opc_request_id" + "opc_retry_token" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "update_on_prem_connector_wallet got unknown kwargs: {!r}".format(extra_kwargs)) + "update_target_database got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "onPremConnectorId": on_prem_connector_id + "targetDatabaseId": target_database_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6446,9 +21969,9 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail 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), "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} @@ -6468,24 +21991,24 @@ def update_on_prem_connector_wallet(self, update_on_prem_connector_wallet_detail method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_wallet_details) + body=update_target_database_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=update_on_prem_connector_wallet_details) + body=update_target_database_details) - def update_security_assessment(self, security_assessment_id, update_security_assessment_details, **kwargs): + def update_user_assessment(self, user_assessment_id, update_user_assessment_details, **kwargs): """ - Updates one or more attributes of the specified security assessment. This operation allows to update the security assessment displayName, description, or schedule. + Updates one or more attributes of the specified user assessment. This operation allows to update the user assessment displayName, description, or schedule. - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str user_assessment_id: (required) + The OCID of the user assessment. - :param oci.data_safe.models.UpdateSecurityAssessmentDetails update_security_assessment_details: (required) + :param oci.data_safe.models.UpdateUserAssessmentDetails update_user_assessment_details: (required) The information to be updated. :param str opc_request_id: (optional) @@ -6514,9 +22037,9 @@ def update_security_assessment(self, security_assessment_id, update_security_ass :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_security_assessment API. + Click `here `__ to see an example of how to use update_user_assessment API. """ - resource_path = "/securityAssessments/{securityAssessmentId}" + resource_path = "/userAssessments/{userAssessmentId}" method = "PUT" # Don't accept unknown kwargs @@ -6529,10 +22052,10 @@ def update_security_assessment(self, security_assessment_id, update_security_ass extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "update_security_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "update_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "securityAssessmentId": security_assessment_id + "userAssessmentId": user_assessment_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6564,28 +22087,29 @@ def update_security_assessment(self, security_assessment_id, update_security_ass method=method, path_params=path_params, header_params=header_params, - body=update_security_assessment_details) + body=update_user_assessment_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=update_security_assessment_details) + body=update_user_assessment_details) - def update_target_database(self, target_database_id, update_target_database_details, **kwargs): + def upload_masking_policy(self, upload_masking_policy_details, masking_policy_id, **kwargs): """ - Updates one or more attributes of the specified Data Safe target database. - + Uploads a masking policy file (also called template) to update the specified masking policy. + To create a new masking policy using a file, first use the CreateMaskingPolicy operation + to create an empty masking policy and then use this endpoint to upload the masking policy file. + Note that the upload operation replaces the content of the specified masking policy, + including all the existing columns and masking formats, with the content of the file. - :param str target_database_id: (required) - The OCID of the Data Safe target database. - :param oci.data_safe.models.UpdateTargetDatabaseDetails update_target_database_details: (required) - Details used to update the target database in Data Safe. + :param stream upload_masking_policy_details: (required) + Details to upload a masking policy file. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param str masking_policy_id: (required) + The OCID of the masking policy. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6594,11 +22118,8 @@ def update_target_database(self, target_database_id, update_target_database_deta The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. - :param str opc_retry_token: (optional) - A token that uniquely identifies a request so it can be retried in case of a timeout or - server error without risk of executing that same action again. Retry tokens expire after 24 - hours, but can be invalidated before then due to conflicting operations. For example, if a resource - has been deleted and purged from the system, then a retry of the original creation request might be rejected. + :param str opc_request_id: (optional) + Unique identifier for the request. :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. @@ -6611,31 +22132,38 @@ def update_target_database(self, target_database_id, update_target_database_deta :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 + :param int buffer_limit: (optional) + A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. + If the stream size is greater than the buffer_limit, a BufferError exception will be thrown. + + The buffer_limit parameter is used when the stream object does not have a `seek`, `tell`, or `fileno` property for the Python Request library to calculate out the content length. + If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. + Large streams can cause the process to freeze, consider passing in content-length for large streams instead. :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_target_database API. + Click `here `__ to see an example of how to use upload_masking_policy API. """ - resource_path = "/targetDatabases/{targetDatabaseId}" - method = "PUT" + resource_path = "/maskingPolicies/{maskingPolicyId}/actions/upload" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", + "buffer_limit", "if_match", - "opc_retry_token" + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "update_target_database got unknown kwargs: {!r}".format(extra_kwargs)) + "upload_masking_policy got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "targetDatabaseId": target_database_id + "maskingPolicyId": masking_policy_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6646,13 +22174,32 @@ def update_target_database(self, target_database_id, update_target_database_deta header_params = { "accept": "application/json", - "content-type": "application/json", - "opc-request-id": kwargs.get("opc_request_id", missing), "if-match": kwargs.get("if_match", missing), - "opc-retry-token": kwargs.get("opc_retry_token", missing) + "opc-request-id": kwargs.get("opc_request_id", missing) } header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. + try: + upload_masking_policy_details + except NameError: + upload_masking_policy_details = kwargs.get("upload_masking_policy_details", missing) + + if upload_masking_policy_details is not missing and upload_masking_policy_details is not None: + if (not isinstance(upload_masking_policy_details, (six.binary_type, six.string_types)) and + not hasattr(upload_masking_policy_details, "read")): + raise TypeError('The body must be a string, bytes, or provide a read() method.') + + if hasattr(upload_masking_policy_details, 'fileno') and hasattr(upload_masking_policy_details, 'name') and upload_masking_policy_details.name != '': + if requests.utils.super_len(upload_masking_policy_details) == 0: + header_params['Content-Length'] = '0' + + # If content length is not given and stream object have no 'fileno' and is not a string or bytes, try to calculate content length + elif 'Content-Length' not in header_params and not is_content_length_calculable_by_req_util(upload_masking_policy_details): + calculated_obj = back_up_body_calculate_stream_content_length(upload_masking_policy_details, kwargs.get("buffer_limit")) + header_params['Content-Length'] = calculated_obj["content_length"] + upload_masking_policy_details = calculated_obj["byte_content"] + retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy @@ -6660,7 +22207,6 @@ def update_target_database(self, target_database_id, update_target_database_deta 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( @@ -6669,28 +22215,28 @@ def update_target_database(self, target_database_id, update_target_database_deta method=method, path_params=path_params, header_params=header_params, - body=update_target_database_details) + body=upload_masking_policy_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=update_target_database_details) + body=upload_masking_policy_details) - def update_user_assessment(self, user_assessment_id, update_user_assessment_details, **kwargs): + def upload_sensitive_data_model(self, sensitive_data_model_id, upload_sensitive_data_model_details, **kwargs): """ - Updates one or more attributes of the specified user assessment. This operation allows to update the user assessment displayName, description, or schedule. + Uploads a sensitive data model file (also called template) to update the specified sensitive data model. To create + a new sensitive data model using a file, first use the CreateSensitiveDataModel operation to create an empty data model + and then use this endpoint to upload the data model file. Note that the upload operation replaces the content of the + specified sensitive data model, including all the existing columns and their relationships, with the content of the file. - :param str user_assessment_id: (required) - The OCID of the user assessment. - - :param oci.data_safe.models.UpdateUserAssessmentDetails update_user_assessment_details: (required) - The information to be updated. + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. - :param str opc_request_id: (optional) - Unique identifier for the request. + :param stream upload_sensitive_data_model_details: (required) + Details to upload a sensitive data model file. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call @@ -6699,6 +22245,9 @@ def update_user_assessment(self, user_assessment_id, update_user_assessment_deta The resource will be updated or deleted only if the etag you provide matches the resource's current etag value. + :param str opc_request_id: (optional) + Unique identifier for the request. + :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. @@ -6710,30 +22259,38 @@ def update_user_assessment(self, user_assessment_id, update_user_assessment_deta :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 + :param int buffer_limit: (optional) + A buffer limit for the stream to be buffered. buffer_limit is used to set the buffer size capacity. Streams will be read until the size of the buffer reaches the buffer_limit. + If the stream size is greater than the buffer_limit, a BufferError exception will be thrown. + + The buffer_limit parameter is used when the stream object does not have a `seek`, `tell`, or `fileno` property for the Python Request library to calculate out the content length. + If buffer_limit is not passed, then the buffer_limit will be defaulted to 100MB. + Large streams can cause the process to freeze, consider passing in content-length for large streams instead. :return: A :class:`~oci.response.Response` object with data of type None :rtype: :class:`~oci.response.Response` :example: - Click `here `__ to see an example of how to use update_user_assessment API. + Click `here `__ to see an example of how to use upload_sensitive_data_model API. """ - resource_path = "/userAssessments/{userAssessmentId}" - method = "PUT" + resource_path = "/sensitiveDataModels/{sensitiveDataModelId}/actions/upload" + method = "POST" # Don't accept unknown kwargs expected_kwargs = [ "allow_control_chars", "retry_strategy", - "opc_request_id", - "if_match" + "buffer_limit", + "if_match", + "opc_request_id" ] extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] if extra_kwargs: raise ValueError( - "update_user_assessment got unknown kwargs: {!r}".format(extra_kwargs)) + "upload_sensitive_data_model got unknown kwargs: {!r}".format(extra_kwargs)) path_params = { - "userAssessmentId": user_assessment_id + "sensitiveDataModelId": sensitive_data_model_id } path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} @@ -6744,12 +22301,32 @@ def update_user_assessment(self, user_assessment_id, update_user_assessment_deta 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) + "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} + # If the body parameter is optional we need to assign it to a variable so additional type checking can be performed. + try: + upload_sensitive_data_model_details + except NameError: + upload_sensitive_data_model_details = kwargs.get("upload_sensitive_data_model_details", missing) + + if upload_sensitive_data_model_details is not missing and upload_sensitive_data_model_details is not None: + if (not isinstance(upload_sensitive_data_model_details, (six.binary_type, six.string_types)) and + not hasattr(upload_sensitive_data_model_details, "read")): + raise TypeError('The body must be a string, bytes, or provide a read() method.') + + if hasattr(upload_sensitive_data_model_details, 'fileno') and hasattr(upload_sensitive_data_model_details, 'name') and upload_sensitive_data_model_details.name != '': + if requests.utils.super_len(upload_sensitive_data_model_details) == 0: + header_params['Content-Length'] = '0' + + # If content length is not given and stream object have no 'fileno' and is not a string or bytes, try to calculate content length + elif 'Content-Length' not in header_params and not is_content_length_calculable_by_req_util(upload_sensitive_data_model_details): + calculated_obj = back_up_body_calculate_stream_content_length(upload_sensitive_data_model_details, kwargs.get("buffer_limit")) + header_params['Content-Length'] = calculated_obj["content_length"] + upload_sensitive_data_model_details = calculated_obj["byte_content"] + retry_strategy = self.base_client.get_preferred_retry_strategy( operation_retry_strategy=kwargs.get('retry_strategy'), client_retry_strategy=self.retry_strategy @@ -6765,11 +22342,11 @@ def update_user_assessment(self, user_assessment_id, update_user_assessment_deta method=method, path_params=path_params, header_params=header_params, - body=update_user_assessment_details) + body=upload_sensitive_data_model_details) else: return self.base_client.call_api( resource_path=resource_path, method=method, path_params=path_params, header_params=header_params, - body=update_user_assessment_details) + body=upload_sensitive_data_model_details) diff --git a/src/oci/data_safe/data_safe_client_composite_operations.py b/src/oci/data_safe/data_safe_client_composite_operations.py index 8e605a8005..935385476b 100644 --- a/src/oci/data_safe/data_safe_client_composite_operations.py +++ b/src/oci/data_safe/data_safe_client_composite_operations.py @@ -64,28 +64,25 @@ def activate_target_database_and_wait_for_state(self, activate_target_database_d except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def change_data_safe_private_endpoint_compartment_and_wait_for_state(self, data_safe_private_endpoint_id, change_data_safe_private_endpoint_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def add_masking_columns_from_sdm_and_wait_for_state(self, masking_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.change_data_safe_private_endpoint_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.add_masking_columns_from_sdm` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. - - :param oci.data_safe.models.ChangeDataSafePrivateEndpointCompartmentDetails change_data_safe_private_endpoint_compartment_details: (required) - The details used to change the compartment of a Data Safe private endpoint. + :param str masking_policy_id: (required) + The OCID of the masking policy. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_data_safe_private_endpoint_compartment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.add_masking_columns_from_sdm` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.change_data_safe_private_endpoint_compartment(data_safe_private_endpoint_id, change_data_safe_private_endpoint_compartment_details, **operation_kwargs) + operation_result = self.client.add_masking_columns_from_sdm(masking_policy_id, **operation_kwargs) if not wait_for_states: return operation_result @@ -105,28 +102,28 @@ def change_data_safe_private_endpoint_compartment_and_wait_for_state(self, data_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def compare_security_assessment_and_wait_for_state(self, security_assessment_id, compare_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def apply_discovery_job_results_and_wait_for_state(self, sensitive_data_model_id, apply_discovery_job_results_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.compare_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.apply_discovery_job_results` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. - :param oci.data_safe.models.CompareSecurityAssessmentDetails compare_security_assessment_details: (required) - Details of the security assessment comparison. + :param oci.data_safe.models.ApplyDiscoveryJobResultsDetails apply_discovery_job_results_details: (required) + Details to apply the discovery results to a sensitive data model. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.compare_security_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.apply_discovery_job_results` :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.compare_security_assessment(security_assessment_id, compare_security_assessment_details, **operation_kwargs) + operation_result = self.client.apply_discovery_job_results(sensitive_data_model_id, apply_discovery_job_results_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -146,28 +143,28 @@ def compare_security_assessment_and_wait_for_state(self, security_assessment_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def compare_user_assessment_and_wait_for_state(self, user_assessment_id, compare_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def calculate_audit_volume_available_and_wait_for_state(self, audit_profile_id, calculate_audit_volume_available_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.compare_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.calculate_audit_volume_available` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str audit_profile_id: (required) + The OCID of the audit. - :param oci.data_safe.models.CompareUserAssessmentDetails compare_user_assessment_details: (required) - Details of the user assessment comparison. + :param oci.data_safe.models.CalculateAuditVolumeAvailableDetails calculate_audit_volume_available_details: (required) + Details for the calculation of audit volume available on target database. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.compare_user_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.calculate_audit_volume_available` :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.compare_user_assessment(user_assessment_id, compare_user_assessment_details, **operation_kwargs) + operation_result = self.client.calculate_audit_volume_available(audit_profile_id, calculate_audit_volume_available_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -187,25 +184,28 @@ def compare_user_assessment_and_wait_for_state(self, user_assessment_id, compare except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_data_safe_private_endpoint_and_wait_for_state(self, create_data_safe_private_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def calculate_audit_volume_collected_and_wait_for_state(self, audit_profile_id, calculate_audit_volume_collected_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.create_data_safe_private_endpoint` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.calculate_audit_volume_collected` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param oci.data_safe.models.CreateDataSafePrivateEndpointDetails create_data_safe_private_endpoint_details: (required) - Details to create a new private endpoint. + :param str audit_profile_id: (required) + The OCID of the audit. + + :param oci.data_safe.models.CalculateAuditVolumeCollectedDetails calculate_audit_volume_collected_details: (required) + Details for the calculation of audit volume collected by data safe. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_data_safe_private_endpoint` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.calculate_audit_volume_collected` :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_data_safe_private_endpoint(create_data_safe_private_endpoint_details, **operation_kwargs) + operation_result = self.client.calculate_audit_volume_collected(audit_profile_id, calculate_audit_volume_collected_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -225,25 +225,28 @@ def create_data_safe_private_endpoint_and_wait_for_state(self, create_data_safe_ except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_on_prem_connector_and_wait_for_state(self, create_on_prem_connector_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_audit_archive_retrieval_compartment_and_wait_for_state(self, audit_archive_retrieval_id, change_audit_archive_retrieval_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.create_on_prem_connector` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_audit_archive_retrieval_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param oci.data_safe.models.CreateOnPremConnectorDetails create_on_prem_connector_details: (required) - The details used to create a new on-premises connector. + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. + + :param oci.data_safe.models.ChangeAuditArchiveRetrievalCompartmentDetails change_audit_archive_retrieval_compartment_details: (required) + The details used to change the compartment of a archive retrieval. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_on_prem_connector` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_audit_archive_retrieval_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.create_on_prem_connector(create_on_prem_connector_details, **operation_kwargs) + operation_result = self.client.change_audit_archive_retrieval_compartment(audit_archive_retrieval_id, change_audit_archive_retrieval_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -263,25 +266,28 @@ def create_on_prem_connector_and_wait_for_state(self, create_on_prem_connector_d except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_security_assessment_and_wait_for_state(self, create_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_audit_policy_compartment_and_wait_for_state(self, audit_policy_id, change_audit_policy_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.create_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_audit_policy_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param oci.data_safe.models.CreateSecurityAssessmentDetails create_security_assessment_details: (required) - The details used to create a new saved security assessment. + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param oci.data_safe.models.ChangeAuditPolicyCompartmentDetails change_audit_policy_compartment_details: (required) + Details for the compartment move. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_security_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_audit_policy_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.create_security_assessment(create_security_assessment_details, **operation_kwargs) + operation_result = self.client.change_audit_policy_compartment(audit_policy_id, change_audit_policy_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -301,25 +307,28 @@ def create_security_assessment_and_wait_for_state(self, create_security_assessme except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_target_database_and_wait_for_state(self, create_target_database_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_audit_profile_compartment_and_wait_for_state(self, audit_profile_id, change_audit_profile_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.create_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_audit_profile_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param oci.data_safe.models.CreateTargetDatabaseDetails create_target_database_details: (required) - Details of the target database. + :param str audit_profile_id: (required) + The OCID of the audit. + + :param oci.data_safe.models.ChangeAuditProfileCompartmentDetails change_audit_profile_compartment_details: (required) + Details for the compartment move. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_target_database` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_audit_profile_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.create_target_database(create_target_database_details, **operation_kwargs) + operation_result = self.client.change_audit_profile_compartment(audit_profile_id, change_audit_profile_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -339,25 +348,28 @@ def create_target_database_and_wait_for_state(self, create_target_database_detai except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def create_user_assessment_and_wait_for_state(self, create_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_data_safe_private_endpoint_compartment_and_wait_for_state(self, data_safe_private_endpoint_id, change_data_safe_private_endpoint_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.create_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_data_safe_private_endpoint_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param oci.data_safe.models.CreateUserAssessmentDetails create_user_assessment_details: (required) - The details used to create a new saved user assessment. + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. + + :param oci.data_safe.models.ChangeDataSafePrivateEndpointCompartmentDetails change_data_safe_private_endpoint_compartment_details: (required) + The details used to change the compartment of a Data Safe private endpoint. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_user_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_data_safe_private_endpoint_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.create_user_assessment(create_user_assessment_details, **operation_kwargs) + operation_result = self.client.change_data_safe_private_endpoint_compartment(data_safe_private_endpoint_id, change_data_safe_private_endpoint_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -377,25 +389,28 @@ def create_user_assessment_and_wait_for_state(self, create_user_assessment_detai except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def deactivate_target_database_and_wait_for_state(self, target_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_report_compartment_and_wait_for_state(self, report_id, change_report_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.deactivate_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_report_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str target_database_id: (required) - The OCID of the Data Safe target database. + :param str report_id: (required) + Unique report identifier + + :param oci.data_safe.models.ChangeReportCompartmentDetails change_report_compartment_details: (required) + Details for the different Report. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.deactivate_target_database` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_report_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.deactivate_target_database(target_database_id, **operation_kwargs) + operation_result = self.client.change_report_compartment(report_id, change_report_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -415,33 +430,28 @@ def deactivate_target_database_and_wait_for_state(self, target_database_id, wait except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private_endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_report_definition_compartment_and_wait_for_state(self, report_definition_id, change_report_definition_compartment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.delete_data_safe_private_endpoint` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_report_definition_compartment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. + :param str report_definition_id: (required) + Unique report definition identifier + + :param oci.data_safe.models.ChangeReportDefinitionCompartmentDetails change_report_definition_compartment_details: (required) + Details for the different ReportDefinition. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_data_safe_private_endpoint` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_report_definition_compartment` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = None - try: - operation_result = self.client.delete_data_safe_private_endpoint(data_safe_private_endpoint_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.change_report_definition_compartment(report_definition_id, change_report_definition_compartment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -461,33 +471,28 @@ def delete_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def change_retention_and_wait_for_state(self, audit_profile_id, change_retention_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.delete_on_prem_connector` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.change_retention` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str on_prem_connector_id: (required) - The OCID of the on-premises connector. + :param str audit_profile_id: (required) + The OCID of the audit. + + :param oci.data_safe.models.ChangeRetentionDetails change_retention_details: (required) + Details for the audit retention months to be modified. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_on_prem_connector` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.change_retention` :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_on_prem_connector(on_prem_connector_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.change_retention(audit_profile_id, change_retention_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -507,33 +512,28 @@ def delete_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, wait except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_security_assessment_and_wait_for_state(self, security_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def compare_security_assessment_and_wait_for_state(self, security_assessment_id, compare_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.delete_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.compare_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). :param str security_assessment_id: (required) The OCID of the security assessment. + :param oci.data_safe.models.CompareSecurityAssessmentDetails compare_security_assessment_details: (required) + Details of the security assessment comparison. + :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_security_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.compare_security_assessment` :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_security_assessment(security_assessment_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.compare_security_assessment(security_assessment_id, compare_security_assessment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -553,33 +553,28 @@ def delete_security_assessment_and_wait_for_state(self, security_assessment_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_target_database_and_wait_for_state(self, target_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def compare_user_assessment_and_wait_for_state(self, user_assessment_id, compare_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.delete_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.compare_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str target_database_id: (required) - The OCID of the Data Safe target database. + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param oci.data_safe.models.CompareUserAssessmentDetails compare_user_assessment_details: (required) + Details of the user assessment comparison. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_target_database` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.compare_user_assessment` :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_target_database(target_database_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.compare_user_assessment(user_assessment_id, compare_user_assessment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -599,33 +594,25 @@ def delete_target_database_and_wait_for_state(self, target_database_id, wait_for except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def delete_user_assessment_and_wait_for_state(self, user_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_audit_archive_retrieval_and_wait_for_state(self, create_audit_archive_retrieval_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.delete_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_audit_archive_retrieval` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param oci.data_safe.models.CreateAuditArchiveRetrievalDetails create_audit_archive_retrieval_details: (required) + Details for creating retrieving archived audit data. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_user_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_audit_archive_retrieval` :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_user_assessment(user_assessment_id, **operation_kwargs) - except oci.exceptions.ServiceError as e: - if e.status == 404: - return WAIT_RESOURCE_NOT_FOUND - else: - raise e - + operation_result = self.client.create_audit_archive_retrieval(create_audit_archive_retrieval_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -645,25 +632,25 @@ def delete_user_assessment_and_wait_for_state(self, user_assessment_id, wait_for except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def enable_data_safe_configuration_and_wait_for_state(self, enable_data_safe_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_data_safe_private_endpoint_and_wait_for_state(self, create_data_safe_private_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.enable_data_safe_configuration` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_data_safe_private_endpoint` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param oci.data_safe.models.EnableDataSafeConfigurationDetails enable_data_safe_configuration_details: (required) - The details used to enable Data Safe. + :param oci.data_safe.models.CreateDataSafePrivateEndpointDetails create_data_safe_private_endpoint_details: (required) + Details to create a new private endpoint. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.enable_data_safe_configuration` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_data_safe_private_endpoint` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.enable_data_safe_configuration(enable_data_safe_configuration_details, **operation_kwargs) + operation_result = self.client.create_data_safe_private_endpoint(create_data_safe_private_endpoint_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -683,28 +670,25 @@ def enable_data_safe_configuration_and_wait_for_state(self, enable_data_safe_con except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def generate_security_assessment_report_and_wait_for_state(self, security_assessment_id, generate_security_assessment_report_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_discovery_job_and_wait_for_state(self, create_discovery_job_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.generate_security_assessment_report` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_discovery_job` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str security_assessment_id: (required) - The OCID of the security assessment. - - :param oci.data_safe.models.GenerateSecurityAssessmentReportDetails generate_security_assessment_report_details: (required) - Details of the report. + :param oci.data_safe.models.CreateDiscoveryJobDetails create_discovery_job_details: (required) + The details used to run an incremental data discovery job :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_security_assessment_report` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_discovery_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.generate_security_assessment_report(security_assessment_id, generate_security_assessment_report_details, **operation_kwargs) + operation_result = self.client.create_discovery_job(create_discovery_job_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -724,28 +708,25 @@ def generate_security_assessment_report_and_wait_for_state(self, security_assess except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def generate_user_assessment_report_and_wait_for_state(self, user_assessment_id, generate_user_assessment_report_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_library_masking_format_and_wait_for_state(self, create_library_masking_format_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.generate_user_assessment_report` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_library_masking_format` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str user_assessment_id: (required) - The OCID of the user assessment. - - :param oci.data_safe.models.GenerateUserAssessmentReportDetails generate_user_assessment_report_details: (required) - Details of the report. + :param oci.data_safe.models.CreateLibraryMaskingFormatDetails create_library_masking_format_details: (required) + Details to create a new library masking format. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_user_assessment_report` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_library_masking_format` :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.generate_user_assessment_report(user_assessment_id, generate_user_assessment_report_details, **operation_kwargs) + operation_result = self.client.create_library_masking_format(create_library_masking_format_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -765,28 +746,28 @@ def generate_user_assessment_report_and_wait_for_state(self, user_assessment_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def refresh_security_assessment_and_wait_for_state(self, security_assessment_id, run_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_masking_column_and_wait_for_state(self, create_masking_column_details, masking_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.refresh_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_masking_column` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param oci.data_safe.models.CreateMaskingColumnDetails create_masking_column_details: (required) + Details to create a new masking column. - :param oci.data_safe.models.RunSecurityAssessmentDetails run_security_assessment_details: (required) - Details to create an on-demand saved security assessment. + :param str masking_policy_id: (required) + The OCID of the masking policy. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.refresh_security_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_masking_column` :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.refresh_security_assessment(security_assessment_id, run_security_assessment_details, **operation_kwargs) + operation_result = self.client.create_masking_column(create_masking_column_details, masking_policy_id, **operation_kwargs) if not wait_for_states: return operation_result @@ -806,28 +787,25 @@ def refresh_security_assessment_and_wait_for_state(self, security_assessment_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def refresh_user_assessment_and_wait_for_state(self, user_assessment_id, run_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_masking_policy_and_wait_for_state(self, create_masking_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.refresh_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_masking_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str user_assessment_id: (required) - The OCID of the user assessment. - - :param oci.data_safe.models.RunUserAssessmentDetails run_user_assessment_details: (required) - The details required to create an on-demand saved user assessment. + :param oci.data_safe.models.CreateMaskingPolicyDetails create_masking_policy_details: (required) + Details to create a new masking policy. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.refresh_user_assessment` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_masking_policy` :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.refresh_user_assessment(user_assessment_id, run_user_assessment_details, **operation_kwargs) + operation_result = self.client.create_masking_policy(create_masking_policy_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -847,25 +825,25 @@ def refresh_user_assessment_and_wait_for_state(self, user_assessment_id, run_use except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def set_security_assessment_baseline_and_wait_for_state(self, security_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_on_prem_connector_and_wait_for_state(self, create_on_prem_connector_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.set_security_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_on_prem_connector` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param oci.data_safe.models.CreateOnPremConnectorDetails create_on_prem_connector_details: (required) + The details used to create a new on-premises connector. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.set_security_assessment_baseline` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_on_prem_connector` :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.set_security_assessment_baseline(security_assessment_id, **operation_kwargs) + operation_result = self.client.create_on_prem_connector(create_on_prem_connector_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -885,25 +863,25 @@ def set_security_assessment_baseline_and_wait_for_state(self, security_assessmen except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def set_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_report_definition_and_wait_for_state(self, create_report_definition_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.set_user_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_report_definition` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param oci.data_safe.models.CreateReportDefinitionDetails create_report_definition_details: (required) + Details for the new report definition. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.set_user_assessment_baseline` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_report_definition` :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.set_user_assessment_baseline(user_assessment_id, **operation_kwargs) + operation_result = self.client.create_report_definition(create_report_definition_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -923,25 +901,25 @@ def set_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, wa except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def unset_security_assessment_baseline_and_wait_for_state(self, security_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_security_assessment_and_wait_for_state(self, create_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.unset_security_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str security_assessment_id: (required) - The OCID of the security assessment. + :param oci.data_safe.models.CreateSecurityAssessmentDetails create_security_assessment_details: (required) + The details used to create a new saved security assessment. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.unset_security_assessment_baseline` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_security_assessment` :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.unset_security_assessment_baseline(security_assessment_id, **operation_kwargs) + operation_result = self.client.create_security_assessment(create_security_assessment_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -961,25 +939,28 @@ def unset_security_assessment_baseline_and_wait_for_state(self, security_assessm except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def unset_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_sensitive_column_and_wait_for_state(self, sensitive_data_model_id, create_sensitive_column_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.unset_user_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_sensitive_column` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str user_assessment_id: (required) - The OCID of the user assessment. + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.CreateSensitiveColumnDetails create_sensitive_column_details: (required) + Details to create a new sensitive column. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.unset_user_assessment_baseline` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_sensitive_column` :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.unset_user_assessment_baseline(user_assessment_id, **operation_kwargs) + operation_result = self.client.create_sensitive_column(sensitive_data_model_id, create_sensitive_column_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -999,28 +980,25 @@ def unset_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def update_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_sensitive_data_model_and_wait_for_state(self, create_sensitive_data_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.update_data_safe_private_endpoint` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_sensitive_data_model` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). - :param str data_safe_private_endpoint_id: (required) - The OCID of the private endpoint. - - :param oci.data_safe.models.UpdateDataSafePrivateEndpointDetails update_data_safe_private_endpoint_details: (required) - The details used to update a Data Safe private endpoint. + :param oci.data_safe.models.CreateSensitiveDataModelDetails create_sensitive_data_model_details: (required) + Details to create a new sensitive data model. :param list[str] wait_for_states: An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` :param dict operation_kwargs: - A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_data_safe_private_endpoint` + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_sensitive_data_model` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait """ - operation_result = self.client.update_data_safe_private_endpoint(data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, **operation_kwargs) + operation_result = self.client.create_sensitive_data_model(create_sensitive_data_model_details, **operation_kwargs) if not wait_for_states: return operation_result @@ -1040,9 +1018,2253 @@ def update_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) - def update_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, update_on_prem_connector_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + def create_sensitive_type_and_wait_for_state(self, create_sensitive_type_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ - Calls :py:func:`~oci.data_safe.DataSafeClient.update_on_prem_connector` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + Calls :py:func:`~oci.data_safe.DataSafeClient.create_sensitive_type` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.CreateSensitiveTypeDetails create_sensitive_type_details: (required) + Details to create a new sensitive type. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_sensitive_type` + + :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_sensitive_type(create_sensitive_type_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_target_alert_policy_association_and_wait_for_state(self, create_target_alert_policy_association_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.create_target_alert_policy_association` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.CreateTargetAlertPolicyAssociationDetails create_target_alert_policy_association_details: (required) + The details used to create a new target-alert policy association. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_target_alert_policy_association` + + :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_target_alert_policy_association(create_target_alert_policy_association_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_target_database_and_wait_for_state(self, create_target_database_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.create_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.CreateTargetDatabaseDetails create_target_database_details: (required) + Details of the target database. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_target_database` + + :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_target_database(create_target_database_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def create_user_assessment_and_wait_for_state(self, create_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.create_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.CreateUserAssessmentDetails create_user_assessment_details: (required) + The details used to create a new saved user assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.create_user_assessment` + + :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_user_assessment(create_user_assessment_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def deactivate_target_database_and_wait_for_state(self, target_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.deactivate_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.deactivate_target_database` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.deactivate_target_database(target_database_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_audit_archive_retrieval_and_wait_for_state(self, audit_archive_retrieval_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_audit_archive_retrieval` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_audit_archive_retrieval` + + :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_audit_archive_retrieval(audit_archive_retrieval_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_audit_trail_and_wait_for_state(self, audit_trail_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_audit_trail` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_audit_trail` + + :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_audit_trail(audit_trail_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private_endpoint_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_data_safe_private_endpoint` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_data_safe_private_endpoint` + + :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_data_safe_private_endpoint(data_safe_private_endpoint_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_discovery_job_and_wait_for_state(self, discovery_job_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_discovery_job` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_discovery_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_discovery_job(discovery_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] + 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_library_masking_format_and_wait_for_state(self, library_masking_format_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_library_masking_format` and waits for the :py:class:`~oci.data_safe.models.LibraryMaskingFormat` acted upon + to enter the given state(s). + + :param str library_masking_format_id: (required) + The OCID of the library masking format. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.LibraryMaskingFormat.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_library_masking_format` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_library_masking_format(library_masking_format_id) + operation_result = None + try: + operation_result = self.client.delete_library_masking_format(library_masking_format_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + waiter_result = oci.wait_until( + self.client, + initial_get_result, + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + succeed_on_not_found=True, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_masking_policy_and_wait_for_state(self, masking_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_masking_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_masking_policy` + + :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_masking_policy(masking_policy_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_on_prem_connector` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str on_prem_connector_id: (required) + The OCID of the on-premises connector. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_on_prem_connector` + + :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_on_prem_connector(on_prem_connector_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_report_definition_and_wait_for_state(self, report_definition_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_report_definition` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str report_definition_id: (required) + Unique report definition identifier + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_report_definition` + + :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_report_definition(report_definition_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_security_assessment_and_wait_for_state(self, security_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_security_assessment` + + :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_security_assessment(security_assessment_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_sensitive_data_model_and_wait_for_state(self, sensitive_data_model_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_sensitive_data_model` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_sensitive_data_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = None + try: + operation_result = self.client.delete_sensitive_data_model(sensitive_data_model_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + 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_sensitive_type_and_wait_for_state(self, sensitive_type_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_sensitive_type` and waits for the :py:class:`~oci.data_safe.models.SensitiveType` acted upon + to enter the given state(s). + + :param str sensitive_type_id: (required) + The OCID of the sensitive type. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.SensitiveType.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_sensitive_type` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + initial_get_result = self.client.get_sensitive_type(sensitive_type_id) + operation_result = None + try: + operation_result = self.client.delete_sensitive_type(sensitive_type_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + + try: + waiter_result = oci.wait_until( + self.client, + initial_get_result, + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + succeed_on_not_found=True, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_target_alert_policy_association_and_wait_for_state(self, target_alert_policy_association_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_target_alert_policy_association` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str target_alert_policy_association_id: (required) + The OCID of the target-alert policy association. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_target_alert_policy_association` + + :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_target_alert_policy_association(target_alert_policy_association_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_target_database_and_wait_for_state(self, target_database_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str target_database_id: (required) + The OCID of the Data Safe target database. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_target_database` + + :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_target_database(target_database_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def delete_user_assessment_and_wait_for_state(self, user_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.delete_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.delete_user_assessment` + + :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_user_assessment(user_assessment_id, **operation_kwargs) + except oci.exceptions.ServiceError as e: + if e.status == 404: + return WAIT_RESOURCE_NOT_FOUND + else: + raise e + + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def discover_audit_trails_and_wait_for_state(self, audit_profile_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.discover_audit_trails` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_profile_id: (required) + The OCID of the audit. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.discover_audit_trails` + + :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.discover_audit_trails(audit_profile_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def enable_data_safe_configuration_and_wait_for_state(self, enable_data_safe_configuration_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.enable_data_safe_configuration` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.EnableDataSafeConfigurationDetails enable_data_safe_configuration_details: (required) + The details used to enable Data Safe. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.enable_data_safe_configuration` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.enable_data_safe_configuration(enable_data_safe_configuration_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_discovery_report_for_download_and_wait_for_state(self, sensitive_data_model_id, generate_discovery_report_for_download_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_discovery_report_for_download` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.GenerateDiscoveryReportForDownloadDetails generate_discovery_report_for_download_details: (required) + Details to generate a downloadable discovery report. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_discovery_report_for_download` + + :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.generate_discovery_report_for_download(sensitive_data_model_id, generate_discovery_report_for_download_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_masking_policy_for_download_and_wait_for_state(self, masking_policy_id, generate_masking_policy_for_download_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_masking_policy_for_download` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.GenerateMaskingPolicyForDownloadDetails generate_masking_policy_for_download_details: (required) + Details to generate a masking policy file. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_masking_policy_for_download` + + :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.generate_masking_policy_for_download(masking_policy_id, generate_masking_policy_for_download_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_masking_report_for_download_and_wait_for_state(self, masking_policy_id, generate_masking_report_for_download_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_masking_report_for_download` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.GenerateMaskingReportForDownloadDetails generate_masking_report_for_download_details: (required) + Details to generate a downloadable masking report. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_masking_report_for_download` + + :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.generate_masking_report_for_download(masking_policy_id, generate_masking_report_for_download_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_report_and_wait_for_state(self, report_definition_id, generate_report_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_report` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str report_definition_id: (required) + Unique report definition identifier + + :param oci.data_safe.models.GenerateReportDetails generate_report_details: (required) + Details for report generation. It contains details such as PDF/XLS and filter parameters like audit event time limits, number of rows and target databases etc + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_report` + + :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.generate_report(report_definition_id, generate_report_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_security_assessment_report_and_wait_for_state(self, security_assessment_id, generate_security_assessment_report_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_security_assessment_report` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param oci.data_safe.models.GenerateSecurityAssessmentReportDetails generate_security_assessment_report_details: (required) + Details of the report. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_security_assessment_report` + + :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.generate_security_assessment_report(security_assessment_id, generate_security_assessment_report_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_sensitive_data_model_for_download_and_wait_for_state(self, sensitive_data_model_id, generate_sensitive_data_model_for_download_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_sensitive_data_model_for_download` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.GenerateSensitiveDataModelForDownloadDetails generate_sensitive_data_model_for_download_details: (required) + Details to generate a sensitive data model file. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_sensitive_data_model_for_download` + + :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.generate_sensitive_data_model_for_download(sensitive_data_model_id, generate_sensitive_data_model_for_download_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def generate_user_assessment_report_and_wait_for_state(self, user_assessment_id, generate_user_assessment_report_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.generate_user_assessment_report` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param oci.data_safe.models.GenerateUserAssessmentReportDetails generate_user_assessment_report_details: (required) + Details of the report. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.generate_user_assessment_report` + + :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.generate_user_assessment_report(user_assessment_id, generate_user_assessment_report_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def mask_data_and_wait_for_state(self, masking_policy_id, mask_data_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.mask_data` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.MaskDataDetails mask_data_details: (required) + Details to mask data. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.mask_data` + + :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.mask_data(masking_policy_id, mask_data_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def modify_global_settings_and_wait_for_state(self, modify_global_settings_details, compartment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.modify_global_settings` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.ModifyGlobalSettingsDetails modify_global_settings_details: (required) + The details used to update global settings in Data Safe. + + :param str compartment_id: (required) + The OCID of the compartment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.modify_global_settings` + + :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.modify_global_settings(modify_global_settings_details, compartment_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def patch_alerts_and_wait_for_state(self, patch_alerts_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.patch_alerts` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.PatchAlertsDetails patch_alerts_details: (required) + Details to patch alerts. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.patch_alerts` + + :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.patch_alerts(patch_alerts_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def patch_discovery_job_results_and_wait_for_state(self, discovery_job_id, patch_discovery_job_result_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.patch_discovery_job_results` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str discovery_job_id: (required) + The OCID of the discovery job. + + :param oci.data_safe.models.PatchDiscoveryJobResultDetails patch_discovery_job_result_details: (required) + Details to patch discovery results. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.patch_discovery_job_results` + + :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.patch_discovery_job_results(discovery_job_id, patch_discovery_job_result_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def patch_masking_columns_and_wait_for_state(self, masking_policy_id, patch_masking_columns_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.patch_masking_columns` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.PatchMaskingColumnsDetails patch_masking_columns_details: (required) + Details to patch masking columns. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.patch_masking_columns` + + :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.patch_masking_columns(masking_policy_id, patch_masking_columns_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def patch_sensitive_columns_and_wait_for_state(self, sensitive_data_model_id, patch_sensitive_column_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.patch_sensitive_columns` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.PatchSensitiveColumnDetails patch_sensitive_column_details: (required) + Details to patch sensitive columns. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.patch_sensitive_columns` + + :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.patch_sensitive_columns(sensitive_data_model_id, patch_sensitive_column_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def provision_audit_policy_and_wait_for_state(self, provision_audit_policy_details, audit_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.provision_audit_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.ProvisionAuditPolicyDetails provision_audit_policy_details: (required) + Details for provisioning the given policies on the source target database. + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.provision_audit_policy` + + :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.provision_audit_policy(provision_audit_policy_details, audit_policy_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def refresh_security_assessment_and_wait_for_state(self, security_assessment_id, run_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.refresh_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param oci.data_safe.models.RunSecurityAssessmentDetails run_security_assessment_details: (required) + Details to create an on-demand saved security assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.refresh_security_assessment` + + :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.refresh_security_assessment(security_assessment_id, run_security_assessment_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def refresh_user_assessment_and_wait_for_state(self, user_assessment_id, run_user_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.refresh_user_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param oci.data_safe.models.RunUserAssessmentDetails run_user_assessment_details: (required) + The details required to create an on-demand saved user assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.refresh_user_assessment` + + :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.refresh_user_assessment(user_assessment_id, run_user_assessment_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def resume_audit_trail_and_wait_for_state(self, audit_trail_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.resume_audit_trail` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.resume_audit_trail` + + :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.resume_audit_trail(audit_trail_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def retrieve_audit_policies_and_wait_for_state(self, audit_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.retrieve_audit_policies` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.retrieve_audit_policies` + + :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.retrieve_audit_policies(audit_policy_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def set_security_assessment_baseline_and_wait_for_state(self, security_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.set_security_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.set_security_assessment_baseline` + + :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.set_security_assessment_baseline(security_assessment_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def set_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.set_user_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.set_user_assessment_baseline` + + :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.set_user_assessment_baseline(user_assessment_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def start_audit_trail_and_wait_for_state(self, start_audit_trail_details, audit_trail_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.start_audit_trail` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param oci.data_safe.models.StartAuditTrailDetails start_audit_trail_details: (required) + Details for the starting audit. + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.start_audit_trail` + + :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.start_audit_trail(start_audit_trail_details, audit_trail_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def stop_audit_trail_and_wait_for_state(self, audit_trail_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.stop_audit_trail` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.stop_audit_trail` + + :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.stop_audit_trail(audit_trail_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def unset_security_assessment_baseline_and_wait_for_state(self, security_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.unset_security_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str security_assessment_id: (required) + The OCID of the security assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.unset_security_assessment_baseline` + + :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.unset_security_assessment_baseline(security_assessment_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def unset_user_assessment_baseline_and_wait_for_state(self, user_assessment_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.unset_user_assessment_baseline` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str user_assessment_id: (required) + The OCID of the user assessment. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.unset_user_assessment_baseline` + + :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.unset_user_assessment_baseline(user_assessment_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_alert_and_wait_for_state(self, alert_id, update_alert_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_alert` and waits for the :py:class:`~oci.data_safe.models.Alert` acted upon + to enter the given state(s). + + :param str alert_id: (required) + The OCID of alert. + + :param oci.data_safe.models.UpdateAlertDetails update_alert_details: (required) + The details used to update alert status. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.Alert.lifecycle_state` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_alert` + + :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_alert(alert_id, update_alert_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.data.id + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_alert(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'lifecycle_state') and getattr(r.data, 'lifecycle_state').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_audit_archive_retrieval_and_wait_for_state(self, audit_archive_retrieval_id, update_audit_archive_retrieval_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_audit_archive_retrieval` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_archive_retrieval_id: (required) + OCID of the archive retrieval. + + :param oci.data_safe.models.UpdateAuditArchiveRetrievalDetails update_audit_archive_retrieval_details: (required) + Details to update the audit archive retrieval. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_audit_archive_retrieval` + + :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_audit_archive_retrieval(audit_archive_retrieval_id, update_audit_archive_retrieval_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_audit_policy_and_wait_for_state(self, audit_policy_id, update_audit_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_audit_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_policy_id: (required) + Unique audit policy identifier. + + :param oci.data_safe.models.UpdateAuditPolicyDetails update_audit_policy_details: (required) + Details to update the audit policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_audit_policy` + + :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_audit_policy(audit_policy_id, update_audit_policy_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_audit_profile_and_wait_for_state(self, audit_profile_id, update_audit_profile_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_audit_profile` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_profile_id: (required) + The OCID of the audit. + + :param oci.data_safe.models.UpdateAuditProfileDetails update_audit_profile_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.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_audit_profile` + + :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_audit_profile(audit_profile_id, update_audit_profile_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_audit_trail_and_wait_for_state(self, audit_trail_id, update_audit_trail_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_audit_trail` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str audit_trail_id: (required) + The OCID of the audit trail. + + :param oci.data_safe.models.UpdateAuditTrailDetails update_audit_trail_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.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_audit_trail` + + :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_audit_trail(audit_trail_id, update_audit_trail_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_data_safe_private_endpoint_and_wait_for_state(self, data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_data_safe_private_endpoint` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str data_safe_private_endpoint_id: (required) + The OCID of the private endpoint. + + :param oci.data_safe.models.UpdateDataSafePrivateEndpointDetails update_data_safe_private_endpoint_details: (required) + The details used to update a Data Safe private endpoint. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_data_safe_private_endpoint` + + :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_data_safe_private_endpoint(data_safe_private_endpoint_id, update_data_safe_private_endpoint_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_library_masking_format_and_wait_for_state(self, library_masking_format_id, update_library_masking_format_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_library_masking_format` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str library_masking_format_id: (required) + The OCID of the library masking format. + + :param oci.data_safe.models.UpdateLibraryMaskingFormatDetails update_library_masking_format_details: (required) + Details to update a library masking format. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_library_masking_format` + + :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_library_masking_format(library_masking_format_id, update_library_masking_format_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_masking_column_and_wait_for_state(self, masking_column_key, masking_policy_id, update_masking_column_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_masking_column` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_column_key: (required) + The unique key that identifies the masking column. It's numeric and unique within a masking policy. + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.UpdateMaskingColumnDetails update_masking_column_details: (required) + Details to update a masking column. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_masking_column` + + :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_masking_column(masking_column_key, masking_policy_id, update_masking_column_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_masking_policy_and_wait_for_state(self, masking_policy_id, update_masking_policy_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_masking_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param oci.data_safe.models.UpdateMaskingPolicyDetails update_masking_policy_details: (required) + Details to update a masking policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_masking_policy` + + :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_masking_policy(masking_policy_id, update_masking_policy_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_on_prem_connector_and_wait_for_state(self, on_prem_connector_id, update_on_prem_connector_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_on_prem_connector` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` to enter the given state(s). :param str on_prem_connector_id: (required) @@ -1122,6 +3344,47 @@ def update_on_prem_connector_wallet_and_wait_for_state(self, update_on_prem_conn except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_report_definition_and_wait_for_state(self, report_definition_id, update_report_definition_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_report_definition` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str report_definition_id: (required) + Unique report definition identifier + + :param oci.data_safe.models.UpdateReportDefinitionDetails update_report_definition_details: (required) + Details for the modified report definition. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_report_definition` + + :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_report_definition(report_definition_id, update_report_definition_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_security_assessment_and_wait_for_state(self, security_assessment_id, update_security_assessment_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.update_security_assessment` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -1163,6 +3426,173 @@ def update_security_assessment_and_wait_for_state(self, security_assessment_id, except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_sensitive_column_and_wait_for_state(self, sensitive_data_model_id, sensitive_column_key, update_sensitive_column_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_sensitive_column` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param str sensitive_column_key: (required) + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + :param oci.data_safe.models.UpdateSensitiveColumnDetails update_sensitive_column_details: (required) + Details to update a sensitive column. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_sensitive_column` + + :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_sensitive_column(sensitive_data_model_id, sensitive_column_key, update_sensitive_column_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_sensitive_data_model_and_wait_for_state(self, sensitive_data_model_id, update_sensitive_data_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_sensitive_data_model` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param oci.data_safe.models.UpdateSensitiveDataModelDetails update_sensitive_data_model_details: (required) + Details to update a sensitive data model. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_sensitive_data_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.update_sensitive_data_model(sensitive_data_model_id, update_sensitive_data_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_sensitive_type_and_wait_for_state(self, sensitive_type_id, update_sensitive_type_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_sensitive_type` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_type_id: (required) + The OCID of the sensitive type. + + :param oci.data_safe.models.UpdateSensitiveTypeDetails update_sensitive_type_details: (required) + Details to update a sensitive type. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_sensitive_type` + + :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_sensitive_type(sensitive_type_id, update_sensitive_type_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def update_target_alert_policy_association_and_wait_for_state(self, target_alert_policy_association_id, update_target_alert_policy_association_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.update_target_alert_policy_association` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str target_alert_policy_association_id: (required) + The OCID of the target-alert policy association. + + :param oci.data_safe.models.UpdateTargetAlertPolicyAssociationDetails update_target_alert_policy_association_details: (required) + The details used to update the target-alert policy association. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.update_target_alert_policy_association` + + :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_target_alert_policy_association(target_alert_policy_association_id, update_target_alert_policy_association_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + def update_target_database_and_wait_for_state(self, target_database_id, update_target_database_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): """ Calls :py:func:`~oci.data_safe.DataSafeClient.update_target_database` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` @@ -1244,3 +3674,85 @@ def update_user_assessment_and_wait_for_state(self, user_assessment_id, update_u return result_to_return except Exception as e: raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def upload_masking_policy_and_wait_for_state(self, upload_masking_policy_details, masking_policy_id, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.upload_masking_policy` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param stream upload_masking_policy_details: (required) + Details to upload a masking policy file. + + :param str masking_policy_id: (required) + The OCID of the masking policy. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.upload_masking_policy` + + :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.upload_masking_policy(upload_masking_policy_details, masking_policy_id, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) + + def upload_sensitive_data_model_and_wait_for_state(self, sensitive_data_model_id, upload_sensitive_data_model_details, wait_for_states=[], operation_kwargs={}, waiter_kwargs={}): + """ + Calls :py:func:`~oci.data_safe.DataSafeClient.upload_sensitive_data_model` and waits for the :py:class:`~oci.data_safe.models.WorkRequest` + to enter the given state(s). + + :param str sensitive_data_model_id: (required) + The OCID of the sensitive data model. + + :param stream upload_sensitive_data_model_details: (required) + Details to upload a sensitive data model file. + + :param list[str] wait_for_states: + An array of states to wait on. These should be valid values for :py:attr:`~oci.data_safe.models.WorkRequest.status` + + :param dict operation_kwargs: + A dictionary of keyword arguments to pass to :py:func:`~oci.data_safe.DataSafeClient.upload_sensitive_data_model` + + :param dict waiter_kwargs: + A dictionary of keyword arguments to pass to the :py:func:`oci.wait_until` function. For example, you could pass ``max_interval_seconds`` or ``max_interval_seconds`` + as dictionary keys to modify how long the waiter function will wait between retries and the maximum amount of time it will wait + """ + operation_result = self.client.upload_sensitive_data_model(sensitive_data_model_id, upload_sensitive_data_model_details, **operation_kwargs) + if not wait_for_states: + return operation_result + + lowered_wait_for_states = [w.lower() for w in wait_for_states] + wait_for_resource_id = operation_result.headers['opc-work-request-id'] + + try: + waiter_result = oci.wait_until( + self.client, + self.client.get_work_request(wait_for_resource_id), + evaluate_response=lambda r: getattr(r.data, 'status') and getattr(r.data, 'status').lower() in lowered_wait_for_states, + **waiter_kwargs + ) + result_to_return = waiter_result + + return result_to_return + except Exception as e: + raise oci.exceptions.CompositeOperationError(partial_results=[operation_result], cause=e) diff --git a/src/oci/data_safe/models/__init__.py b/src/oci/data_safe/models/__init__.py index f108067902..84f33351f4 100644 --- a/src/oci/data_safe/models/__init__.py +++ b/src/oci/data_safe/models/__init__.py @@ -5,18 +5,107 @@ from __future__ import absolute_import from .activate_target_database_details import ActivateTargetDatabaseDetails +from .alert import Alert +from .alert_aggregation_items import AlertAggregationItems +from .alert_analytics_collection import AlertAnalyticsCollection +from .alert_collection import AlertCollection +from .alert_policy import AlertPolicy +from .alert_policy_collection import AlertPolicyCollection +from .alert_policy_rule import AlertPolicyRule +from .alert_policy_rule_collection import AlertPolicyRuleCollection +from .alert_policy_rule_summary import AlertPolicyRuleSummary +from .alert_policy_summary import AlertPolicySummary +from .alert_summary import AlertSummary +from .alerts_aggregation_dimension import AlertsAggregationDimension +from .apply_discovery_job_results_details import ApplyDiscoveryJobResultsDetails +from .audit_archive_retrieval import AuditArchiveRetrieval +from .audit_archive_retrieval_collection import AuditArchiveRetrievalCollection +from .audit_archive_retrieval_summary import AuditArchiveRetrievalSummary +from .audit_conditions import AuditConditions +from .audit_event_aggregation_dimensions import AuditEventAggregationDimensions +from .audit_event_aggregation_items import AuditEventAggregationItems +from .audit_event_analytics_collection import AuditEventAnalyticsCollection +from .audit_event_collection import AuditEventCollection +from .audit_event_summary import AuditEventSummary +from .audit_policy import AuditPolicy +from .audit_policy_aggregation_items import AuditPolicyAggregationItems +from .audit_policy_analytic_collection import AuditPolicyAnalyticCollection +from .audit_policy_collection import AuditPolicyCollection +from .audit_policy_dimensions import AuditPolicyDimensions +from .audit_policy_summary import AuditPolicySummary +from .audit_profile import AuditProfile +from .audit_profile_aggregation_items import AuditProfileAggregationItems +from .audit_profile_analytic_collection import AuditProfileAnalyticCollection +from .audit_profile_collection import AuditProfileCollection +from .audit_profile_dimensions import AuditProfileDimensions +from .audit_profile_summary import AuditProfileSummary +from .audit_specification import AuditSpecification +from .audit_trail import AuditTrail +from .audit_trail_aggregation_items import AuditTrailAggregationItems +from .audit_trail_analytic_collection import AuditTrailAnalyticCollection +from .audit_trail_collection import AuditTrailCollection +from .audit_trail_dimensions import AuditTrailDimensions +from .audit_trail_summary import AuditTrailSummary from .autonomous_database_details import AutonomousDatabaseDetails +from .available_audit_volume_collection import AvailableAuditVolumeCollection +from .available_audit_volume_summary import AvailableAuditVolumeSummary +from .calculate_audit_volume_available_details import CalculateAuditVolumeAvailableDetails +from .calculate_audit_volume_collected_details import CalculateAuditVolumeCollectedDetails +from .change_alert_compartment_details import ChangeAlertCompartmentDetails +from .change_alert_policy_compartment_details import ChangeAlertPolicyCompartmentDetails +from .change_audit_archive_retrieval_compartment_details import ChangeAuditArchiveRetrievalCompartmentDetails +from .change_audit_policy_compartment_details import ChangeAuditPolicyCompartmentDetails +from .change_audit_profile_compartment_details import ChangeAuditProfileCompartmentDetails from .change_data_safe_private_endpoint_compartment_details import ChangeDataSafePrivateEndpointCompartmentDetails +from .change_discovery_job_compartment_details import ChangeDiscoveryJobCompartmentDetails +from .change_library_masking_format_compartment_details import ChangeLibraryMaskingFormatCompartmentDetails +from .change_masking_policy_compartment_details import ChangeMaskingPolicyCompartmentDetails from .change_on_prem_connector_compartment_details import ChangeOnPremConnectorCompartmentDetails +from .change_report_compartment_details import ChangeReportCompartmentDetails +from .change_report_definition_compartment_details import ChangeReportDefinitionCompartmentDetails +from .change_retention_details import ChangeRetentionDetails from .change_security_assessment_compartment_details import ChangeSecurityAssessmentCompartmentDetails +from .change_sensitive_data_model_compartment_details import ChangeSensitiveDataModelCompartmentDetails +from .change_sensitive_type_compartment_details import ChangeSensitiveTypeCompartmentDetails +from .change_target_alert_policy_association_compartment_details import ChangeTargetAlertPolicyAssociationCompartmentDetails from .change_target_database_compartment_details import ChangeTargetDatabaseCompartmentDetails from .change_user_assessment_compartment_details import ChangeUserAssessmentCompartmentDetails +from .collected_audit_volume_collection import CollectedAuditVolumeCollection +from .collected_audit_volume_summary import CollectedAuditVolumeSummary +from .column import Column +from .column_filter import ColumnFilter +from .column_sorting import ColumnSorting +from .column_source_details import ColumnSourceDetails +from .column_source_from_sdm_details import ColumnSourceFromSdmDetails +from .column_source_from_target_details import ColumnSourceFromTargetDetails +from .column_summary import ColumnSummary from .compare_security_assessment_details import CompareSecurityAssessmentDetails from .compare_user_assessment_details import CompareUserAssessmentDetails +from .compatible_formats_for_data_types import CompatibleFormatsForDataTypes +from .compatible_formats_for_sensitive_types import CompatibleFormatsForSensitiveTypes from .connection_option import ConnectionOption +from .create_alert_policy_details import CreateAlertPolicyDetails +from .create_alert_policy_rule_details import CreateAlertPolicyRuleDetails +from .create_audit_archive_retrieval_details import CreateAuditArchiveRetrievalDetails +from .create_audit_policy_details import CreateAuditPolicyDetails +from .create_audit_profile_details import CreateAuditProfileDetails +from .create_column_source_details import CreateColumnSourceDetails +from .create_column_source_from_sdm_details import CreateColumnSourceFromSdmDetails +from .create_column_source_from_target_details import CreateColumnSourceFromTargetDetails from .create_data_safe_private_endpoint_details import CreateDataSafePrivateEndpointDetails +from .create_discovery_job_details import CreateDiscoveryJobDetails +from .create_library_masking_format_details import CreateLibraryMaskingFormatDetails +from .create_masking_column_details import CreateMaskingColumnDetails +from .create_masking_policy_details import CreateMaskingPolicyDetails from .create_on_prem_connector_details import CreateOnPremConnectorDetails +from .create_report_definition_details import CreateReportDefinitionDetails from .create_security_assessment_details import CreateSecurityAssessmentDetails +from .create_sensitive_category_details import CreateSensitiveCategoryDetails +from .create_sensitive_column_details import CreateSensitiveColumnDetails +from .create_sensitive_data_model_details import CreateSensitiveDataModelDetails +from .create_sensitive_type_details import CreateSensitiveTypeDetails +from .create_sensitive_type_pattern_details import CreateSensitiveTypePatternDetails +from .create_target_alert_policy_association_details import CreateTargetAlertPolicyAssociationDetails from .create_target_database_details import CreateTargetDatabaseDetails from .create_user_assessment_details import CreateUserAssessmentDetails from .credentials import Credentials @@ -25,26 +114,110 @@ from .data_safe_private_endpoint_summary import DataSafePrivateEndpointSummary from .database_cloud_service_details import DatabaseCloudServiceDetails from .database_details import DatabaseDetails +from .delete_rows_format_entry import DeleteRowsFormatEntry +from .deterministic_encryption_date_format_entry import DeterministicEncryptionDateFormatEntry +from .deterministic_encryption_format_entry import DeterministicEncryptionFormatEntry +from .deterministic_substitution_format_entry import DeterministicSubstitutionFormatEntry from .diffs import Diffs +from .dimensions import Dimensions +from .discovery_analytics_collection import DiscoveryAnalyticsCollection +from .discovery_analytics_summary import DiscoveryAnalyticsSummary +from .discovery_job import DiscoveryJob +from .discovery_job_collection import DiscoveryJobCollection +from .discovery_job_result import DiscoveryJobResult +from .discovery_job_result_collection import DiscoveryJobResultCollection +from .discovery_job_result_summary import DiscoveryJobResultSummary +from .discovery_job_summary import DiscoveryJobSummary +from .download_discovery_report_details import DownloadDiscoveryReportDetails +from .download_masking_log_details import DownloadMaskingLogDetails +from .download_masking_policy_details import DownloadMaskingPolicyDetails +from .download_masking_report_details import DownloadMaskingReportDetails from .download_security_assessment_report_details import DownloadSecurityAssessmentReportDetails +from .download_sensitive_data_model_details import DownloadSensitiveDataModelDetails from .download_user_assessment_report_details import DownloadUserAssessmentReportDetails +from .enable_conditions import EnableConditions from .enable_data_safe_configuration_details import EnableDataSafeConfigurationDetails from .finding import Finding from .finding_summary import FindingSummary +from .fixed_number_format_entry import FixedNumberFormatEntry +from .fixed_string_format_entry import FixedStringFormatEntry +from .format_entry import FormatEntry +from .format_summary import FormatSummary +from .formats_for_data_type import FormatsForDataType +from .formats_for_sensitive_type import FormatsForSensitiveType +from .generate_discovery_report_for_download_details import GenerateDiscoveryReportForDownloadDetails +from .generate_masking_policy_for_download_details import GenerateMaskingPolicyForDownloadDetails +from .generate_masking_report_for_download_details import GenerateMaskingReportForDownloadDetails from .generate_on_prem_connector_configuration_details import GenerateOnPremConnectorConfigurationDetails +from .generate_report_details import GenerateReportDetails from .generate_security_assessment_report_details import GenerateSecurityAssessmentReportDetails +from .generate_sensitive_data_model_for_download_details import GenerateSensitiveDataModelForDownloadDetails from .generate_user_assessment_report_details import GenerateUserAssessmentReportDetails +from .global_settings import GlobalSettings from .grant_summary import GrantSummary from .initialization_parameter import InitializationParameter from .installed_database_details import InstalledDatabaseDetails +from .library_masking_format import LibraryMaskingFormat +from .library_masking_format_collection import LibraryMaskingFormatCollection +from .library_masking_format_entry import LibraryMaskingFormatEntry +from .library_masking_format_summary import LibraryMaskingFormatSummary +from .mask_data_details import MaskDataDetails +from .masked_column_collection import MaskedColumnCollection +from .masked_column_summary import MaskedColumnSummary +from .masking_analytics_collection import MaskingAnalyticsCollection +from .masking_analytics_dimensions import MaskingAnalyticsDimensions +from .masking_analytics_summary import MaskingAnalyticsSummary +from .masking_column import MaskingColumn +from .masking_column_collection import MaskingColumnCollection +from .masking_column_summary import MaskingColumnSummary +from .masking_format import MaskingFormat +from .masking_policy import MaskingPolicy +from .masking_policy_collection import MaskingPolicyCollection +from .masking_policy_summary import MaskingPolicySummary +from .masking_report import MaskingReport +from .masking_report_collection import MaskingReportCollection +from .masking_report_summary import MaskingReportSummary +from .modified_attributes import ModifiedAttributes +from .modify_global_settings_details import ModifyGlobalSettingsDetails +from .null_value_format_entry import NullValueFormatEntry from .on_prem_connector import OnPremConnector from .on_prem_connector_summary import OnPremConnectorSummary from .on_premise_connector import OnPremiseConnector +from .ppf_format_entry import PPFFormatEntry +from .patch_alert_policy_rule_details import PatchAlertPolicyRuleDetails +from .patch_alerts_details import PatchAlertsDetails +from .patch_discovery_job_result_details import PatchDiscoveryJobResultDetails +from .patch_insert_instruction import PatchInsertInstruction +from .patch_instruction import PatchInstruction +from .patch_masking_columns_details import PatchMaskingColumnsDetails +from .patch_merge_instruction import PatchMergeInstruction +from .patch_remove_instruction import PatchRemoveInstruction +from .patch_sensitive_column_details import PatchSensitiveColumnDetails +from .preserve_original_data_format_entry import PreserveOriginalDataFormatEntry from .private_endpoint import PrivateEndpoint from .profile_details import ProfileDetails +from .provision_audit_conditions import ProvisionAuditConditions +from .provision_audit_policy_details import ProvisionAuditPolicyDetails +from .random_date_format_entry import RandomDateFormatEntry +from .random_decimal_number_format_entry import RandomDecimalNumberFormatEntry +from .random_digits_format_entry import RandomDigitsFormatEntry +from .random_list_format_entry import RandomListFormatEntry +from .random_number_format_entry import RandomNumberFormatEntry +from .random_string_format_entry import RandomStringFormatEntry +from .random_substitution_format_entry import RandomSubstitutionFormatEntry from .references import References +from .regular_expression_format_entry import RegularExpressionFormatEntry +from .report import Report +from .report_collection import ReportCollection +from .report_definition import ReportDefinition +from .report_definition_collection import ReportDefinitionCollection +from .report_definition_summary import ReportDefinitionSummary +from .report_summary import ReportSummary +from .role_summary import RoleSummary from .run_security_assessment_details import RunSecurityAssessmentDetails from .run_user_assessment_details import RunUserAssessmentDetails +from .sql_expression_format_entry import SQLExpressionFormatEntry +from .schema_summary import SchemaSummary from .section_statistics import SectionStatistics from .security_assessment import SecurityAssessment from .security_assessment_base_line_details import SecurityAssessmentBaseLineDetails @@ -52,13 +225,53 @@ from .security_assessment_comparison_per_target import SecurityAssessmentComparisonPerTarget from .security_assessment_statistics import SecurityAssessmentStatistics from .security_assessment_summary import SecurityAssessmentSummary +from .sensitive_category import SensitiveCategory +from .sensitive_column import SensitiveColumn +from .sensitive_column_collection import SensitiveColumnCollection +from .sensitive_column_summary import SensitiveColumnSummary +from .sensitive_data_model import SensitiveDataModel +from .sensitive_data_model_collection import SensitiveDataModelCollection +from .sensitive_data_model_summary import SensitiveDataModelSummary +from .sensitive_type import SensitiveType +from .sensitive_type_collection import SensitiveTypeCollection +from .sensitive_type_pattern import SensitiveTypePattern +from .sensitive_type_summary import SensitiveTypeSummary +from .shuffle_format_entry import ShuffleFormatEntry +from .start_audit_trail_details import StartAuditTrailDetails +from .substring_format_entry import SubstringFormatEntry +from .summary import Summary +from .table_summary import TableSummary +from .target_alert_policy_association import TargetAlertPolicyAssociation +from .target_alert_policy_association_collection import TargetAlertPolicyAssociationCollection +from .target_alert_policy_association_summary import TargetAlertPolicyAssociationSummary from .target_database import TargetDatabase from .target_database_summary import TargetDatabaseSummary from .tls_config import TlsConfig +from .truncate_table_format_entry import TruncateTableFormatEntry +from .udf_format_entry import UDFFormatEntry +from .update_alert_details import UpdateAlertDetails +from .update_alert_policy_rule_details import UpdateAlertPolicyRuleDetails +from .update_audit_archive_retrieval_details import UpdateAuditArchiveRetrievalDetails +from .update_audit_policy_details import UpdateAuditPolicyDetails +from .update_audit_profile_details import UpdateAuditProfileDetails +from .update_audit_trail_details import UpdateAuditTrailDetails +from .update_column_source_details import UpdateColumnSourceDetails +from .update_column_source_sdm_details import UpdateColumnSourceSdmDetails +from .update_column_source_target_details import UpdateColumnSourceTargetDetails from .update_data_safe_private_endpoint_details import UpdateDataSafePrivateEndpointDetails +from .update_library_masking_format_details import UpdateLibraryMaskingFormatDetails +from .update_masking_column_details import UpdateMaskingColumnDetails +from .update_masking_policy_details import UpdateMaskingPolicyDetails from .update_on_prem_connector_details import UpdateOnPremConnectorDetails from .update_on_prem_connector_wallet_details import UpdateOnPremConnectorWalletDetails +from .update_report_definition_details import UpdateReportDefinitionDetails from .update_security_assessment_details import UpdateSecurityAssessmentDetails +from .update_sensitive_category_details import UpdateSensitiveCategoryDetails +from .update_sensitive_column_details import UpdateSensitiveColumnDetails +from .update_sensitive_data_model_details import UpdateSensitiveDataModelDetails +from .update_sensitive_type_details import UpdateSensitiveTypeDetails +from .update_sensitive_type_pattern_details import UpdateSensitiveTypePatternDetails +from .update_target_alert_policy_association_details import UpdateTargetAlertPolicyAssociationDetails from .update_target_database_details import UpdateTargetDatabaseDetails from .update_user_assessment_details import UpdateUserAssessmentDetails from .user_aggregation import UserAggregation @@ -77,18 +290,107 @@ # Maps type names to classes for data_safe services. data_safe_type_mapping = { "ActivateTargetDatabaseDetails": ActivateTargetDatabaseDetails, + "Alert": Alert, + "AlertAggregationItems": AlertAggregationItems, + "AlertAnalyticsCollection": AlertAnalyticsCollection, + "AlertCollection": AlertCollection, + "AlertPolicy": AlertPolicy, + "AlertPolicyCollection": AlertPolicyCollection, + "AlertPolicyRule": AlertPolicyRule, + "AlertPolicyRuleCollection": AlertPolicyRuleCollection, + "AlertPolicyRuleSummary": AlertPolicyRuleSummary, + "AlertPolicySummary": AlertPolicySummary, + "AlertSummary": AlertSummary, + "AlertsAggregationDimension": AlertsAggregationDimension, + "ApplyDiscoveryJobResultsDetails": ApplyDiscoveryJobResultsDetails, + "AuditArchiveRetrieval": AuditArchiveRetrieval, + "AuditArchiveRetrievalCollection": AuditArchiveRetrievalCollection, + "AuditArchiveRetrievalSummary": AuditArchiveRetrievalSummary, + "AuditConditions": AuditConditions, + "AuditEventAggregationDimensions": AuditEventAggregationDimensions, + "AuditEventAggregationItems": AuditEventAggregationItems, + "AuditEventAnalyticsCollection": AuditEventAnalyticsCollection, + "AuditEventCollection": AuditEventCollection, + "AuditEventSummary": AuditEventSummary, + "AuditPolicy": AuditPolicy, + "AuditPolicyAggregationItems": AuditPolicyAggregationItems, + "AuditPolicyAnalyticCollection": AuditPolicyAnalyticCollection, + "AuditPolicyCollection": AuditPolicyCollection, + "AuditPolicyDimensions": AuditPolicyDimensions, + "AuditPolicySummary": AuditPolicySummary, + "AuditProfile": AuditProfile, + "AuditProfileAggregationItems": AuditProfileAggregationItems, + "AuditProfileAnalyticCollection": AuditProfileAnalyticCollection, + "AuditProfileCollection": AuditProfileCollection, + "AuditProfileDimensions": AuditProfileDimensions, + "AuditProfileSummary": AuditProfileSummary, + "AuditSpecification": AuditSpecification, + "AuditTrail": AuditTrail, + "AuditTrailAggregationItems": AuditTrailAggregationItems, + "AuditTrailAnalyticCollection": AuditTrailAnalyticCollection, + "AuditTrailCollection": AuditTrailCollection, + "AuditTrailDimensions": AuditTrailDimensions, + "AuditTrailSummary": AuditTrailSummary, "AutonomousDatabaseDetails": AutonomousDatabaseDetails, + "AvailableAuditVolumeCollection": AvailableAuditVolumeCollection, + "AvailableAuditVolumeSummary": AvailableAuditVolumeSummary, + "CalculateAuditVolumeAvailableDetails": CalculateAuditVolumeAvailableDetails, + "CalculateAuditVolumeCollectedDetails": CalculateAuditVolumeCollectedDetails, + "ChangeAlertCompartmentDetails": ChangeAlertCompartmentDetails, + "ChangeAlertPolicyCompartmentDetails": ChangeAlertPolicyCompartmentDetails, + "ChangeAuditArchiveRetrievalCompartmentDetails": ChangeAuditArchiveRetrievalCompartmentDetails, + "ChangeAuditPolicyCompartmentDetails": ChangeAuditPolicyCompartmentDetails, + "ChangeAuditProfileCompartmentDetails": ChangeAuditProfileCompartmentDetails, "ChangeDataSafePrivateEndpointCompartmentDetails": ChangeDataSafePrivateEndpointCompartmentDetails, + "ChangeDiscoveryJobCompartmentDetails": ChangeDiscoveryJobCompartmentDetails, + "ChangeLibraryMaskingFormatCompartmentDetails": ChangeLibraryMaskingFormatCompartmentDetails, + "ChangeMaskingPolicyCompartmentDetails": ChangeMaskingPolicyCompartmentDetails, "ChangeOnPremConnectorCompartmentDetails": ChangeOnPremConnectorCompartmentDetails, + "ChangeReportCompartmentDetails": ChangeReportCompartmentDetails, + "ChangeReportDefinitionCompartmentDetails": ChangeReportDefinitionCompartmentDetails, + "ChangeRetentionDetails": ChangeRetentionDetails, "ChangeSecurityAssessmentCompartmentDetails": ChangeSecurityAssessmentCompartmentDetails, + "ChangeSensitiveDataModelCompartmentDetails": ChangeSensitiveDataModelCompartmentDetails, + "ChangeSensitiveTypeCompartmentDetails": ChangeSensitiveTypeCompartmentDetails, + "ChangeTargetAlertPolicyAssociationCompartmentDetails": ChangeTargetAlertPolicyAssociationCompartmentDetails, "ChangeTargetDatabaseCompartmentDetails": ChangeTargetDatabaseCompartmentDetails, "ChangeUserAssessmentCompartmentDetails": ChangeUserAssessmentCompartmentDetails, + "CollectedAuditVolumeCollection": CollectedAuditVolumeCollection, + "CollectedAuditVolumeSummary": CollectedAuditVolumeSummary, + "Column": Column, + "ColumnFilter": ColumnFilter, + "ColumnSorting": ColumnSorting, + "ColumnSourceDetails": ColumnSourceDetails, + "ColumnSourceFromSdmDetails": ColumnSourceFromSdmDetails, + "ColumnSourceFromTargetDetails": ColumnSourceFromTargetDetails, + "ColumnSummary": ColumnSummary, "CompareSecurityAssessmentDetails": CompareSecurityAssessmentDetails, "CompareUserAssessmentDetails": CompareUserAssessmentDetails, + "CompatibleFormatsForDataTypes": CompatibleFormatsForDataTypes, + "CompatibleFormatsForSensitiveTypes": CompatibleFormatsForSensitiveTypes, "ConnectionOption": ConnectionOption, + "CreateAlertPolicyDetails": CreateAlertPolicyDetails, + "CreateAlertPolicyRuleDetails": CreateAlertPolicyRuleDetails, + "CreateAuditArchiveRetrievalDetails": CreateAuditArchiveRetrievalDetails, + "CreateAuditPolicyDetails": CreateAuditPolicyDetails, + "CreateAuditProfileDetails": CreateAuditProfileDetails, + "CreateColumnSourceDetails": CreateColumnSourceDetails, + "CreateColumnSourceFromSdmDetails": CreateColumnSourceFromSdmDetails, + "CreateColumnSourceFromTargetDetails": CreateColumnSourceFromTargetDetails, "CreateDataSafePrivateEndpointDetails": CreateDataSafePrivateEndpointDetails, + "CreateDiscoveryJobDetails": CreateDiscoveryJobDetails, + "CreateLibraryMaskingFormatDetails": CreateLibraryMaskingFormatDetails, + "CreateMaskingColumnDetails": CreateMaskingColumnDetails, + "CreateMaskingPolicyDetails": CreateMaskingPolicyDetails, "CreateOnPremConnectorDetails": CreateOnPremConnectorDetails, + "CreateReportDefinitionDetails": CreateReportDefinitionDetails, "CreateSecurityAssessmentDetails": CreateSecurityAssessmentDetails, + "CreateSensitiveCategoryDetails": CreateSensitiveCategoryDetails, + "CreateSensitiveColumnDetails": CreateSensitiveColumnDetails, + "CreateSensitiveDataModelDetails": CreateSensitiveDataModelDetails, + "CreateSensitiveTypeDetails": CreateSensitiveTypeDetails, + "CreateSensitiveTypePatternDetails": CreateSensitiveTypePatternDetails, + "CreateTargetAlertPolicyAssociationDetails": CreateTargetAlertPolicyAssociationDetails, "CreateTargetDatabaseDetails": CreateTargetDatabaseDetails, "CreateUserAssessmentDetails": CreateUserAssessmentDetails, "Credentials": Credentials, @@ -97,26 +399,110 @@ "DataSafePrivateEndpointSummary": DataSafePrivateEndpointSummary, "DatabaseCloudServiceDetails": DatabaseCloudServiceDetails, "DatabaseDetails": DatabaseDetails, + "DeleteRowsFormatEntry": DeleteRowsFormatEntry, + "DeterministicEncryptionDateFormatEntry": DeterministicEncryptionDateFormatEntry, + "DeterministicEncryptionFormatEntry": DeterministicEncryptionFormatEntry, + "DeterministicSubstitutionFormatEntry": DeterministicSubstitutionFormatEntry, "Diffs": Diffs, + "Dimensions": Dimensions, + "DiscoveryAnalyticsCollection": DiscoveryAnalyticsCollection, + "DiscoveryAnalyticsSummary": DiscoveryAnalyticsSummary, + "DiscoveryJob": DiscoveryJob, + "DiscoveryJobCollection": DiscoveryJobCollection, + "DiscoveryJobResult": DiscoveryJobResult, + "DiscoveryJobResultCollection": DiscoveryJobResultCollection, + "DiscoveryJobResultSummary": DiscoveryJobResultSummary, + "DiscoveryJobSummary": DiscoveryJobSummary, + "DownloadDiscoveryReportDetails": DownloadDiscoveryReportDetails, + "DownloadMaskingLogDetails": DownloadMaskingLogDetails, + "DownloadMaskingPolicyDetails": DownloadMaskingPolicyDetails, + "DownloadMaskingReportDetails": DownloadMaskingReportDetails, "DownloadSecurityAssessmentReportDetails": DownloadSecurityAssessmentReportDetails, + "DownloadSensitiveDataModelDetails": DownloadSensitiveDataModelDetails, "DownloadUserAssessmentReportDetails": DownloadUserAssessmentReportDetails, + "EnableConditions": EnableConditions, "EnableDataSafeConfigurationDetails": EnableDataSafeConfigurationDetails, "Finding": Finding, "FindingSummary": FindingSummary, + "FixedNumberFormatEntry": FixedNumberFormatEntry, + "FixedStringFormatEntry": FixedStringFormatEntry, + "FormatEntry": FormatEntry, + "FormatSummary": FormatSummary, + "FormatsForDataType": FormatsForDataType, + "FormatsForSensitiveType": FormatsForSensitiveType, + "GenerateDiscoveryReportForDownloadDetails": GenerateDiscoveryReportForDownloadDetails, + "GenerateMaskingPolicyForDownloadDetails": GenerateMaskingPolicyForDownloadDetails, + "GenerateMaskingReportForDownloadDetails": GenerateMaskingReportForDownloadDetails, "GenerateOnPremConnectorConfigurationDetails": GenerateOnPremConnectorConfigurationDetails, + "GenerateReportDetails": GenerateReportDetails, "GenerateSecurityAssessmentReportDetails": GenerateSecurityAssessmentReportDetails, + "GenerateSensitiveDataModelForDownloadDetails": GenerateSensitiveDataModelForDownloadDetails, "GenerateUserAssessmentReportDetails": GenerateUserAssessmentReportDetails, + "GlobalSettings": GlobalSettings, "GrantSummary": GrantSummary, "InitializationParameter": InitializationParameter, "InstalledDatabaseDetails": InstalledDatabaseDetails, + "LibraryMaskingFormat": LibraryMaskingFormat, + "LibraryMaskingFormatCollection": LibraryMaskingFormatCollection, + "LibraryMaskingFormatEntry": LibraryMaskingFormatEntry, + "LibraryMaskingFormatSummary": LibraryMaskingFormatSummary, + "MaskDataDetails": MaskDataDetails, + "MaskedColumnCollection": MaskedColumnCollection, + "MaskedColumnSummary": MaskedColumnSummary, + "MaskingAnalyticsCollection": MaskingAnalyticsCollection, + "MaskingAnalyticsDimensions": MaskingAnalyticsDimensions, + "MaskingAnalyticsSummary": MaskingAnalyticsSummary, + "MaskingColumn": MaskingColumn, + "MaskingColumnCollection": MaskingColumnCollection, + "MaskingColumnSummary": MaskingColumnSummary, + "MaskingFormat": MaskingFormat, + "MaskingPolicy": MaskingPolicy, + "MaskingPolicyCollection": MaskingPolicyCollection, + "MaskingPolicySummary": MaskingPolicySummary, + "MaskingReport": MaskingReport, + "MaskingReportCollection": MaskingReportCollection, + "MaskingReportSummary": MaskingReportSummary, + "ModifiedAttributes": ModifiedAttributes, + "ModifyGlobalSettingsDetails": ModifyGlobalSettingsDetails, + "NullValueFormatEntry": NullValueFormatEntry, "OnPremConnector": OnPremConnector, "OnPremConnectorSummary": OnPremConnectorSummary, "OnPremiseConnector": OnPremiseConnector, + "PPFFormatEntry": PPFFormatEntry, + "PatchAlertPolicyRuleDetails": PatchAlertPolicyRuleDetails, + "PatchAlertsDetails": PatchAlertsDetails, + "PatchDiscoveryJobResultDetails": PatchDiscoveryJobResultDetails, + "PatchInsertInstruction": PatchInsertInstruction, + "PatchInstruction": PatchInstruction, + "PatchMaskingColumnsDetails": PatchMaskingColumnsDetails, + "PatchMergeInstruction": PatchMergeInstruction, + "PatchRemoveInstruction": PatchRemoveInstruction, + "PatchSensitiveColumnDetails": PatchSensitiveColumnDetails, + "PreserveOriginalDataFormatEntry": PreserveOriginalDataFormatEntry, "PrivateEndpoint": PrivateEndpoint, "ProfileDetails": ProfileDetails, + "ProvisionAuditConditions": ProvisionAuditConditions, + "ProvisionAuditPolicyDetails": ProvisionAuditPolicyDetails, + "RandomDateFormatEntry": RandomDateFormatEntry, + "RandomDecimalNumberFormatEntry": RandomDecimalNumberFormatEntry, + "RandomDigitsFormatEntry": RandomDigitsFormatEntry, + "RandomListFormatEntry": RandomListFormatEntry, + "RandomNumberFormatEntry": RandomNumberFormatEntry, + "RandomStringFormatEntry": RandomStringFormatEntry, + "RandomSubstitutionFormatEntry": RandomSubstitutionFormatEntry, "References": References, + "RegularExpressionFormatEntry": RegularExpressionFormatEntry, + "Report": Report, + "ReportCollection": ReportCollection, + "ReportDefinition": ReportDefinition, + "ReportDefinitionCollection": ReportDefinitionCollection, + "ReportDefinitionSummary": ReportDefinitionSummary, + "ReportSummary": ReportSummary, + "RoleSummary": RoleSummary, "RunSecurityAssessmentDetails": RunSecurityAssessmentDetails, "RunUserAssessmentDetails": RunUserAssessmentDetails, + "SQLExpressionFormatEntry": SQLExpressionFormatEntry, + "SchemaSummary": SchemaSummary, "SectionStatistics": SectionStatistics, "SecurityAssessment": SecurityAssessment, "SecurityAssessmentBaseLineDetails": SecurityAssessmentBaseLineDetails, @@ -124,13 +510,53 @@ "SecurityAssessmentComparisonPerTarget": SecurityAssessmentComparisonPerTarget, "SecurityAssessmentStatistics": SecurityAssessmentStatistics, "SecurityAssessmentSummary": SecurityAssessmentSummary, + "SensitiveCategory": SensitiveCategory, + "SensitiveColumn": SensitiveColumn, + "SensitiveColumnCollection": SensitiveColumnCollection, + "SensitiveColumnSummary": SensitiveColumnSummary, + "SensitiveDataModel": SensitiveDataModel, + "SensitiveDataModelCollection": SensitiveDataModelCollection, + "SensitiveDataModelSummary": SensitiveDataModelSummary, + "SensitiveType": SensitiveType, + "SensitiveTypeCollection": SensitiveTypeCollection, + "SensitiveTypePattern": SensitiveTypePattern, + "SensitiveTypeSummary": SensitiveTypeSummary, + "ShuffleFormatEntry": ShuffleFormatEntry, + "StartAuditTrailDetails": StartAuditTrailDetails, + "SubstringFormatEntry": SubstringFormatEntry, + "Summary": Summary, + "TableSummary": TableSummary, + "TargetAlertPolicyAssociation": TargetAlertPolicyAssociation, + "TargetAlertPolicyAssociationCollection": TargetAlertPolicyAssociationCollection, + "TargetAlertPolicyAssociationSummary": TargetAlertPolicyAssociationSummary, "TargetDatabase": TargetDatabase, "TargetDatabaseSummary": TargetDatabaseSummary, "TlsConfig": TlsConfig, + "TruncateTableFormatEntry": TruncateTableFormatEntry, + "UDFFormatEntry": UDFFormatEntry, + "UpdateAlertDetails": UpdateAlertDetails, + "UpdateAlertPolicyRuleDetails": UpdateAlertPolicyRuleDetails, + "UpdateAuditArchiveRetrievalDetails": UpdateAuditArchiveRetrievalDetails, + "UpdateAuditPolicyDetails": UpdateAuditPolicyDetails, + "UpdateAuditProfileDetails": UpdateAuditProfileDetails, + "UpdateAuditTrailDetails": UpdateAuditTrailDetails, + "UpdateColumnSourceDetails": UpdateColumnSourceDetails, + "UpdateColumnSourceSdmDetails": UpdateColumnSourceSdmDetails, + "UpdateColumnSourceTargetDetails": UpdateColumnSourceTargetDetails, "UpdateDataSafePrivateEndpointDetails": UpdateDataSafePrivateEndpointDetails, + "UpdateLibraryMaskingFormatDetails": UpdateLibraryMaskingFormatDetails, + "UpdateMaskingColumnDetails": UpdateMaskingColumnDetails, + "UpdateMaskingPolicyDetails": UpdateMaskingPolicyDetails, "UpdateOnPremConnectorDetails": UpdateOnPremConnectorDetails, "UpdateOnPremConnectorWalletDetails": UpdateOnPremConnectorWalletDetails, + "UpdateReportDefinitionDetails": UpdateReportDefinitionDetails, "UpdateSecurityAssessmentDetails": UpdateSecurityAssessmentDetails, + "UpdateSensitiveCategoryDetails": UpdateSensitiveCategoryDetails, + "UpdateSensitiveColumnDetails": UpdateSensitiveColumnDetails, + "UpdateSensitiveDataModelDetails": UpdateSensitiveDataModelDetails, + "UpdateSensitiveTypeDetails": UpdateSensitiveTypeDetails, + "UpdateSensitiveTypePatternDetails": UpdateSensitiveTypePatternDetails, + "UpdateTargetAlertPolicyAssociationDetails": UpdateTargetAlertPolicyAssociationDetails, "UpdateTargetDatabaseDetails": UpdateTargetDatabaseDetails, "UpdateUserAssessmentDetails": UpdateUserAssessmentDetails, "UserAggregation": UserAggregation, diff --git a/src/oci/data_safe/models/alert.py b/src/oci/data_safe/models/alert.py new file mode 100644 index 0000000000..3b40a91012 --- /dev/null +++ b/src/oci/data_safe/models/alert.py @@ -0,0 +1,853 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Alert(object): + """ + The details of a Data Safe Alert, that shows alerts generated by a Data Safe feature. + """ + + #: A constant which can be used with the status property of a Alert. + #: This constant has a value of "OPEN" + STATUS_OPEN = "OPEN" + + #: A constant which can be used with the status property of a Alert. + #: This constant has a value of "CLOSED" + STATUS_CLOSED = "CLOSED" + + #: A constant which can be used with the severity property of a Alert. + #: This constant has a value of "CRITICAL" + SEVERITY_CRITICAL = "CRITICAL" + + #: A constant which can be used with the severity property of a Alert. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a Alert. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a Alert. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a Alert. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + #: A constant which can be used with the operation_status property of a Alert. + #: This constant has a value of "SUCCEEDED" + OPERATION_STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the operation_status property of a Alert. + #: This constant has a value of "FAILED" + OPERATION_STATUS_FAILED = "FAILED" + + #: A constant which can be used with the alert_type property of a Alert. + #: This constant has a value of "AUDITING" + ALERT_TYPE_AUDITING = "AUDITING" + + #: A constant which can be used with the alert_type property of a Alert. + #: This constant has a value of "SECURITY_ASSESSMENT" + ALERT_TYPE_SECURITY_ASSESSMENT = "SECURITY_ASSESSMENT" + + #: A constant which can be used with the alert_type property of a Alert. + #: This constant has a value of "USER_ASSESSMENT" + ALERT_TYPE_USER_ASSESSMENT = "USER_ASSESSMENT" + + #: A constant which can be used with the lifecycle_state property of a Alert. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Alert. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a Alert. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new Alert 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 Alert. + :type id: str + + :param status: + The value to assign to the status property of this Alert. + Allowed values for this property are: "OPEN", "CLOSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param severity: + The value to assign to the severity property of this Alert. + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type severity: str + + :param display_name: + The value to assign to the display_name property of this Alert. + :type display_name: str + + :param description: + The value to assign to the description property of this Alert. + :type description: str + + :param operation_time: + The value to assign to the operation_time property of this Alert. + :type operation_time: datetime + + :param operation: + The value to assign to the operation property of this Alert. + :type operation: str + + :param operation_status: + The value to assign to the operation_status property of this Alert. + Allowed values for this property are: "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param target_ids: + The value to assign to the target_ids property of this Alert. + :type target_ids: list[str] + + :param target_names: + The value to assign to the target_names property of this Alert. + :type target_names: list[str] + + :param policy_id: + The value to assign to the policy_id property of this Alert. + :type policy_id: str + + :param alert_type: + The value to assign to the alert_type property of this Alert. + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type alert_type: str + + :param resource_name: + The value to assign to the resource_name property of this Alert. + :type resource_name: str + + :param feature_details: + The value to assign to the feature_details property of this Alert. + :type feature_details: dict(str, dict(str, object)) + + :param comment: + The value to assign to the comment property of this Alert. + :type comment: str + + :param compartment_id: + The value to assign to the compartment_id property of this Alert. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Alert. + Allowed values for this property are: "UPDATING", "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this Alert. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Alert. + :type time_updated: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this Alert. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Alert. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Alert. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'status': 'str', + 'severity': 'str', + 'display_name': 'str', + 'description': 'str', + 'operation_time': 'datetime', + 'operation': 'str', + 'operation_status': 'str', + 'target_ids': 'list[str]', + 'target_names': 'list[str]', + 'policy_id': 'str', + 'alert_type': 'str', + 'resource_name': 'str', + 'feature_details': 'dict(str, dict(str, object))', + 'comment': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'status': 'status', + 'severity': 'severity', + 'display_name': 'displayName', + 'description': 'description', + 'operation_time': 'operationTime', + 'operation': 'operation', + 'operation_status': 'operationStatus', + 'target_ids': 'targetIds', + 'target_names': 'targetNames', + 'policy_id': 'policyId', + 'alert_type': 'alertType', + 'resource_name': 'resourceName', + 'feature_details': 'featureDetails', + 'comment': 'comment', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._status = None + self._severity = None + self._display_name = None + self._description = None + self._operation_time = None + self._operation = None + self._operation_status = None + self._target_ids = None + self._target_names = None + self._policy_id = None + self._alert_type = None + self._resource_name = None + self._feature_details = None + self._comment = None + self._compartment_id = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Alert. + The OCID of the alert. + + + :return: The id of this Alert. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Alert. + The OCID of the alert. + + + :param id: The id of this Alert. + :type: str + """ + self._id = id + + @property + def status(self): + """ + Gets the status of this Alert. + The status of the alert. + + Allowed values for this property are: "OPEN", "CLOSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this Alert. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this Alert. + The status of the alert. + + + :param status: The status of this Alert. + :type: str + """ + allowed_values = ["OPEN", "CLOSED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def severity(self): + """ + Gets the severity of this Alert. + Severity level of the alert. + + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The severity of this Alert. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this Alert. + Severity level of the alert. + + + :param severity: The severity of this Alert. + :type: str + """ + allowed_values = ["CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + severity = 'UNKNOWN_ENUM_VALUE' + self._severity = severity + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Alert. + The display name of the alert. + + + :return: The display_name of this Alert. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Alert. + The display name of the alert. + + + :param display_name: The display_name of this Alert. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this Alert. + The description of the alert. + + + :return: The description of this Alert. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Alert. + The description of the alert. + + + :param description: The description of this Alert. + :type: str + """ + self._description = description + + @property + def operation_time(self): + """ + Gets the operation_time of this Alert. + Creation date and time of the operation that triggered alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The operation_time of this Alert. + :rtype: datetime + """ + return self._operation_time + + @operation_time.setter + def operation_time(self, operation_time): + """ + Sets the operation_time of this Alert. + Creation date and time of the operation that triggered alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param operation_time: The operation_time of this Alert. + :type: datetime + """ + self._operation_time = operation_time + + @property + def operation(self): + """ + Gets the operation of this Alert. + The operation (event) that triggered alert. + + + :return: The operation of this Alert. + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """ + Sets the operation of this Alert. + The operation (event) that triggered alert. + + + :param operation: The operation of this Alert. + :type: str + """ + self._operation = operation + + @property + def operation_status(self): + """ + Gets the operation_status of this Alert. + The result of the operation (event) that triggered alert. + + Allowed values for this property are: "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this Alert. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this Alert. + The result of the operation (event) that triggered alert. + + + :param operation_status: The operation_status of this Alert. + :type: str + """ + allowed_values = ["SUCCEEDED", "FAILED"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def target_ids(self): + """ + Gets the target_ids of this Alert. + Array of OCIDs of the target database which are associated with the alert. + + + :return: The target_ids of this Alert. + :rtype: list[str] + """ + return self._target_ids + + @target_ids.setter + def target_ids(self, target_ids): + """ + Sets the target_ids of this Alert. + Array of OCIDs of the target database which are associated with the alert. + + + :param target_ids: The target_ids of this Alert. + :type: list[str] + """ + self._target_ids = target_ids + + @property + def target_names(self): + """ + Gets the target_names of this Alert. + Array of names of the target database. + + + :return: The target_names of this Alert. + :rtype: list[str] + """ + return self._target_names + + @target_names.setter + def target_names(self, target_names): + """ + Sets the target_names of this Alert. + Array of names of the target database. + + + :param target_names: The target_names of this Alert. + :type: list[str] + """ + self._target_names = target_names + + @property + def policy_id(self): + """ + Gets the policy_id of this Alert. + The OCID of the policy that triggered alert. + + + :return: The policy_id of this Alert. + :rtype: str + """ + return self._policy_id + + @policy_id.setter + def policy_id(self, policy_id): + """ + Sets the policy_id of this Alert. + The OCID of the policy that triggered alert. + + + :param policy_id: The policy_id of this Alert. + :type: str + """ + self._policy_id = policy_id + + @property + def alert_type(self): + """ + Gets the alert_type of this Alert. + Type of the alert. Indicates the Data Safe feature triggering the alert. + + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The alert_type of this Alert. + :rtype: str + """ + return self._alert_type + + @alert_type.setter + def alert_type(self, alert_type): + """ + Sets the alert_type of this Alert. + Type of the alert. Indicates the Data Safe feature triggering the alert. + + + :param alert_type: The alert_type of this Alert. + :type: str + """ + allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"] + if not value_allowed_none_or_none_sentinel(alert_type, allowed_values): + alert_type = 'UNKNOWN_ENUM_VALUE' + self._alert_type = alert_type + + @property + def resource_name(self): + """ + Gets the resource_name of this Alert. + The resource endpoint that triggered the alert. + + + :return: The resource_name of this Alert. + :rtype: str + """ + return self._resource_name + + @resource_name.setter + def resource_name(self, resource_name): + """ + Sets the resource_name of this Alert. + The resource endpoint that triggered the alert. + + + :param resource_name: The resource_name of this Alert. + :type: str + """ + self._resource_name = resource_name + + @property + def feature_details(self): + """ + Gets the feature_details of this Alert. + Map that contains maps of values. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :return: The feature_details of this Alert. + :rtype: dict(str, dict(str, object)) + """ + return self._feature_details + + @feature_details.setter + def feature_details(self, feature_details): + """ + Sets the feature_details of this Alert. + Map that contains maps of values. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :param feature_details: The feature_details of this Alert. + :type: dict(str, dict(str, object)) + """ + self._feature_details = feature_details + + @property + def comment(self): + """ + Gets the comment of this Alert. + A comment for the alert. Entered by the user. + + + :return: The comment of this Alert. + :rtype: str + """ + return self._comment + + @comment.setter + def comment(self, comment): + """ + Sets the comment of this Alert. + A comment for the alert. Entered by the user. + + + :param comment: The comment of this Alert. + :type: str + """ + self._comment = comment + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Alert. + The OCID of the compartment that contains the alert. + + + :return: The compartment_id of this Alert. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Alert. + The OCID of the compartment that contains the alert. + + + :param compartment_id: The compartment_id of this Alert. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Alert. + The current state of the alert. + + Allowed values for this property are: "UPDATING", "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Alert. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Alert. + The current state of the alert. + + + :param lifecycle_state: The lifecycle_state of this Alert. + :type: str + """ + allowed_values = ["UPDATING", "SUCCEEDED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this Alert. + Creation date and time of the alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this Alert. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Alert. + Creation date and time of the alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this Alert. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this Alert. + Last date and time the alert was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this Alert. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Alert. + Last date and time the alert was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this Alert. + :type: datetime + """ + self._time_updated = time_updated + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Alert. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Alert. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Alert. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Alert. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Alert. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Alert. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Alert. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Alert. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Alert. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this Alert. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Alert. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this Alert. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_aggregation_items.py b/src/oci/data_safe/models/alert_aggregation_items.py new file mode 100644 index 0000000000..33b5df3a56 --- /dev/null +++ b/src/oci/data_safe/models/alert_aggregation_items.py @@ -0,0 +1,190 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertAggregationItems(object): + """ + Details of alerts aggregation items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertAggregationItems object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_name: + The value to assign to the metric_name property of this AlertAggregationItems. + :type metric_name: str + + :param time_started: + The value to assign to the time_started property of this AlertAggregationItems. + :type time_started: datetime + + :param time_ended: + The value to assign to the time_ended property of this AlertAggregationItems. + :type time_ended: datetime + + :param count: + The value to assign to the count property of this AlertAggregationItems. + :type count: int + + :param dimensions: + The value to assign to the dimensions property of this AlertAggregationItems. + :type dimensions: oci.data_safe.models.AlertsAggregationDimension + + """ + self.swagger_types = { + 'metric_name': 'str', + 'time_started': 'datetime', + 'time_ended': 'datetime', + 'count': 'int', + 'dimensions': 'AlertsAggregationDimension' + } + + self.attribute_map = { + 'metric_name': 'metricName', + 'time_started': 'timeStarted', + 'time_ended': 'timeEnded', + 'count': 'count', + 'dimensions': 'dimensions' + } + + self._metric_name = None + self._time_started = None + self._time_ended = None + self._count = None + self._dimensions = None + + @property + def metric_name(self): + """ + **[Required]** Gets the metric_name of this AlertAggregationItems. + The name of the aggregation. + + + :return: The metric_name of this AlertAggregationItems. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this AlertAggregationItems. + The name of the aggregation. + + + :param metric_name: The metric_name of this AlertAggregationItems. + :type: str + """ + self._metric_name = metric_name + + @property + def time_started(self): + """ + **[Required]** Gets the time_started of this AlertAggregationItems. + The time at which the aggregation started. + + + :return: The time_started of this AlertAggregationItems. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this AlertAggregationItems. + The time at which the aggregation started. + + + :param time_started: The time_started of this AlertAggregationItems. + :type: datetime + """ + self._time_started = time_started + + @property + def time_ended(self): + """ + **[Required]** Gets the time_ended of this AlertAggregationItems. + The time at which the aggregation ended. + + + :return: The time_ended of this AlertAggregationItems. + :rtype: datetime + """ + return self._time_ended + + @time_ended.setter + def time_ended(self, time_ended): + """ + Sets the time_ended of this AlertAggregationItems. + The time at which the aggregation ended. + + + :param time_ended: The time_ended of this AlertAggregationItems. + :type: datetime + """ + self._time_ended = time_ended + + @property + def count(self): + """ + **[Required]** Gets the count of this AlertAggregationItems. + Total count of aggregated values. + + + :return: The count of this AlertAggregationItems. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this AlertAggregationItems. + Total count of aggregated values. + + + :param count: The count of this AlertAggregationItems. + :type: int + """ + self._count = count + + @property + def dimensions(self): + """ + Gets the dimensions of this AlertAggregationItems. + + :return: The dimensions of this AlertAggregationItems. + :rtype: oci.data_safe.models.AlertsAggregationDimension + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AlertAggregationItems. + + :param dimensions: The dimensions of this AlertAggregationItems. + :type: oci.data_safe.models.AlertsAggregationDimension + """ + self._dimensions = dimensions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_analytics_collection.py b/src/oci/data_safe/models/alert_analytics_collection.py new file mode 100644 index 0000000000..a4547c39f4 --- /dev/null +++ b/src/oci/data_safe/models/alert_analytics_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertAnalyticsCollection(object): + """ + The summarized detail of alerts aggregation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertAnalyticsCollection 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 AlertAnalyticsCollection. + :type items: list[oci.data_safe.models.AlertAggregationItems] + + """ + self.swagger_types = { + 'items': 'list[AlertAggregationItems]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AlertAnalyticsCollection. + The aggregated data point items. + + + :return: The items of this AlertAnalyticsCollection. + :rtype: list[oci.data_safe.models.AlertAggregationItems] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AlertAnalyticsCollection. + The aggregated data point items. + + + :param items: The items of this AlertAnalyticsCollection. + :type: list[oci.data_safe.models.AlertAggregationItems] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_collection.py b/src/oci/data_safe/models/alert_collection.py new file mode 100644 index 0000000000..2652b7a916 --- /dev/null +++ b/src/oci/data_safe/models/alert_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertCollection(object): + """ + Collection of alert summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertCollection 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 AlertCollection. + :type items: list[oci.data_safe.models.AlertSummary] + + """ + self.swagger_types = { + 'items': 'list[AlertSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AlertCollection. + Array of alert summary + + + :return: The items of this AlertCollection. + :rtype: list[oci.data_safe.models.AlertSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AlertCollection. + Array of alert summary + + + :param items: The items of this AlertCollection. + :type: list[oci.data_safe.models.AlertSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_policy.py b/src/oci/data_safe/models/alert_policy.py new file mode 100644 index 0000000000..9868422584 --- /dev/null +++ b/src/oci/data_safe/models/alert_policy.py @@ -0,0 +1,550 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertPolicy(object): + """ + An Alert Policy is a set of alerting rules evaluated against a target. + The alert policy is said to be satisfied when all rules in the policy evaulate to true. + If there are three rules: rule1,rule2 and rule3, the policy is satisfied if rule1 AND rule2 AND rule3 is True. + """ + + #: A constant which can be used with the alert_policy_type property of a AlertPolicy. + #: This constant has a value of "AUDITING" + ALERT_POLICY_TYPE_AUDITING = "AUDITING" + + #: A constant which can be used with the alert_policy_type property of a AlertPolicy. + #: This constant has a value of "SECURITY_ASSESSMENT" + ALERT_POLICY_TYPE_SECURITY_ASSESSMENT = "SECURITY_ASSESSMENT" + + #: A constant which can be used with the alert_policy_type property of a AlertPolicy. + #: This constant has a value of "USER_ASSESSMENT" + ALERT_POLICY_TYPE_USER_ASSESSMENT = "USER_ASSESSMENT" + + #: A constant which can be used with the severity property of a AlertPolicy. + #: This constant has a value of "CRITICAL" + SEVERITY_CRITICAL = "CRITICAL" + + #: A constant which can be used with the severity property of a AlertPolicy. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a AlertPolicy. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a AlertPolicy. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a AlertPolicy. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicy. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicy. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicy. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicy. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicy. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicy. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new AlertPolicy 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 AlertPolicy. + :type id: str + + :param display_name: + The value to assign to the display_name property of this AlertPolicy. + :type display_name: str + + :param description: + The value to assign to the description property of this AlertPolicy. + :type description: str + + :param alert_policy_type: + The value to assign to the alert_policy_type property of this AlertPolicy. + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type alert_policy_type: str + + :param is_user_defined: + The value to assign to the is_user_defined property of this AlertPolicy. + :type is_user_defined: bool + + :param severity: + The value to assign to the severity property of this AlertPolicy. + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type severity: str + + :param compartment_id: + The value to assign to the compartment_id property of this AlertPolicy. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this AlertPolicy. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AlertPolicy. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlertPolicy. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AlertPolicy. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AlertPolicy. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AlertPolicy. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'alert_policy_type': 'str', + 'is_user_defined': 'bool', + 'severity': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'alert_policy_type': 'alertPolicyType', + 'is_user_defined': 'isUserDefined', + 'severity': 'severity', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._alert_policy_type = None + self._is_user_defined = None + self._severity = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AlertPolicy. + The OCID of the alert policy. + + + :return: The id of this AlertPolicy. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AlertPolicy. + The OCID of the alert policy. + + + :param id: The id of this AlertPolicy. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AlertPolicy. + The display name of the alert policy. + + + :return: The display_name of this AlertPolicy. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlertPolicy. + The display name of the alert policy. + + + :param display_name: The display_name of this AlertPolicy. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AlertPolicy. + The description of the alert policy. + + + :return: The description of this AlertPolicy. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlertPolicy. + The description of the alert policy. + + + :param description: The description of this AlertPolicy. + :type: str + """ + self._description = description + + @property + def alert_policy_type(self): + """ + Gets the alert_policy_type of this AlertPolicy. + Indicates the Data Safe feature to which the alert policy belongs. + + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The alert_policy_type of this AlertPolicy. + :rtype: str + """ + return self._alert_policy_type + + @alert_policy_type.setter + def alert_policy_type(self, alert_policy_type): + """ + Sets the alert_policy_type of this AlertPolicy. + Indicates the Data Safe feature to which the alert policy belongs. + + + :param alert_policy_type: The alert_policy_type of this AlertPolicy. + :type: str + """ + allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"] + if not value_allowed_none_or_none_sentinel(alert_policy_type, allowed_values): + alert_policy_type = 'UNKNOWN_ENUM_VALUE' + self._alert_policy_type = alert_policy_type + + @property + def is_user_defined(self): + """ + Gets the is_user_defined of this AlertPolicy. + Indicates if the alert policy is user-defined (true) or pre-defined (false). + + + :return: The is_user_defined of this AlertPolicy. + :rtype: bool + """ + return self._is_user_defined + + @is_user_defined.setter + def is_user_defined(self, is_user_defined): + """ + Sets the is_user_defined of this AlertPolicy. + Indicates if the alert policy is user-defined (true) or pre-defined (false). + + + :param is_user_defined: The is_user_defined of this AlertPolicy. + :type: bool + """ + self._is_user_defined = is_user_defined + + @property + def severity(self): + """ + Gets the severity of this AlertPolicy. + Severity level of the alert raised by this policy. + + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The severity of this AlertPolicy. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this AlertPolicy. + Severity level of the alert raised by this policy. + + + :param severity: The severity of this AlertPolicy. + :type: str + """ + allowed_values = ["CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + severity = 'UNKNOWN_ENUM_VALUE' + self._severity = severity + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AlertPolicy. + The OCID of the compartment that contains the alert policy. + + + :return: The compartment_id of this AlertPolicy. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AlertPolicy. + The OCID of the compartment that contains the alert policy. + + + :param compartment_id: The compartment_id of this AlertPolicy. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AlertPolicy. + Creation date and time of the alert policy, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AlertPolicy. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlertPolicy. + Creation date and time of the alert policy, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AlertPolicy. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AlertPolicy. + Last date and time the alert policy was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this AlertPolicy. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AlertPolicy. + Last date and time the alert policy was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this AlertPolicy. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AlertPolicy. + The current state of the alert. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AlertPolicy. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlertPolicy. + The current state of the alert. + + + :param lifecycle_state: The lifecycle_state of this AlertPolicy. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AlertPolicy. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AlertPolicy. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AlertPolicy. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AlertPolicy. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AlertPolicy. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AlertPolicy. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AlertPolicy. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AlertPolicy. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AlertPolicy. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AlertPolicy. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AlertPolicy. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AlertPolicy. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_policy_collection.py b/src/oci/data_safe/models/alert_policy_collection.py new file mode 100644 index 0000000000..aecb44c506 --- /dev/null +++ b/src/oci/data_safe/models/alert_policy_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertPolicyCollection(object): + """ + Collection of alert policy summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertPolicyCollection 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 AlertPolicyCollection. + :type items: list[oci.data_safe.models.AlertPolicySummary] + + """ + self.swagger_types = { + 'items': 'list[AlertPolicySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AlertPolicyCollection. + Array of alert policy summary + + + :return: The items of this AlertPolicyCollection. + :rtype: list[oci.data_safe.models.AlertPolicySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AlertPolicyCollection. + Array of alert policy summary + + + :param items: The items of this AlertPolicyCollection. + :type: list[oci.data_safe.models.AlertPolicySummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_policy_rule.py b/src/oci/data_safe/models/alert_policy_rule.py new file mode 100644 index 0000000000..af4d5a95e6 --- /dev/null +++ b/src/oci/data_safe/models/alert_policy_rule.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertPolicyRule(object): + """ + A rule associated with a alert policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertPolicyRule object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this AlertPolicyRule. + :type key: str + + :param description: + The value to assign to the description property of this AlertPolicyRule. + :type description: str + + :param expression: + The value to assign to the expression property of this AlertPolicyRule. + :type expression: str + + """ + self.swagger_types = { + 'key': 'str', + 'description': 'str', + 'expression': 'str' + } + + self.attribute_map = { + 'key': 'key', + 'description': 'description', + 'expression': 'expression' + } + + self._key = None + self._description = None + self._expression = None + + @property + def key(self): + """ + **[Required]** Gets the key of this AlertPolicyRule. + The unique key of the alert policy rule. + + + :return: The key of this AlertPolicyRule. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this AlertPolicyRule. + The unique key of the alert policy rule. + + + :param key: The key of this AlertPolicyRule. + :type: str + """ + self._key = key + + @property + def description(self): + """ + Gets the description of this AlertPolicyRule. + Describes the alert policy rule. + + + :return: The description of this AlertPolicyRule. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlertPolicyRule. + Describes the alert policy rule. + + + :param description: The description of this AlertPolicyRule. + :type: str + """ + self._description = description + + @property + def expression(self): + """ + **[Required]** Gets the expression of this AlertPolicyRule. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :return: The expression of this AlertPolicyRule. + :rtype: str + """ + return self._expression + + @expression.setter + def expression(self, expression): + """ + Sets the expression of this AlertPolicyRule. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :param expression: The expression of this AlertPolicyRule. + :type: str + """ + self._expression = expression + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_policy_rule_collection.py b/src/oci/data_safe/models/alert_policy_rule_collection.py new file mode 100644 index 0000000000..e8204323cb --- /dev/null +++ b/src/oci/data_safe/models/alert_policy_rule_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertPolicyRuleCollection(object): + """ + Collection of alert policy rules summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertPolicyRuleCollection 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 AlertPolicyRuleCollection. + :type items: list[oci.data_safe.models.AlertPolicyRuleSummary] + + """ + self.swagger_types = { + 'items': 'list[AlertPolicyRuleSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AlertPolicyRuleCollection. + Array of alert policy rules summary + + + :return: The items of this AlertPolicyRuleCollection. + :rtype: list[oci.data_safe.models.AlertPolicyRuleSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AlertPolicyRuleCollection. + Array of alert policy rules summary + + + :param items: The items of this AlertPolicyRuleCollection. + :type: list[oci.data_safe.models.AlertPolicyRuleSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_policy_rule_summary.py b/src/oci/data_safe/models/alert_policy_rule_summary.py new file mode 100644 index 0000000000..e5b02ae7ca --- /dev/null +++ b/src/oci/data_safe/models/alert_policy_rule_summary.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertPolicyRuleSummary(object): + """ + A rule associated with an alert policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertPolicyRuleSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this AlertPolicyRuleSummary. + :type key: str + + :param description: + The value to assign to the description property of this AlertPolicyRuleSummary. + :type description: str + + :param expression: + The value to assign to the expression property of this AlertPolicyRuleSummary. + :type expression: str + + """ + self.swagger_types = { + 'key': 'str', + 'description': 'str', + 'expression': 'str' + } + + self.attribute_map = { + 'key': 'key', + 'description': 'description', + 'expression': 'expression' + } + + self._key = None + self._description = None + self._expression = None + + @property + def key(self): + """ + **[Required]** Gets the key of this AlertPolicyRuleSummary. + The unique key of the alert policy rule. + + + :return: The key of this AlertPolicyRuleSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this AlertPolicyRuleSummary. + The unique key of the alert policy rule. + + + :param key: The key of this AlertPolicyRuleSummary. + :type: str + """ + self._key = key + + @property + def description(self): + """ + Gets the description of this AlertPolicyRuleSummary. + Describes the alert policy rule. + + + :return: The description of this AlertPolicyRuleSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlertPolicyRuleSummary. + Describes the alert policy rule. + + + :param description: The description of this AlertPolicyRuleSummary. + :type: str + """ + self._description = description + + @property + def expression(self): + """ + **[Required]** Gets the expression of this AlertPolicyRuleSummary. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :return: The expression of this AlertPolicyRuleSummary. + :rtype: str + """ + return self._expression + + @expression.setter + def expression(self, expression): + """ + Sets the expression of this AlertPolicyRuleSummary. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :param expression: The expression of this AlertPolicyRuleSummary. + :type: str + """ + self._expression = expression + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_policy_summary.py b/src/oci/data_safe/models/alert_policy_summary.py new file mode 100644 index 0000000000..06b7c05c41 --- /dev/null +++ b/src/oci/data_safe/models/alert_policy_summary.py @@ -0,0 +1,515 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertPolicySummary(object): + """ + Summary of a Data Safe alert policy. + """ + + #: A constant which can be used with the alert_policy_type property of a AlertPolicySummary. + #: This constant has a value of "AUDITING" + ALERT_POLICY_TYPE_AUDITING = "AUDITING" + + #: A constant which can be used with the alert_policy_type property of a AlertPolicySummary. + #: This constant has a value of "SECURITY_ASSESSMENT" + ALERT_POLICY_TYPE_SECURITY_ASSESSMENT = "SECURITY_ASSESSMENT" + + #: A constant which can be used with the alert_policy_type property of a AlertPolicySummary. + #: This constant has a value of "USER_ASSESSMENT" + ALERT_POLICY_TYPE_USER_ASSESSMENT = "USER_ASSESSMENT" + + #: A constant which can be used with the severity property of a AlertPolicySummary. + #: This constant has a value of "CRITICAL" + SEVERITY_CRITICAL = "CRITICAL" + + #: A constant which can be used with the severity property of a AlertPolicySummary. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a AlertPolicySummary. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a AlertPolicySummary. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a AlertPolicySummary. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicySummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicySummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicySummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicySummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicySummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a AlertPolicySummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new AlertPolicySummary 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 AlertPolicySummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this AlertPolicySummary. + :type display_name: str + + :param description: + The value to assign to the description property of this AlertPolicySummary. + :type description: str + + :param alert_policy_type: + The value to assign to the alert_policy_type property of this AlertPolicySummary. + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type alert_policy_type: str + + :param is_user_defined: + The value to assign to the is_user_defined property of this AlertPolicySummary. + :type is_user_defined: bool + + :param severity: + The value to assign to the severity property of this AlertPolicySummary. + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type severity: str + + :param compartment_id: + The value to assign to the compartment_id property of this AlertPolicySummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this AlertPolicySummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AlertPolicySummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlertPolicySummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AlertPolicySummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AlertPolicySummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'alert_policy_type': 'str', + 'is_user_defined': 'bool', + 'severity': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'alert_policy_type': 'alertPolicyType', + 'is_user_defined': 'isUserDefined', + 'severity': 'severity', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._description = None + self._alert_policy_type = None + self._is_user_defined = None + self._severity = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AlertPolicySummary. + The OCID of the alert policy. + + + :return: The id of this AlertPolicySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AlertPolicySummary. + The OCID of the alert policy. + + + :param id: The id of this AlertPolicySummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AlertPolicySummary. + The display name of the alert policy. + + + :return: The display_name of this AlertPolicySummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlertPolicySummary. + The display name of the alert policy. + + + :param display_name: The display_name of this AlertPolicySummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AlertPolicySummary. + The details of the alert policy. + + + :return: The description of this AlertPolicySummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlertPolicySummary. + The details of the alert policy. + + + :param description: The description of this AlertPolicySummary. + :type: str + """ + self._description = description + + @property + def alert_policy_type(self): + """ + **[Required]** Gets the alert_policy_type of this AlertPolicySummary. + Indicates the Data Safe feature that the alert policy belongs to. + + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The alert_policy_type of this AlertPolicySummary. + :rtype: str + """ + return self._alert_policy_type + + @alert_policy_type.setter + def alert_policy_type(self, alert_policy_type): + """ + Sets the alert_policy_type of this AlertPolicySummary. + Indicates the Data Safe feature that the alert policy belongs to. + + + :param alert_policy_type: The alert_policy_type of this AlertPolicySummary. + :type: str + """ + allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"] + if not value_allowed_none_or_none_sentinel(alert_policy_type, allowed_values): + alert_policy_type = 'UNKNOWN_ENUM_VALUE' + self._alert_policy_type = alert_policy_type + + @property + def is_user_defined(self): + """ + Gets the is_user_defined of this AlertPolicySummary. + Indicates if the alert policy is user-defined (true) or pre-defined (false). + + + :return: The is_user_defined of this AlertPolicySummary. + :rtype: bool + """ + return self._is_user_defined + + @is_user_defined.setter + def is_user_defined(self, is_user_defined): + """ + Sets the is_user_defined of this AlertPolicySummary. + Indicates if the alert policy is user-defined (true) or pre-defined (false). + + + :param is_user_defined: The is_user_defined of this AlertPolicySummary. + :type: bool + """ + self._is_user_defined = is_user_defined + + @property + def severity(self): + """ + Gets the severity of this AlertPolicySummary. + Severity level of the alert raised by this policy. + + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The severity of this AlertPolicySummary. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this AlertPolicySummary. + Severity level of the alert raised by this policy. + + + :param severity: The severity of this AlertPolicySummary. + :type: str + """ + allowed_values = ["CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + severity = 'UNKNOWN_ENUM_VALUE' + self._severity = severity + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AlertPolicySummary. + The OCID of the compartment that contains the alert policy. + + + :return: The compartment_id of this AlertPolicySummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AlertPolicySummary. + The OCID of the compartment that contains the alert policy. + + + :param compartment_id: The compartment_id of this AlertPolicySummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AlertPolicySummary. + Creation date and time of the alert policy, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AlertPolicySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlertPolicySummary. + Creation date and time of the alert policy, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AlertPolicySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AlertPolicySummary. + Last date and time the alert policy was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this AlertPolicySummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AlertPolicySummary. + Last date and time the alert policy was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this AlertPolicySummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AlertPolicySummary. + The current state of the alert policy. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AlertPolicySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlertPolicySummary. + The current state of the alert policy. + + + :param lifecycle_state: The lifecycle_state of this AlertPolicySummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AlertPolicySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AlertPolicySummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AlertPolicySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AlertPolicySummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AlertPolicySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AlertPolicySummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AlertPolicySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AlertPolicySummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alert_summary.py b/src/oci/data_safe/models/alert_summary.py new file mode 100644 index 0000000000..2ba5e19d70 --- /dev/null +++ b/src/oci/data_safe/models/alert_summary.py @@ -0,0 +1,758 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertSummary(object): + """ + Summary of a Data Safe Alert. + """ + + #: A constant which can be used with the status property of a AlertSummary. + #: This constant has a value of "OPEN" + STATUS_OPEN = "OPEN" + + #: A constant which can be used with the status property of a AlertSummary. + #: This constant has a value of "CLOSED" + STATUS_CLOSED = "CLOSED" + + #: A constant which can be used with the severity property of a AlertSummary. + #: This constant has a value of "CRITICAL" + SEVERITY_CRITICAL = "CRITICAL" + + #: A constant which can be used with the severity property of a AlertSummary. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a AlertSummary. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a AlertSummary. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a AlertSummary. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + #: A constant which can be used with the operation_status property of a AlertSummary. + #: This constant has a value of "SUCCEEDED" + OPERATION_STATUS_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the operation_status property of a AlertSummary. + #: This constant has a value of "FAILED" + OPERATION_STATUS_FAILED = "FAILED" + + #: A constant which can be used with the alert_type property of a AlertSummary. + #: This constant has a value of "AUDITING" + ALERT_TYPE_AUDITING = "AUDITING" + + #: A constant which can be used with the alert_type property of a AlertSummary. + #: This constant has a value of "SECURITY_ASSESSMENT" + ALERT_TYPE_SECURITY_ASSESSMENT = "SECURITY_ASSESSMENT" + + #: A constant which can be used with the alert_type property of a AlertSummary. + #: This constant has a value of "USER_ASSESSMENT" + ALERT_TYPE_USER_ASSESSMENT = "USER_ASSESSMENT" + + #: A constant which can be used with the lifecycle_state property of a AlertSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AlertSummary. + #: This constant has a value of "SUCCEEDED" + LIFECYCLE_STATE_SUCCEEDED = "SUCCEEDED" + + #: A constant which can be used with the lifecycle_state property of a AlertSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new AlertSummary 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 AlertSummary. + :type id: str + + :param status: + The value to assign to the status property of this AlertSummary. + Allowed values for this property are: "OPEN", "CLOSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param display_name: + The value to assign to the display_name property of this AlertSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this AlertSummary. + :type description: str + + :param severity: + The value to assign to the severity property of this AlertSummary. + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type severity: str + + :param operation_time: + The value to assign to the operation_time property of this AlertSummary. + :type operation_time: datetime + + :param operation: + The value to assign to the operation property of this AlertSummary. + :type operation: str + + :param operation_status: + The value to assign to the operation_status property of this AlertSummary. + Allowed values for this property are: "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param target_ids: + The value to assign to the target_ids property of this AlertSummary. + :type target_ids: list[str] + + :param target_names: + The value to assign to the target_names property of this AlertSummary. + :type target_names: list[str] + + :param policy_id: + The value to assign to the policy_id property of this AlertSummary. + :type policy_id: str + + :param alert_type: + The value to assign to the alert_type property of this AlertSummary. + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type alert_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this AlertSummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this AlertSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AlertSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AlertSummary. + Allowed values for this property are: "UPDATING", "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param feature_details: + The value to assign to the feature_details property of this AlertSummary. + :type feature_details: dict(str, dict(str, object)) + + :param freeform_tags: + The value to assign to the freeform_tags property of this AlertSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AlertSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'status': 'str', + 'display_name': 'str', + 'description': 'str', + 'severity': 'str', + 'operation_time': 'datetime', + 'operation': 'str', + 'operation_status': 'str', + 'target_ids': 'list[str]', + 'target_names': 'list[str]', + 'policy_id': 'str', + 'alert_type': 'str', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'feature_details': 'dict(str, dict(str, object))', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'status': 'status', + 'display_name': 'displayName', + 'description': 'description', + 'severity': 'severity', + 'operation_time': 'operationTime', + 'operation': 'operation', + 'operation_status': 'operationStatus', + 'target_ids': 'targetIds', + 'target_names': 'targetNames', + 'policy_id': 'policyId', + 'alert_type': 'alertType', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'feature_details': 'featureDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._status = None + self._display_name = None + self._description = None + self._severity = None + self._operation_time = None + self._operation = None + self._operation_status = None + self._target_ids = None + self._target_names = None + self._policy_id = None + self._alert_type = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._feature_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AlertSummary. + The OCID of the alert. + + + :return: The id of this AlertSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AlertSummary. + The OCID of the alert. + + + :param id: The id of this AlertSummary. + :type: str + """ + self._id = id + + @property + def status(self): + """ + **[Required]** Gets the status of this AlertSummary. + The status of the alert. + + Allowed values for this property are: "OPEN", "CLOSED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this AlertSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this AlertSummary. + The status of the alert. + + + :param status: The status of this AlertSummary. + :type: str + """ + allowed_values = ["OPEN", "CLOSED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AlertSummary. + The display name of the alert. + + + :return: The display_name of this AlertSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AlertSummary. + The display name of the alert. + + + :param display_name: The display_name of this AlertSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AlertSummary. + The details of the alert. + + + :return: The description of this AlertSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AlertSummary. + The details of the alert. + + + :param description: The description of this AlertSummary. + :type: str + """ + self._description = description + + @property + def severity(self): + """ + **[Required]** Gets the severity of this AlertSummary. + Severity level of the alert. + + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The severity of this AlertSummary. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this AlertSummary. + Severity level of the alert. + + + :param severity: The severity of this AlertSummary. + :type: str + """ + allowed_values = ["CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + severity = 'UNKNOWN_ENUM_VALUE' + self._severity = severity + + @property + def operation_time(self): + """ + Gets the operation_time of this AlertSummary. + Creation date and time of the operation that triggered alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The operation_time of this AlertSummary. + :rtype: datetime + """ + return self._operation_time + + @operation_time.setter + def operation_time(self, operation_time): + """ + Sets the operation_time of this AlertSummary. + Creation date and time of the operation that triggered alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param operation_time: The operation_time of this AlertSummary. + :type: datetime + """ + self._operation_time = operation_time + + @property + def operation(self): + """ + Gets the operation of this AlertSummary. + The operation that triggered alert. + + + :return: The operation of this AlertSummary. + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """ + Sets the operation of this AlertSummary. + The operation that triggered alert. + + + :param operation: The operation of this AlertSummary. + :type: str + """ + self._operation = operation + + @property + def operation_status(self): + """ + Gets the operation_status of this AlertSummary. + The result of the operation (event) that triggered alert. + + Allowed values for this property are: "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this AlertSummary. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this AlertSummary. + The result of the operation (event) that triggered alert. + + + :param operation_status: The operation_status of this AlertSummary. + :type: str + """ + allowed_values = ["SUCCEEDED", "FAILED"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def target_ids(self): + """ + Gets the target_ids of this AlertSummary. + Array of OCIDs of the target database. + + + :return: The target_ids of this AlertSummary. + :rtype: list[str] + """ + return self._target_ids + + @target_ids.setter + def target_ids(self, target_ids): + """ + Sets the target_ids of this AlertSummary. + Array of OCIDs of the target database. + + + :param target_ids: The target_ids of this AlertSummary. + :type: list[str] + """ + self._target_ids = target_ids + + @property + def target_names(self): + """ + Gets the target_names of this AlertSummary. + Array of names of the target database. + + + :return: The target_names of this AlertSummary. + :rtype: list[str] + """ + return self._target_names + + @target_names.setter + def target_names(self, target_names): + """ + Sets the target_names of this AlertSummary. + Array of names of the target database. + + + :param target_names: The target_names of this AlertSummary. + :type: list[str] + """ + self._target_names = target_names + + @property + def policy_id(self): + """ + Gets the policy_id of this AlertSummary. + The OCID of the policy that triggered alert. + + + :return: The policy_id of this AlertSummary. + :rtype: str + """ + return self._policy_id + + @policy_id.setter + def policy_id(self, policy_id): + """ + Sets the policy_id of this AlertSummary. + The OCID of the policy that triggered alert. + + + :param policy_id: The policy_id of this AlertSummary. + :type: str + """ + self._policy_id = policy_id + + @property + def alert_type(self): + """ + Gets the alert_type of this AlertSummary. + Type of the alert. Indicates the Data Safe feature triggering the alert. + + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The alert_type of this AlertSummary. + :rtype: str + """ + return self._alert_type + + @alert_type.setter + def alert_type(self, alert_type): + """ + Sets the alert_type of this AlertSummary. + Type of the alert. Indicates the Data Safe feature triggering the alert. + + + :param alert_type: The alert_type of this AlertSummary. + :type: str + """ + allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"] + if not value_allowed_none_or_none_sentinel(alert_type, allowed_values): + alert_type = 'UNKNOWN_ENUM_VALUE' + self._alert_type = alert_type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AlertSummary. + The OCID of the compartment that contains the alert. + + + :return: The compartment_id of this AlertSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AlertSummary. + The OCID of the compartment that contains the alert. + + + :param compartment_id: The compartment_id of this AlertSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AlertSummary. + Creation date and time of the alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this AlertSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AlertSummary. + Creation date and time of the alert, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this AlertSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AlertSummary. + Last date and time the alert was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this AlertSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AlertSummary. + Last date and time the alert was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this AlertSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AlertSummary. + The current state of the alert. + + Allowed values for this property are: "UPDATING", "SUCCEEDED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AlertSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AlertSummary. + The current state of the alert. + + + :param lifecycle_state: The lifecycle_state of this AlertSummary. + :type: str + """ + allowed_values = ["UPDATING", "SUCCEEDED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def feature_details(self): + """ + Gets the feature_details of this AlertSummary. + Map that contains maps of values. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :return: The feature_details of this AlertSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._feature_details + + @feature_details.setter + def feature_details(self, feature_details): + """ + Sets the feature_details of this AlertSummary. + Map that contains maps of values. + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + + :param feature_details: The feature_details of this AlertSummary. + :type: dict(str, dict(str, object)) + """ + self._feature_details = feature_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AlertSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AlertSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AlertSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AlertSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AlertSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AlertSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AlertSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AlertSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/alerts_aggregation_dimension.py b/src/oci/data_safe/models/alerts_aggregation_dimension.py new file mode 100644 index 0000000000..5f6f02ec7a --- /dev/null +++ b/src/oci/data_safe/models/alerts_aggregation_dimension.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AlertsAggregationDimension(object): + """ + Details of aggregation dimension summarizing alerts. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AlertsAggregationDimension object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param group_by: + The value to assign to the group_by property of this AlertsAggregationDimension. + :type group_by: dict(str, str) + + """ + self.swagger_types = { + 'group_by': 'dict(str, str)' + } + + self.attribute_map = { + 'group_by': 'groupBy' + } + + self._group_by = None + + @property + def group_by(self): + """ + **[Required]** Gets the group_by of this AlertsAggregationDimension. + GroupBy value used in aggregation. + + + :return: The group_by of this AlertsAggregationDimension. + :rtype: dict(str, str) + """ + return self._group_by + + @group_by.setter + def group_by(self, group_by): + """ + Sets the group_by of this AlertsAggregationDimension. + GroupBy value used in aggregation. + + + :param group_by: The group_by of this AlertsAggregationDimension. + :type: dict(str, str) + """ + self._group_by = group_by + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/apply_discovery_job_results_details.py b/src/oci/data_safe/models/apply_discovery_job_results_details.py new file mode 100644 index 0000000000..0ae3299122 --- /dev/null +++ b/src/oci/data_safe/models/apply_discovery_job_results_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ApplyDiscoveryJobResultsDetails(object): + """ + Details to apply the discovery results to a sensitive data model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ApplyDiscoveryJobResultsDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param discovery_job_id: + The value to assign to the discovery_job_id property of this ApplyDiscoveryJobResultsDetails. + :type discovery_job_id: str + + """ + self.swagger_types = { + 'discovery_job_id': 'str' + } + + self.attribute_map = { + 'discovery_job_id': 'discoveryJobId' + } + + self._discovery_job_id = None + + @property + def discovery_job_id(self): + """ + **[Required]** Gets the discovery_job_id of this ApplyDiscoveryJobResultsDetails. + The OCID of the discovery job. + + + :return: The discovery_job_id of this ApplyDiscoveryJobResultsDetails. + :rtype: str + """ + return self._discovery_job_id + + @discovery_job_id.setter + def discovery_job_id(self, discovery_job_id): + """ + Sets the discovery_job_id of this ApplyDiscoveryJobResultsDetails. + The OCID of the discovery job. + + + :param discovery_job_id: The discovery_job_id of this ApplyDiscoveryJobResultsDetails. + :type: str + """ + self._discovery_job_id = discovery_job_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_archive_retrieval.py b/src/oci/data_safe/models/audit_archive_retrieval.py new file mode 100644 index 0000000000..63015eacee --- /dev/null +++ b/src/oci/data_safe/models/audit_archive_retrieval.py @@ -0,0 +1,619 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditArchiveRetrieval(object): + """ + Represents the archive retrieve request for the audit data. You can retrieve audit data for a target database from the archive and store it online. + For more information, see `Retrieve Audit Data for a Target Database from the Archive`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/security-assessment-overview.html + """ + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrieval. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrieval. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrieval. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrieval. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrieval. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrieval. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditArchiveRetrieval 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 AuditArchiveRetrieval. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditArchiveRetrieval. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this AuditArchiveRetrieval. + :type display_name: str + + :param description: + The value to assign to the description property of this AuditArchiveRetrieval. + :type description: str + + :param start_date: + The value to assign to the start_date property of this AuditArchiveRetrieval. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this AuditArchiveRetrieval. + :type end_date: datetime + + :param target_id: + The value to assign to the target_id property of this AuditArchiveRetrieval. + :type target_id: str + + :param time_requested: + The value to assign to the time_requested property of this AuditArchiveRetrieval. + :type time_requested: datetime + + :param time_completed: + The value to assign to the time_completed property of this AuditArchiveRetrieval. + :type time_completed: datetime + + :param time_of_expiry: + The value to assign to the time_of_expiry property of this AuditArchiveRetrieval. + :type time_of_expiry: datetime + + :param audit_event_count: + The value to assign to the audit_event_count property of this AuditArchiveRetrieval. + :type audit_event_count: int + + :param error_info: + The value to assign to the error_info property of this AuditArchiveRetrieval. + :type error_info: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditArchiveRetrieval. + Allowed values for this property are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "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 AuditArchiveRetrieval. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditArchiveRetrieval. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditArchiveRetrieval. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AuditArchiveRetrieval. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'target_id': 'str', + 'time_requested': 'datetime', + 'time_completed': 'datetime', + 'time_of_expiry': 'datetime', + 'audit_event_count': 'int', + 'error_info': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'description': 'description', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'target_id': 'targetId', + 'time_requested': 'timeRequested', + 'time_completed': 'timeCompleted', + 'time_of_expiry': 'timeOfExpiry', + 'audit_event_count': 'auditEventCount', + 'error_info': 'errorInfo', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._description = None + self._start_date = None + self._end_date = None + self._target_id = None + self._time_requested = None + self._time_completed = None + self._time_of_expiry = None + self._audit_event_count = None + self._error_info = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditArchiveRetrieval. + The OCID of the archive retrieval. + + + :return: The id of this AuditArchiveRetrieval. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditArchiveRetrieval. + The OCID of the archive retrieval. + + + :param id: The id of this AuditArchiveRetrieval. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditArchiveRetrieval. + The OCID of the compartment that contains archive retrieval. + + + :return: The compartment_id of this AuditArchiveRetrieval. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditArchiveRetrieval. + The OCID of the compartment that contains archive retrieval. + + + :param compartment_id: The compartment_id of this AuditArchiveRetrieval. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditArchiveRetrieval. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :return: The display_name of this AuditArchiveRetrieval. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditArchiveRetrieval. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :param display_name: The display_name of this AuditArchiveRetrieval. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AuditArchiveRetrieval. + Description of the archive retrieval. + + + :return: The description of this AuditArchiveRetrieval. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditArchiveRetrieval. + Description of the archive retrieval. + + + :param description: The description of this AuditArchiveRetrieval. + :type: str + """ + self._description = description + + @property + def start_date(self): + """ + **[Required]** Gets the start_date of this AuditArchiveRetrieval. + Start month of the archive retrieval, in the format defined by RFC3339. + + + :return: The start_date of this AuditArchiveRetrieval. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this AuditArchiveRetrieval. + Start month of the archive retrieval, in the format defined by RFC3339. + + + :param start_date: The start_date of this AuditArchiveRetrieval. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + **[Required]** Gets the end_date of this AuditArchiveRetrieval. + End month of the archive retrieval, in the format defined by RFC3339. + + + :return: The end_date of this AuditArchiveRetrieval. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this AuditArchiveRetrieval. + End month of the archive retrieval, in the format defined by RFC3339. + + + :param end_date: The end_date of this AuditArchiveRetrieval. + :type: datetime + """ + self._end_date = end_date + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditArchiveRetrieval. + The OCID of the target associated with the archive retrieval. + + + :return: The target_id of this AuditArchiveRetrieval. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditArchiveRetrieval. + The OCID of the target associated with the archive retrieval. + + + :param target_id: The target_id of this AuditArchiveRetrieval. + :type: str + """ + self._target_id = target_id + + @property + def time_requested(self): + """ + Gets the time_requested of this AuditArchiveRetrieval. + The date time when archive retrieval was requested, in the format defined by RFC3339. + + + :return: The time_requested of this AuditArchiveRetrieval. + :rtype: datetime + """ + return self._time_requested + + @time_requested.setter + def time_requested(self, time_requested): + """ + Sets the time_requested of this AuditArchiveRetrieval. + The date time when archive retrieval was requested, in the format defined by RFC3339. + + + :param time_requested: The time_requested of this AuditArchiveRetrieval. + :type: datetime + """ + self._time_requested = time_requested + + @property + def time_completed(self): + """ + Gets the time_completed of this AuditArchiveRetrieval. + The date time when archive retrieval request was fulfilled, in the format defined by RFC3339. + + + :return: The time_completed of this AuditArchiveRetrieval. + :rtype: datetime + """ + return self._time_completed + + @time_completed.setter + def time_completed(self, time_completed): + """ + Sets the time_completed of this AuditArchiveRetrieval. + The date time when archive retrieval request was fulfilled, in the format defined by RFC3339. + + + :param time_completed: The time_completed of this AuditArchiveRetrieval. + :type: datetime + """ + self._time_completed = time_completed + + @property + def time_of_expiry(self): + """ + Gets the time_of_expiry of this AuditArchiveRetrieval. + The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival. + + + :return: The time_of_expiry of this AuditArchiveRetrieval. + :rtype: datetime + """ + return self._time_of_expiry + + @time_of_expiry.setter + def time_of_expiry(self, time_of_expiry): + """ + Sets the time_of_expiry of this AuditArchiveRetrieval. + The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival. + + + :param time_of_expiry: The time_of_expiry of this AuditArchiveRetrieval. + :type: datetime + """ + self._time_of_expiry = time_of_expiry + + @property + def audit_event_count(self): + """ + Gets the audit_event_count of this AuditArchiveRetrieval. + Total count of audit events to be retrieved from the archive for the specified date range. + + + :return: The audit_event_count of this AuditArchiveRetrieval. + :rtype: int + """ + return self._audit_event_count + + @audit_event_count.setter + def audit_event_count(self, audit_event_count): + """ + Sets the audit_event_count of this AuditArchiveRetrieval. + Total count of audit events to be retrieved from the archive for the specified date range. + + + :param audit_event_count: The audit_event_count of this AuditArchiveRetrieval. + :type: int + """ + self._audit_event_count = audit_event_count + + @property + def error_info(self): + """ + Gets the error_info of this AuditArchiveRetrieval. + The Error details of a failed archive retrieval. + + + :return: The error_info of this AuditArchiveRetrieval. + :rtype: str + """ + return self._error_info + + @error_info.setter + def error_info(self, error_info): + """ + Sets the error_info of this AuditArchiveRetrieval. + The Error details of a failed archive retrieval. + + + :param error_info: The error_info of this AuditArchiveRetrieval. + :type: str + """ + self._error_info = error_info + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditArchiveRetrieval. + The current state of the archive retrieval. + + Allowed values for this property are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "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 AuditArchiveRetrieval. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditArchiveRetrieval. + The current state of the archive retrieval. + + + :param lifecycle_state: The lifecycle_state of this AuditArchiveRetrieval. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "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 AuditArchiveRetrieval. + Details about the current state of the archive retrieval. + + + :return: The lifecycle_details of this AuditArchiveRetrieval. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditArchiveRetrieval. + Details about the current state of the archive retrieval. + + + :param lifecycle_details: The lifecycle_details of this AuditArchiveRetrieval. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditArchiveRetrieval. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditArchiveRetrieval. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditArchiveRetrieval. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditArchiveRetrieval. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditArchiveRetrieval. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditArchiveRetrieval. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditArchiveRetrieval. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditArchiveRetrieval. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AuditArchiveRetrieval. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AuditArchiveRetrieval. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AuditArchiveRetrieval. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AuditArchiveRetrieval. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_archive_retrieval_collection.py b/src/oci/data_safe/models/audit_archive_retrieval_collection.py new file mode 100644 index 0000000000..b61f3b8095 --- /dev/null +++ b/src/oci/data_safe/models/audit_archive_retrieval_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditArchiveRetrievalCollection(object): + """ + Collection of archive retrieval summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditArchiveRetrievalCollection 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 AuditArchiveRetrievalCollection. + :type items: list[oci.data_safe.models.AuditArchiveRetrievalSummary] + + """ + self.swagger_types = { + 'items': 'list[AuditArchiveRetrievalSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditArchiveRetrievalCollection. + Array of archive retrieval summary. + + + :return: The items of this AuditArchiveRetrievalCollection. + :rtype: list[oci.data_safe.models.AuditArchiveRetrievalSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditArchiveRetrievalCollection. + Array of archive retrieval summary. + + + :param items: The items of this AuditArchiveRetrievalCollection. + :type: list[oci.data_safe.models.AuditArchiveRetrievalSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_archive_retrieval_summary.py b/src/oci/data_safe/models/audit_archive_retrieval_summary.py new file mode 100644 index 0000000000..1955858e0f --- /dev/null +++ b/src/oci/data_safe/models/audit_archive_retrieval_summary.py @@ -0,0 +1,583 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditArchiveRetrievalSummary(object): + """ + Summary details of an archive retrieval. + """ + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrievalSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrievalSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrievalSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrievalSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrievalSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditArchiveRetrievalSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditArchiveRetrievalSummary 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 AuditArchiveRetrievalSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditArchiveRetrievalSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this AuditArchiveRetrievalSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this AuditArchiveRetrievalSummary. + :type description: str + + :param start_date: + The value to assign to the start_date property of this AuditArchiveRetrievalSummary. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this AuditArchiveRetrievalSummary. + :type end_date: datetime + + :param target_id: + The value to assign to the target_id property of this AuditArchiveRetrievalSummary. + :type target_id: str + + :param time_requested: + The value to assign to the time_requested property of this AuditArchiveRetrievalSummary. + :type time_requested: datetime + + :param time_completed: + The value to assign to the time_completed property of this AuditArchiveRetrievalSummary. + :type time_completed: datetime + + :param time_of_expiry: + The value to assign to the time_of_expiry property of this AuditArchiveRetrievalSummary. + :type time_of_expiry: datetime + + :param audit_event_count: + The value to assign to the audit_event_count property of this AuditArchiveRetrievalSummary. + :type audit_event_count: int + + :param error_info: + The value to assign to the error_info property of this AuditArchiveRetrievalSummary. + :type error_info: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditArchiveRetrievalSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "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 AuditArchiveRetrievalSummary. + :type lifecycle_details: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditArchiveRetrievalSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditArchiveRetrievalSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'target_id': 'str', + 'time_requested': 'datetime', + 'time_completed': 'datetime', + 'time_of_expiry': 'datetime', + 'audit_event_count': 'int', + 'error_info': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'description': 'description', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'target_id': 'targetId', + 'time_requested': 'timeRequested', + 'time_completed': 'timeCompleted', + 'time_of_expiry': 'timeOfExpiry', + 'audit_event_count': 'auditEventCount', + 'error_info': 'errorInfo', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._description = None + self._start_date = None + self._end_date = None + self._target_id = None + self._time_requested = None + self._time_completed = None + self._time_of_expiry = None + self._audit_event_count = None + self._error_info = None + self._lifecycle_state = None + self._lifecycle_details = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditArchiveRetrievalSummary. + The OCID of the archive retrieval. + + + :return: The id of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditArchiveRetrievalSummary. + The OCID of the archive retrieval. + + + :param id: The id of this AuditArchiveRetrievalSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditArchiveRetrievalSummary. + The OCID of the compartment that contains archive retrieval. + + + :return: The compartment_id of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditArchiveRetrievalSummary. + The OCID of the compartment that contains archive retrieval. + + + :param compartment_id: The compartment_id of this AuditArchiveRetrievalSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditArchiveRetrievalSummary. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :return: The display_name of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditArchiveRetrievalSummary. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :param display_name: The display_name of this AuditArchiveRetrievalSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AuditArchiveRetrievalSummary. + Description of the archive retrieval. + + + :return: The description of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditArchiveRetrievalSummary. + Description of the archive retrieval. + + + :param description: The description of this AuditArchiveRetrievalSummary. + :type: str + """ + self._description = description + + @property + def start_date(self): + """ + **[Required]** Gets the start_date of this AuditArchiveRetrievalSummary. + Start month of the archive retrieval, in the format defined by RFC3339. + + + :return: The start_date of this AuditArchiveRetrievalSummary. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this AuditArchiveRetrievalSummary. + Start month of the archive retrieval, in the format defined by RFC3339. + + + :param start_date: The start_date of this AuditArchiveRetrievalSummary. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + **[Required]** Gets the end_date of this AuditArchiveRetrievalSummary. + End month of the archive retrieval, in the format defined by RFC3339. + + + :return: The end_date of this AuditArchiveRetrievalSummary. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this AuditArchiveRetrievalSummary. + End month of the archive retrieval, in the format defined by RFC3339. + + + :param end_date: The end_date of this AuditArchiveRetrievalSummary. + :type: datetime + """ + self._end_date = end_date + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditArchiveRetrievalSummary. + The OCID of the target associated with the archive retrieval. + + + :return: The target_id of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditArchiveRetrievalSummary. + The OCID of the target associated with the archive retrieval. + + + :param target_id: The target_id of this AuditArchiveRetrievalSummary. + :type: str + """ + self._target_id = target_id + + @property + def time_requested(self): + """ + Gets the time_requested of this AuditArchiveRetrievalSummary. + The date time when archive retrieval was requested, in the format defined by RFC3339. + + + :return: The time_requested of this AuditArchiveRetrievalSummary. + :rtype: datetime + """ + return self._time_requested + + @time_requested.setter + def time_requested(self, time_requested): + """ + Sets the time_requested of this AuditArchiveRetrievalSummary. + The date time when archive retrieval was requested, in the format defined by RFC3339. + + + :param time_requested: The time_requested of this AuditArchiveRetrievalSummary. + :type: datetime + """ + self._time_requested = time_requested + + @property + def time_completed(self): + """ + Gets the time_completed of this AuditArchiveRetrievalSummary. + The date time when archive retrieval request was fulfilled, in the format defined by RFC3339. + + + :return: The time_completed of this AuditArchiveRetrievalSummary. + :rtype: datetime + """ + return self._time_completed + + @time_completed.setter + def time_completed(self, time_completed): + """ + Sets the time_completed of this AuditArchiveRetrievalSummary. + The date time when archive retrieval request was fulfilled, in the format defined by RFC3339. + + + :param time_completed: The time_completed of this AuditArchiveRetrievalSummary. + :type: datetime + """ + self._time_completed = time_completed + + @property + def time_of_expiry(self): + """ + Gets the time_of_expiry of this AuditArchiveRetrievalSummary. + The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival. + + + :return: The time_of_expiry of this AuditArchiveRetrievalSummary. + :rtype: datetime + """ + return self._time_of_expiry + + @time_of_expiry.setter + def time_of_expiry(self, time_of_expiry): + """ + Sets the time_of_expiry of this AuditArchiveRetrievalSummary. + The date time when retrieved archive data will be deleted from Data Safe and unloaded back into archival. + + + :param time_of_expiry: The time_of_expiry of this AuditArchiveRetrievalSummary. + :type: datetime + """ + self._time_of_expiry = time_of_expiry + + @property + def audit_event_count(self): + """ + Gets the audit_event_count of this AuditArchiveRetrievalSummary. + Total retrieved archive records audit event count. + + + :return: The audit_event_count of this AuditArchiveRetrievalSummary. + :rtype: int + """ + return self._audit_event_count + + @audit_event_count.setter + def audit_event_count(self, audit_event_count): + """ + Sets the audit_event_count of this AuditArchiveRetrievalSummary. + Total retrieved archive records audit event count. + + + :param audit_event_count: The audit_event_count of this AuditArchiveRetrievalSummary. + :type: int + """ + self._audit_event_count = audit_event_count + + @property + def error_info(self): + """ + Gets the error_info of this AuditArchiveRetrievalSummary. + Error details of failed archive retrieval. + + + :return: The error_info of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._error_info + + @error_info.setter + def error_info(self, error_info): + """ + Sets the error_info of this AuditArchiveRetrievalSummary. + Error details of failed archive retrieval. + + + :param error_info: The error_info of this AuditArchiveRetrievalSummary. + :type: str + """ + self._error_info = error_info + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditArchiveRetrievalSummary. + The current state of the archive retrieval. + + Allowed values for this property are: "CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "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 AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditArchiveRetrievalSummary. + The current state of the archive retrieval. + + + :param lifecycle_state: The lifecycle_state of this AuditArchiveRetrievalSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "NEEDS_ATTENTION", "FAILED", "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 AuditArchiveRetrievalSummary. + Details about the current state of the archive retrieval. + + + :return: The lifecycle_details of this AuditArchiveRetrievalSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditArchiveRetrievalSummary. + Details about the current state of the archive retrieval. + + + :param lifecycle_details: The lifecycle_details of this AuditArchiveRetrievalSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditArchiveRetrievalSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditArchiveRetrievalSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditArchiveRetrievalSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditArchiveRetrievalSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditArchiveRetrievalSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditArchiveRetrievalSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditArchiveRetrievalSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditArchiveRetrievalSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_conditions.py b/src/oci/data_safe/models/audit_conditions.py new file mode 100644 index 0000000000..060afb437e --- /dev/null +++ b/src/oci/data_safe/models/audit_conditions.py @@ -0,0 +1,167 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditConditions(object): + """ + Represents audit policies with corresponding audit provisioning conditions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditConditions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_policy_name: + The value to assign to the audit_policy_name property of this AuditConditions. + :type audit_policy_name: str + + :param is_priv_users_managed_by_data_safe: + The value to assign to the is_priv_users_managed_by_data_safe property of this AuditConditions. + :type is_priv_users_managed_by_data_safe: bool + + :param is_data_safe_service_account_audited: + The value to assign to the is_data_safe_service_account_audited property of this AuditConditions. + :type is_data_safe_service_account_audited: bool + + :param enable_conditions: + The value to assign to the enable_conditions property of this AuditConditions. + :type enable_conditions: list[oci.data_safe.models.EnableConditions] + + """ + self.swagger_types = { + 'audit_policy_name': 'str', + 'is_priv_users_managed_by_data_safe': 'bool', + 'is_data_safe_service_account_audited': 'bool', + 'enable_conditions': 'list[EnableConditions]' + } + + self.attribute_map = { + 'audit_policy_name': 'auditPolicyName', + 'is_priv_users_managed_by_data_safe': 'isPrivUsersManagedByDataSafe', + 'is_data_safe_service_account_audited': 'isDataSafeServiceAccountAudited', + 'enable_conditions': 'enableConditions' + } + + self._audit_policy_name = None + self._is_priv_users_managed_by_data_safe = None + self._is_data_safe_service_account_audited = None + self._enable_conditions = None + + @property + def audit_policy_name(self): + """ + **[Required]** Gets the audit_policy_name of this AuditConditions. + Indicates the audit policy name. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :return: The audit_policy_name of this AuditConditions. + :rtype: str + """ + return self._audit_policy_name + + @audit_policy_name.setter + def audit_policy_name(self, audit_policy_name): + """ + Sets the audit_policy_name of this AuditConditions. + Indicates the audit policy name. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :param audit_policy_name: The audit_policy_name of this AuditConditions. + :type: str + """ + self._audit_policy_name = audit_policy_name + + @property + def is_priv_users_managed_by_data_safe(self): + """ + **[Required]** Gets the is_priv_users_managed_by_data_safe of this AuditConditions. + Indicates whether the privileged user list is managed by Data Safe. + + + :return: The is_priv_users_managed_by_data_safe of this AuditConditions. + :rtype: bool + """ + return self._is_priv_users_managed_by_data_safe + + @is_priv_users_managed_by_data_safe.setter + def is_priv_users_managed_by_data_safe(self, is_priv_users_managed_by_data_safe): + """ + Sets the is_priv_users_managed_by_data_safe of this AuditConditions. + Indicates whether the privileged user list is managed by Data Safe. + + + :param is_priv_users_managed_by_data_safe: The is_priv_users_managed_by_data_safe of this AuditConditions. + :type: bool + """ + self._is_priv_users_managed_by_data_safe = is_priv_users_managed_by_data_safe + + @property + def is_data_safe_service_account_audited(self): + """ + **[Required]** Gets the is_data_safe_service_account_audited of this AuditConditions. + Indicates whether the Data Safe user activity on the target database will be audited by the policy. + + + :return: The is_data_safe_service_account_audited of this AuditConditions. + :rtype: bool + """ + return self._is_data_safe_service_account_audited + + @is_data_safe_service_account_audited.setter + def is_data_safe_service_account_audited(self, is_data_safe_service_account_audited): + """ + Sets the is_data_safe_service_account_audited of this AuditConditions. + Indicates whether the Data Safe user activity on the target database will be audited by the policy. + + + :param is_data_safe_service_account_audited: The is_data_safe_service_account_audited of this AuditConditions. + :type: bool + """ + self._is_data_safe_service_account_audited = is_data_safe_service_account_audited + + @property + def enable_conditions(self): + """ + Gets the enable_conditions of this AuditConditions. + Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event.. + + + :return: The enable_conditions of this AuditConditions. + :rtype: list[oci.data_safe.models.EnableConditions] + """ + return self._enable_conditions + + @enable_conditions.setter + def enable_conditions(self, enable_conditions): + """ + Sets the enable_conditions of this AuditConditions. + Indicates the users/roles in the target database for which the audit policy is enforced, and the success/failure event condition to generate the audit event.. + + + :param enable_conditions: The enable_conditions of this AuditConditions. + :type: list[oci.data_safe.models.EnableConditions] + """ + self._enable_conditions = enable_conditions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_event_aggregation_dimensions.py b/src/oci/data_safe/models/audit_event_aggregation_dimensions.py new file mode 100644 index 0000000000..0c8e2d14f3 --- /dev/null +++ b/src/oci/data_safe/models/audit_event_aggregation_dimensions.py @@ -0,0 +1,432 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditEventAggregationDimensions(object): + """ + Details of aggregation dimensions used for summarizing audit events. + """ + + #: A constant which can be used with the target_class property of a AuditEventAggregationDimensions. + #: This constant has a value of "DATABASE" + TARGET_CLASS_DATABASE = "DATABASE" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "STANDARD" + AUDIT_TYPE_STANDARD = "STANDARD" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "FINE_GRAINED" + AUDIT_TYPE_FINE_GRAINED = "FINE_GRAINED" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "XS" + AUDIT_TYPE_XS = "XS" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "DATABASE_VAULT" + AUDIT_TYPE_DATABASE_VAULT = "DATABASE_VAULT" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "LABEL_SECURITY" + AUDIT_TYPE_LABEL_SECURITY = "LABEL_SECURITY" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "RMAN" + AUDIT_TYPE_RMAN = "RMAN" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "DATAPUMP" + AUDIT_TYPE_DATAPUMP = "DATAPUMP" + + #: A constant which can be used with the audit_type property of a AuditEventAggregationDimensions. + #: This constant has a value of "DIRECT_PATH_API" + AUDIT_TYPE_DIRECT_PATH_API = "DIRECT_PATH_API" + + def __init__(self, **kwargs): + """ + Initializes a new AuditEventAggregationDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_event_time: + The value to assign to the audit_event_time property of this AuditEventAggregationDimensions. + :type audit_event_time: list[datetime] + + :param db_user_name: + The value to assign to the db_user_name property of this AuditEventAggregationDimensions. + :type db_user_name: list[str] + + :param target_id: + The value to assign to the target_id property of this AuditEventAggregationDimensions. + :type target_id: list[str] + + :param target_name: + The value to assign to the target_name property of this AuditEventAggregationDimensions. + :type target_name: list[str] + + :param target_class: + The value to assign to the target_class property of this AuditEventAggregationDimensions. + Allowed values for items in this list are: "DATABASE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type target_class: list[str] + + :param object_type: + The value to assign to the object_type property of this AuditEventAggregationDimensions. + :type object_type: list[str] + + :param client_hostname: + The value to assign to the client_hostname property of this AuditEventAggregationDimensions. + :type client_hostname: list[str] + + :param client_program: + The value to assign to the client_program property of this AuditEventAggregationDimensions. + :type client_program: list[str] + + :param client_id: + The value to assign to the client_id property of this AuditEventAggregationDimensions. + :type client_id: list[str] + + :param audit_type: + The value to assign to the audit_type property of this AuditEventAggregationDimensions. + Allowed values for items in this list are: "STANDARD", "FINE_GRAINED", "XS", "DATABASE_VAULT", "LABEL_SECURITY", "RMAN", "DATAPUMP", "DIRECT_PATH_API", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type audit_type: list[str] + + :param event_name: + The value to assign to the event_name property of this AuditEventAggregationDimensions. + :type event_name: list[str] + + """ + self.swagger_types = { + 'audit_event_time': 'list[datetime]', + 'db_user_name': 'list[str]', + 'target_id': 'list[str]', + 'target_name': 'list[str]', + 'target_class': 'list[str]', + 'object_type': 'list[str]', + 'client_hostname': 'list[str]', + 'client_program': 'list[str]', + 'client_id': 'list[str]', + 'audit_type': 'list[str]', + 'event_name': 'list[str]' + } + + self.attribute_map = { + 'audit_event_time': 'auditEventTime', + 'db_user_name': 'dbUserName', + 'target_id': 'targetId', + 'target_name': 'targetName', + 'target_class': 'targetClass', + 'object_type': 'objectType', + 'client_hostname': 'clientHostname', + 'client_program': 'clientProgram', + 'client_id': 'clientId', + 'audit_type': 'auditType', + 'event_name': 'eventName' + } + + self._audit_event_time = None + self._db_user_name = None + self._target_id = None + self._target_name = None + self._target_class = None + self._object_type = None + self._client_hostname = None + self._client_program = None + self._client_id = None + self._audit_type = None + self._event_name = None + + @property + def audit_event_time(self): + """ + Gets the audit_event_time of this AuditEventAggregationDimensions. + Time of audit event occurrence in the target database. + + + :return: The audit_event_time of this AuditEventAggregationDimensions. + :rtype: list[datetime] + """ + return self._audit_event_time + + @audit_event_time.setter + def audit_event_time(self, audit_event_time): + """ + Sets the audit_event_time of this AuditEventAggregationDimensions. + Time of audit event occurrence in the target database. + + + :param audit_event_time: The audit_event_time of this AuditEventAggregationDimensions. + :type: list[datetime] + """ + self._audit_event_time = audit_event_time + + @property + def db_user_name(self): + """ + Gets the db_user_name of this AuditEventAggregationDimensions. + Name of the database user whose actions were audited. + + + :return: The db_user_name of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._db_user_name + + @db_user_name.setter + def db_user_name(self, db_user_name): + """ + Sets the db_user_name of this AuditEventAggregationDimensions. + Name of the database user whose actions were audited. + + + :param db_user_name: The db_user_name of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._db_user_name = db_user_name + + @property + def target_id(self): + """ + Gets the target_id of this AuditEventAggregationDimensions. + The OCID of the target database that was audited. + + + :return: The target_id of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditEventAggregationDimensions. + The OCID of the target database that was audited. + + + :param target_id: The target_id of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._target_id = target_id + + @property + def target_name(self): + """ + Gets the target_name of this AuditEventAggregationDimensions. + The name of the target database that was audited. + + + :return: The target_name of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._target_name + + @target_name.setter + def target_name(self, target_name): + """ + Sets the target_name of this AuditEventAggregationDimensions. + The name of the target database that was audited. + + + :param target_name: The target_name of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._target_name = target_name + + @property + def target_class(self): + """ + Gets the target_class of this AuditEventAggregationDimensions. + Class of the target that was audited. + + Allowed values for items in this list are: "DATABASE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The target_class of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._target_class + + @target_class.setter + def target_class(self, target_class): + """ + Sets the target_class of this AuditEventAggregationDimensions. + Class of the target that was audited. + + + :param target_class: The target_class of this AuditEventAggregationDimensions. + :type: list[str] + """ + allowed_values = ["DATABASE"] + if target_class: + target_class[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in target_class] + self._target_class = target_class + + @property + def object_type(self): + """ + Gets the object_type of this AuditEventAggregationDimensions. + Type of object in the source database affected by the action. i.e PL/SQL, SYNONYM, PACKAGE BODY. + + + :return: The object_type of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this AuditEventAggregationDimensions. + Type of object in the source database affected by the action. i.e PL/SQL, SYNONYM, PACKAGE BODY. + + + :param object_type: The object_type of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._object_type = object_type + + @property + def client_hostname(self): + """ + Gets the client_hostname of this AuditEventAggregationDimensions. + Name of the host machine from which the session was spawned. + + + :return: The client_hostname of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._client_hostname + + @client_hostname.setter + def client_hostname(self, client_hostname): + """ + Sets the client_hostname of this AuditEventAggregationDimensions. + Name of the host machine from which the session was spawned. + + + :param client_hostname: The client_hostname of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._client_hostname = client_hostname + + @property + def client_program(self): + """ + Gets the client_program of this AuditEventAggregationDimensions. + The application from which the audit event was generated. Examples SQL Plus or SQL Developer. + + + :return: The client_program of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._client_program + + @client_program.setter + def client_program(self, client_program): + """ + Sets the client_program of this AuditEventAggregationDimensions. + The application from which the audit event was generated. Examples SQL Plus or SQL Developer. + + + :param client_program: The client_program of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._client_program = client_program + + @property + def client_id(self): + """ + Gets the client_id of this AuditEventAggregationDimensions. + The client identifier in each Oracle session. + + + :return: The client_id of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """ + Sets the client_id of this AuditEventAggregationDimensions. + The client identifier in each Oracle session. + + + :param client_id: The client_id of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._client_id = client_id + + @property + def audit_type(self): + """ + Gets the audit_type of this AuditEventAggregationDimensions. + Type of auditing. + + Allowed values for items in this list are: "STANDARD", "FINE_GRAINED", "XS", "DATABASE_VAULT", "LABEL_SECURITY", "RMAN", "DATAPUMP", "DIRECT_PATH_API", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The audit_type of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._audit_type + + @audit_type.setter + def audit_type(self, audit_type): + """ + Sets the audit_type of this AuditEventAggregationDimensions. + Type of auditing. + + + :param audit_type: The audit_type of this AuditEventAggregationDimensions. + :type: list[str] + """ + allowed_values = ["STANDARD", "FINE_GRAINED", "XS", "DATABASE_VAULT", "LABEL_SECURITY", "RMAN", "DATAPUMP", "DIRECT_PATH_API"] + if audit_type: + audit_type[:] = ['UNKNOWN_ENUM_VALUE' if not value_allowed_none_or_none_sentinel(x, allowed_values) else x for x in audit_type] + self._audit_type = audit_type + + @property + def event_name(self): + """ + Gets the event_name of this AuditEventAggregationDimensions. + Name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. + + + :return: The event_name of this AuditEventAggregationDimensions. + :rtype: list[str] + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """ + Sets the event_name of this AuditEventAggregationDimensions. + Name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. + + + :param event_name: The event_name of this AuditEventAggregationDimensions. + :type: list[str] + """ + self._event_name = event_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/data_safe/models/audit_event_aggregation_items.py b/src/oci/data_safe/models/audit_event_aggregation_items.py new file mode 100644 index 0000000000..1a83711de5 --- /dev/null +++ b/src/oci/data_safe/models/audit_event_aggregation_items.py @@ -0,0 +1,221 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditEventAggregationItems(object): + """ + Details of audit events aggregation items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditEventAggregationItems 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 AuditEventAggregationItems. + :type display_name: str + + :param metric_name: + The value to assign to the metric_name property of this AuditEventAggregationItems. + :type metric_name: str + + :param time_started: + The value to assign to the time_started property of this AuditEventAggregationItems. + :type time_started: datetime + + :param time_ended: + The value to assign to the time_ended property of this AuditEventAggregationItems. + :type time_ended: datetime + + :param count: + The value to assign to the count property of this AuditEventAggregationItems. + :type count: int + + :param dimensions: + The value to assign to the dimensions property of this AuditEventAggregationItems. + :type dimensions: oci.data_safe.models.AuditEventAggregationDimensions + + """ + self.swagger_types = { + 'display_name': 'str', + 'metric_name': 'str', + 'time_started': 'datetime', + 'time_ended': 'datetime', + 'count': 'int', + 'dimensions': 'AuditEventAggregationDimensions' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'metric_name': 'metricName', + 'time_started': 'timeStarted', + 'time_ended': 'timeEnded', + 'count': 'count', + 'dimensions': 'dimensions' + } + + self._display_name = None + self._metric_name = None + self._time_started = None + self._time_ended = None + self._count = None + self._dimensions = None + + @property + def display_name(self): + """ + Gets the display_name of this AuditEventAggregationItems. + Display Name of aggregation field. + + + :return: The display_name of this AuditEventAggregationItems. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditEventAggregationItems. + Display Name of aggregation field. + + + :param display_name: The display_name of this AuditEventAggregationItems. + :type: str + """ + self._display_name = display_name + + @property + def metric_name(self): + """ + **[Required]** Gets the metric_name of this AuditEventAggregationItems. + Name of the aggregation. + + + :return: The metric_name of this AuditEventAggregationItems. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this AuditEventAggregationItems. + Name of the aggregation. + + + :param metric_name: The metric_name of this AuditEventAggregationItems. + :type: str + """ + self._metric_name = metric_name + + @property + def time_started(self): + """ + **[Required]** Gets the time_started of this AuditEventAggregationItems. + The time at which the aggregation started. + + + :return: The time_started of this AuditEventAggregationItems. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this AuditEventAggregationItems. + The time at which the aggregation started. + + + :param time_started: The time_started of this AuditEventAggregationItems. + :type: datetime + """ + self._time_started = time_started + + @property + def time_ended(self): + """ + **[Required]** Gets the time_ended of this AuditEventAggregationItems. + The time at which the aggregation ended. + + + :return: The time_ended of this AuditEventAggregationItems. + :rtype: datetime + """ + return self._time_ended + + @time_ended.setter + def time_ended(self, time_ended): + """ + Sets the time_ended of this AuditEventAggregationItems. + The time at which the aggregation ended. + + + :param time_ended: The time_ended of this AuditEventAggregationItems. + :type: datetime + """ + self._time_ended = time_ended + + @property + def count(self): + """ + **[Required]** Gets the count of this AuditEventAggregationItems. + Total count of aggregated value. + + + :return: The count of this AuditEventAggregationItems. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this AuditEventAggregationItems. + Total count of aggregated value. + + + :param count: The count of this AuditEventAggregationItems. + :type: int + """ + self._count = count + + @property + def dimensions(self): + """ + Gets the dimensions of this AuditEventAggregationItems. + + :return: The dimensions of this AuditEventAggregationItems. + :rtype: oci.data_safe.models.AuditEventAggregationDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AuditEventAggregationItems. + + :param dimensions: The dimensions of this AuditEventAggregationItems. + :type: oci.data_safe.models.AuditEventAggregationDimensions + """ + self._dimensions = dimensions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_event_analytics_collection.py b/src/oci/data_safe/models/audit_event_analytics_collection.py new file mode 100644 index 0000000000..ab659c5f2c --- /dev/null +++ b/src/oci/data_safe/models/audit_event_analytics_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditEventAnalyticsCollection(object): + """ + Audit events summarized detail. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditEventAnalyticsCollection 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 AuditEventAnalyticsCollection. + :type items: list[oci.data_safe.models.AuditEventAggregationItems] + + """ + self.swagger_types = { + 'items': 'list[AuditEventAggregationItems]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditEventAnalyticsCollection. + The aggregated data point items. + + + :return: The items of this AuditEventAnalyticsCollection. + :rtype: list[oci.data_safe.models.AuditEventAggregationItems] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditEventAnalyticsCollection. + The aggregated data point items. + + + :param items: The items of this AuditEventAnalyticsCollection. + :type: list[oci.data_safe.models.AuditEventAggregationItems] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_event_collection.py b/src/oci/data_safe/models/audit_event_collection.py new file mode 100644 index 0000000000..e22198d378 --- /dev/null +++ b/src/oci/data_safe/models/audit_event_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditEventCollection(object): + """ + Collection of audit event summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditEventCollection 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 AuditEventCollection. + :type items: list[oci.data_safe.models.AuditEventSummary] + + """ + self.swagger_types = { + 'items': 'list[AuditEventSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditEventCollection. + Array of audit event summary. + + + :return: The items of this AuditEventCollection. + :rtype: list[oci.data_safe.models.AuditEventSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditEventCollection. + Array of audit event summary. + + + :param items: The items of this AuditEventCollection. + :type: list[oci.data_safe.models.AuditEventSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_event_summary.py b/src/oci/data_safe/models/audit_event_summary.py new file mode 100644 index 0000000000..d14c166cc3 --- /dev/null +++ b/src/oci/data_safe/models/audit_event_summary.py @@ -0,0 +1,1215 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditEventSummary(object): + """ + The resource represents the audit events collected from the target database by Oracle Data Safe. + """ + + #: A constant which can be used with the database_type property of a AuditEventSummary. + #: This constant has a value of "DATABASE_CLOUD_SERVICE" + DATABASE_TYPE_DATABASE_CLOUD_SERVICE = "DATABASE_CLOUD_SERVICE" + + #: A constant which can be used with the database_type property of a AuditEventSummary. + #: This constant has a value of "AUTONOMOUS_DATABASE" + DATABASE_TYPE_AUTONOMOUS_DATABASE = "AUTONOMOUS_DATABASE" + + #: A constant which can be used with the database_type property of a AuditEventSummary. + #: This constant has a value of "INSTALLED_DATABASE" + DATABASE_TYPE_INSTALLED_DATABASE = "INSTALLED_DATABASE" + + #: A constant which can be used with the target_class property of a AuditEventSummary. + #: This constant has a value of "DATABASE" + TARGET_CLASS_DATABASE = "DATABASE" + + #: A constant which can be used with the operation_status property of a AuditEventSummary. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a AuditEventSummary. + #: This constant has a value of "FAILURE" + OPERATION_STATUS_FAILURE = "FAILURE" + + #: A constant which can be used with the audit_location property of a AuditEventSummary. + #: This constant has a value of "AUDIT_TABLE" + AUDIT_LOCATION_AUDIT_TABLE = "AUDIT_TABLE" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "STANDARD" + AUDIT_TYPE_STANDARD = "STANDARD" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "FINE_GRAINED" + AUDIT_TYPE_FINE_GRAINED = "FINE_GRAINED" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "XS" + AUDIT_TYPE_XS = "XS" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "DATABASE_VAULT" + AUDIT_TYPE_DATABASE_VAULT = "DATABASE_VAULT" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "LABEL_SECURITY" + AUDIT_TYPE_LABEL_SECURITY = "LABEL_SECURITY" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "RMAN" + AUDIT_TYPE_RMAN = "RMAN" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "DATAPUMP" + AUDIT_TYPE_DATAPUMP = "DATAPUMP" + + #: A constant which can be used with the audit_type property of a AuditEventSummary. + #: This constant has a value of "DIRECT_PATH_API" + AUDIT_TYPE_DIRECT_PATH_API = "DIRECT_PATH_API" + + def __init__(self, **kwargs): + """ + Initializes a new AuditEventSummary 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 AuditEventSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditEventSummary. + :type compartment_id: str + + :param db_user_name: + The value to assign to the db_user_name property of this AuditEventSummary. + :type db_user_name: str + + :param target_id: + The value to assign to the target_id property of this AuditEventSummary. + :type target_id: str + + :param target_name: + The value to assign to the target_name property of this AuditEventSummary. + :type target_name: str + + :param database_type: + The value to assign to the database_type property of this AuditEventSummary. + Allowed values for this property are: "DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type database_type: str + + :param target_class: + The value to assign to the target_class property of this AuditEventSummary. + Allowed values for this property are: "DATABASE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type target_class: str + + :param audit_event_time: + The value to assign to the audit_event_time property of this AuditEventSummary. + :type audit_event_time: datetime + + :param time_collected: + The value to assign to the time_collected property of this AuditEventSummary. + :type time_collected: datetime + + :param os_user_name: + The value to assign to the os_user_name property of this AuditEventSummary. + :type os_user_name: str + + :param operation: + The value to assign to the operation property of this AuditEventSummary. + :type operation: str + + :param operation_status: + The value to assign to the operation_status property of this AuditEventSummary. + Allowed values for this property are: "SUCCESS", "FAILURE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param event_name: + The value to assign to the event_name property of this AuditEventSummary. + :type event_name: str + + :param error_code: + The value to assign to the error_code property of this AuditEventSummary. + :type error_code: str + + :param error_message: + The value to assign to the error_message property of this AuditEventSummary. + :type error_message: str + + :param object_type: + The value to assign to the object_type property of this AuditEventSummary. + :type object_type: str + + :param object_name: + The value to assign to the object_name property of this AuditEventSummary. + :type object_name: str + + :param object_owner: + The value to assign to the object_owner property of this AuditEventSummary. + :type object_owner: str + + :param client_hostname: + The value to assign to the client_hostname property of this AuditEventSummary. + :type client_hostname: str + + :param client_ip: + The value to assign to the client_ip property of this AuditEventSummary. + :type client_ip: str + + :param audit_trail_id: + The value to assign to the audit_trail_id property of this AuditEventSummary. + :type audit_trail_id: str + + :param is_alerted: + The value to assign to the is_alerted property of this AuditEventSummary. + :type is_alerted: bool + + :param action_taken: + The value to assign to the action_taken property of this AuditEventSummary. + :type action_taken: str + + :param client_program: + The value to assign to the client_program property of this AuditEventSummary. + :type client_program: str + + :param command_text: + The value to assign to the command_text property of this AuditEventSummary. + :type command_text: str + + :param command_param: + The value to assign to the command_param property of this AuditEventSummary. + :type command_param: str + + :param extended_event_attributes: + The value to assign to the extended_event_attributes property of this AuditEventSummary. + :type extended_event_attributes: str + + :param audit_location: + The value to assign to the audit_location property of this AuditEventSummary. + Allowed values for this property are: "AUDIT_TABLE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type audit_location: str + + :param os_terminal: + The value to assign to the os_terminal property of this AuditEventSummary. + :type os_terminal: str + + :param client_id: + The value to assign to the client_id property of this AuditEventSummary. + :type client_id: str + + :param audit_policies: + The value to assign to the audit_policies property of this AuditEventSummary. + :type audit_policies: str + + :param audit_type: + The value to assign to the audit_type property of this AuditEventSummary. + Allowed values for this property are: "STANDARD", "FINE_GRAINED", "XS", "DATABASE_VAULT", "LABEL_SECURITY", "RMAN", "DATAPUMP", "DIRECT_PATH_API", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type audit_type: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditEventSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditEventSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'db_user_name': 'str', + 'target_id': 'str', + 'target_name': 'str', + 'database_type': 'str', + 'target_class': 'str', + 'audit_event_time': 'datetime', + 'time_collected': 'datetime', + 'os_user_name': 'str', + 'operation': 'str', + 'operation_status': 'str', + 'event_name': 'str', + 'error_code': 'str', + 'error_message': 'str', + 'object_type': 'str', + 'object_name': 'str', + 'object_owner': 'str', + 'client_hostname': 'str', + 'client_ip': 'str', + 'audit_trail_id': 'str', + 'is_alerted': 'bool', + 'action_taken': 'str', + 'client_program': 'str', + 'command_text': 'str', + 'command_param': 'str', + 'extended_event_attributes': 'str', + 'audit_location': 'str', + 'os_terminal': 'str', + 'client_id': 'str', + 'audit_policies': 'str', + 'audit_type': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'db_user_name': 'dbUserName', + 'target_id': 'targetId', + 'target_name': 'targetName', + 'database_type': 'databaseType', + 'target_class': 'targetClass', + 'audit_event_time': 'auditEventTime', + 'time_collected': 'timeCollected', + 'os_user_name': 'osUserName', + 'operation': 'operation', + 'operation_status': 'operationStatus', + 'event_name': 'eventName', + 'error_code': 'errorCode', + 'error_message': 'errorMessage', + 'object_type': 'objectType', + 'object_name': 'objectName', + 'object_owner': 'objectOwner', + 'client_hostname': 'clientHostname', + 'client_ip': 'clientIp', + 'audit_trail_id': 'auditTrailId', + 'is_alerted': 'isAlerted', + 'action_taken': 'actionTaken', + 'client_program': 'clientProgram', + 'command_text': 'commandText', + 'command_param': 'commandParam', + 'extended_event_attributes': 'extendedEventAttributes', + 'audit_location': 'auditLocation', + 'os_terminal': 'osTerminal', + 'client_id': 'clientId', + 'audit_policies': 'auditPolicies', + 'audit_type': 'auditType', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._db_user_name = None + self._target_id = None + self._target_name = None + self._database_type = None + self._target_class = None + self._audit_event_time = None + self._time_collected = None + self._os_user_name = None + self._operation = None + self._operation_status = None + self._event_name = None + self._error_code = None + self._error_message = None + self._object_type = None + self._object_name = None + self._object_owner = None + self._client_hostname = None + self._client_ip = None + self._audit_trail_id = None + self._is_alerted = None + self._action_taken = None + self._client_program = None + self._command_text = None + self._command_param = None + self._extended_event_attributes = None + self._audit_location = None + self._os_terminal = None + self._client_id = None + self._audit_policies = None + self._audit_type = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditEventSummary. + The OCID of the audit event. + + + :return: The id of this AuditEventSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditEventSummary. + The OCID of the audit event. + + + :param id: The id of this AuditEventSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditEventSummary. + The OCID of the compartment containing the audit event. This is the same audited target database resource comparment. + + + :return: The compartment_id of this AuditEventSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditEventSummary. + The OCID of the compartment containing the audit event. This is the same audited target database resource comparment. + + + :param compartment_id: The compartment_id of this AuditEventSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def db_user_name(self): + """ + Gets the db_user_name of this AuditEventSummary. + Name of the database user whose actions were audited. + + + :return: The db_user_name of this AuditEventSummary. + :rtype: str + """ + return self._db_user_name + + @db_user_name.setter + def db_user_name(self, db_user_name): + """ + Sets the db_user_name of this AuditEventSummary. + Name of the database user whose actions were audited. + + + :param db_user_name: The db_user_name of this AuditEventSummary. + :type: str + """ + self._db_user_name = db_user_name + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditEventSummary. + The OCID of the target database that was audited. + + + :return: The target_id of this AuditEventSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditEventSummary. + The OCID of the target database that was audited. + + + :param target_id: The target_id of this AuditEventSummary. + :type: str + """ + self._target_id = target_id + + @property + def target_name(self): + """ + **[Required]** Gets the target_name of this AuditEventSummary. + The name of the target database that was audited. + + + :return: The target_name of this AuditEventSummary. + :rtype: str + """ + return self._target_name + + @target_name.setter + def target_name(self, target_name): + """ + Sets the target_name of this AuditEventSummary. + The name of the target database that was audited. + + + :param target_name: The target_name of this AuditEventSummary. + :type: str + """ + self._target_name = target_name + + @property + def database_type(self): + """ + **[Required]** Gets the database_type of this AuditEventSummary. + The type of the target database that was audited. Allowed values are + - DATABASE_CLOUD_SERVICE - Represents Oracle Database Cloud Services. + - AUTONOMOUS_DATABASE - Represents Oracle Autonomous Databases. + - INSTALLED_DATABASE - Represents databases running on-premises or on compute instances. + + Allowed values for this property are: "DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The database_type of this AuditEventSummary. + :rtype: str + """ + return self._database_type + + @database_type.setter + def database_type(self, database_type): + """ + Sets the database_type of this AuditEventSummary. + The type of the target database that was audited. Allowed values are + - DATABASE_CLOUD_SERVICE - Represents Oracle Database Cloud Services. + - AUTONOMOUS_DATABASE - Represents Oracle Autonomous Databases. + - INSTALLED_DATABASE - Represents databases running on-premises or on compute instances. + + + :param database_type: The database_type of this AuditEventSummary. + :type: str + """ + allowed_values = ["DATABASE_CLOUD_SERVICE", "AUTONOMOUS_DATABASE", "INSTALLED_DATABASE"] + if not value_allowed_none_or_none_sentinel(database_type, allowed_values): + database_type = 'UNKNOWN_ENUM_VALUE' + self._database_type = database_type + + @property + def target_class(self): + """ + Gets the target_class of this AuditEventSummary. + Class of the target that was audited. + + Allowed values for this property are: "DATABASE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The target_class of this AuditEventSummary. + :rtype: str + """ + return self._target_class + + @target_class.setter + def target_class(self, target_class): + """ + Sets the target_class of this AuditEventSummary. + Class of the target that was audited. + + + :param target_class: The target_class of this AuditEventSummary. + :type: str + """ + allowed_values = ["DATABASE"] + if not value_allowed_none_or_none_sentinel(target_class, allowed_values): + target_class = 'UNKNOWN_ENUM_VALUE' + self._target_class = target_class + + @property + def audit_event_time(self): + """ + **[Required]** Gets the audit_event_time of this AuditEventSummary. + Time of audit event occurrence in the target database. + + + :return: The audit_event_time of this AuditEventSummary. + :rtype: datetime + """ + return self._audit_event_time + + @audit_event_time.setter + def audit_event_time(self, audit_event_time): + """ + Sets the audit_event_time of this AuditEventSummary. + Time of audit event occurrence in the target database. + + + :param audit_event_time: The audit_event_time of this AuditEventSummary. + :type: datetime + """ + self._audit_event_time = audit_event_time + + @property + def time_collected(self): + """ + **[Required]** Gets the time_collected of this AuditEventSummary. + Timestamp when this audit event was collected from the target database by Data Safe. + + + :return: The time_collected of this AuditEventSummary. + :rtype: datetime + """ + return self._time_collected + + @time_collected.setter + def time_collected(self, time_collected): + """ + Sets the time_collected of this AuditEventSummary. + Timestamp when this audit event was collected from the target database by Data Safe. + + + :param time_collected: The time_collected of this AuditEventSummary. + :type: datetime + """ + self._time_collected = time_collected + + @property + def os_user_name(self): + """ + Gets the os_user_name of this AuditEventSummary. + Name of the operating system user for the database session. + + + :return: The os_user_name of this AuditEventSummary. + :rtype: str + """ + return self._os_user_name + + @os_user_name.setter + def os_user_name(self, os_user_name): + """ + Sets the os_user_name of this AuditEventSummary. + Name of the operating system user for the database session. + + + :param os_user_name: The os_user_name of this AuditEventSummary. + :type: str + """ + self._os_user_name = os_user_name + + @property + def operation(self): + """ + Gets the operation of this AuditEventSummary. + Name of the action executed by the user on the target database. i.e ALTER, CREATE, DROP. + + + :return: The operation of this AuditEventSummary. + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """ + Sets the operation of this AuditEventSummary. + Name of the action executed by the user on the target database. i.e ALTER, CREATE, DROP. + + + :param operation: The operation of this AuditEventSummary. + :type: str + """ + self._operation = operation + + @property + def operation_status(self): + """ + Gets the operation_status of this AuditEventSummary. + Indicates whether the operation was a success or a failure. + + Allowed values for this property are: "SUCCESS", "FAILURE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this AuditEventSummary. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this AuditEventSummary. + Indicates whether the operation was a success or a failure. + + + :param operation_status: The operation_status of this AuditEventSummary. + :type: str + """ + allowed_values = ["SUCCESS", "FAILURE"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def event_name(self): + """ + Gets the event_name of this AuditEventSummary. + Name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. + + + :return: The event_name of this AuditEventSummary. + :rtype: str + """ + return self._event_name + + @event_name.setter + def event_name(self, event_name): + """ + Sets the event_name of this AuditEventSummary. + Name of the detail action executed by the user on the target database. i.e ALTER SEQUENCE, CREATE TRIGGER, CREATE INDEX. + + + :param event_name: The event_name of this AuditEventSummary. + :type: str + """ + self._event_name = event_name + + @property + def error_code(self): + """ + Gets the error_code of this AuditEventSummary. + Oracle Error code generated by the action. Zero indicates the action was successful. + + + :return: The error_code of this AuditEventSummary. + :rtype: str + """ + return self._error_code + + @error_code.setter + def error_code(self, error_code): + """ + Sets the error_code of this AuditEventSummary. + Oracle Error code generated by the action. Zero indicates the action was successful. + + + :param error_code: The error_code of this AuditEventSummary. + :type: str + """ + self._error_code = error_code + + @property + def error_message(self): + """ + Gets the error_message of this AuditEventSummary. + Detailed message on why the Error occurred. + + + :return: The error_message of this AuditEventSummary. + :rtype: str + """ + return self._error_message + + @error_message.setter + def error_message(self, error_message): + """ + Sets the error_message of this AuditEventSummary. + Detailed message on why the Error occurred. + + + :param error_message: The error_message of this AuditEventSummary. + :type: str + """ + self._error_message = error_message + + @property + def object_type(self): + """ + Gets the object_type of this AuditEventSummary. + Type of object in the source database affected by the action. i.e PL/SQL, SYNONYM, PACKAGE BODY. + + + :return: The object_type of this AuditEventSummary. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this AuditEventSummary. + Type of object in the source database affected by the action. i.e PL/SQL, SYNONYM, PACKAGE BODY. + + + :param object_type: The object_type of this AuditEventSummary. + :type: str + """ + self._object_type = object_type + + @property + def object_name(self): + """ + Gets the object_name of this AuditEventSummary. + Name of the object affected by the action. + + + :return: The object_name of this AuditEventSummary. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this AuditEventSummary. + Name of the object affected by the action. + + + :param object_name: The object_name of this AuditEventSummary. + :type: str + """ + self._object_name = object_name + + @property + def object_owner(self): + """ + Gets the object_owner of this AuditEventSummary. + Schema name of object affected but the action. + + + :return: The object_owner of this AuditEventSummary. + :rtype: str + """ + return self._object_owner + + @object_owner.setter + def object_owner(self, object_owner): + """ + Sets the object_owner of this AuditEventSummary. + Schema name of object affected but the action. + + + :param object_owner: The object_owner of this AuditEventSummary. + :type: str + """ + self._object_owner = object_owner + + @property + def client_hostname(self): + """ + Gets the client_hostname of this AuditEventSummary. + Name of the host machine from which the session was spawned. + + + :return: The client_hostname of this AuditEventSummary. + :rtype: str + """ + return self._client_hostname + + @client_hostname.setter + def client_hostname(self, client_hostname): + """ + Sets the client_hostname of this AuditEventSummary. + Name of the host machine from which the session was spawned. + + + :param client_hostname: The client_hostname of this AuditEventSummary. + :type: str + """ + self._client_hostname = client_hostname + + @property + def client_ip(self): + """ + Gets the client_ip of this AuditEventSummary. + IP address of the host from which the session was spawned. + + + :return: The client_ip of this AuditEventSummary. + :rtype: str + """ + return self._client_ip + + @client_ip.setter + def client_ip(self, client_ip): + """ + Sets the client_ip of this AuditEventSummary. + IP address of the host from which the session was spawned. + + + :param client_ip: The client_ip of this AuditEventSummary. + :type: str + """ + self._client_ip = client_ip + + @property + def audit_trail_id(self): + """ + Gets the audit_trail_id of this AuditEventSummary. + The OCID of the audit trail that generated this audit event. + + + :return: The audit_trail_id of this AuditEventSummary. + :rtype: str + """ + return self._audit_trail_id + + @audit_trail_id.setter + def audit_trail_id(self, audit_trail_id): + """ + Sets the audit_trail_id of this AuditEventSummary. + The OCID of the audit trail that generated this audit event. + + + :param audit_trail_id: The audit_trail_id of this AuditEventSummary. + :type: str + """ + self._audit_trail_id = audit_trail_id + + @property + def is_alerted(self): + """ + **[Required]** Gets the is_alerted of this AuditEventSummary. + Indicates whether an alert was raised for this audit event. + + + :return: The is_alerted of this AuditEventSummary. + :rtype: bool + """ + return self._is_alerted + + @is_alerted.setter + def is_alerted(self, is_alerted): + """ + Sets the is_alerted of this AuditEventSummary. + Indicates whether an alert was raised for this audit event. + + + :param is_alerted: The is_alerted of this AuditEventSummary. + :type: bool + """ + self._is_alerted = is_alerted + + @property + def action_taken(self): + """ + Gets the action_taken of this AuditEventSummary. + The action taken for this audit event. + + + :return: The action_taken of this AuditEventSummary. + :rtype: str + """ + return self._action_taken + + @action_taken.setter + def action_taken(self, action_taken): + """ + Sets the action_taken of this AuditEventSummary. + The action taken for this audit event. + + + :param action_taken: The action_taken of this AuditEventSummary. + :type: str + """ + self._action_taken = action_taken + + @property + def client_program(self): + """ + Gets the client_program of this AuditEventSummary. + The application from which the audit event was generated. Examples SQL Plus or SQL Developer. + + + :return: The client_program of this AuditEventSummary. + :rtype: str + """ + return self._client_program + + @client_program.setter + def client_program(self, client_program): + """ + Sets the client_program of this AuditEventSummary. + The application from which the audit event was generated. Examples SQL Plus or SQL Developer. + + + :param client_program: The client_program of this AuditEventSummary. + :type: str + """ + self._client_program = client_program + + @property + def command_text(self): + """ + Gets the command_text of this AuditEventSummary. + The SQL associated with the audit event. + + + :return: The command_text of this AuditEventSummary. + :rtype: str + """ + return self._command_text + + @command_text.setter + def command_text(self, command_text): + """ + Sets the command_text of this AuditEventSummary. + The SQL associated with the audit event. + + + :param command_text: The command_text of this AuditEventSummary. + :type: str + """ + self._command_text = command_text + + @property + def command_param(self): + """ + Gets the command_param of this AuditEventSummary. + List of bind variables associated with the command text. + + + :return: The command_param of this AuditEventSummary. + :rtype: str + """ + return self._command_param + + @command_param.setter + def command_param(self, command_param): + """ + Sets the command_param of this AuditEventSummary. + List of bind variables associated with the command text. + + + :param command_param: The command_param of this AuditEventSummary. + :type: str + """ + self._command_param = command_param + + @property + def extended_event_attributes(self): + """ + Gets the extended_event_attributes of this AuditEventSummary. + List of all other attributes of the audit event seperated by a colon other than the one returned in audit record. + + + :return: The extended_event_attributes of this AuditEventSummary. + :rtype: str + """ + return self._extended_event_attributes + + @extended_event_attributes.setter + def extended_event_attributes(self, extended_event_attributes): + """ + Sets the extended_event_attributes of this AuditEventSummary. + List of all other attributes of the audit event seperated by a colon other than the one returned in audit record. + + + :param extended_event_attributes: The extended_event_attributes of this AuditEventSummary. + :type: str + """ + self._extended_event_attributes = extended_event_attributes + + @property + def audit_location(self): + """ + Gets the audit_location of this AuditEventSummary. + The location of the audit. Currently the value is audit table. + + Allowed values for this property are: "AUDIT_TABLE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The audit_location of this AuditEventSummary. + :rtype: str + """ + return self._audit_location + + @audit_location.setter + def audit_location(self, audit_location): + """ + Sets the audit_location of this AuditEventSummary. + The location of the audit. Currently the value is audit table. + + + :param audit_location: The audit_location of this AuditEventSummary. + :type: str + """ + allowed_values = ["AUDIT_TABLE"] + if not value_allowed_none_or_none_sentinel(audit_location, allowed_values): + audit_location = 'UNKNOWN_ENUM_VALUE' + self._audit_location = audit_location + + @property + def os_terminal(self): + """ + Gets the os_terminal of this AuditEventSummary. + The operating system terminal of the user session. + + + :return: The os_terminal of this AuditEventSummary. + :rtype: str + """ + return self._os_terminal + + @os_terminal.setter + def os_terminal(self, os_terminal): + """ + Sets the os_terminal of this AuditEventSummary. + The operating system terminal of the user session. + + + :param os_terminal: The os_terminal of this AuditEventSummary. + :type: str + """ + self._os_terminal = os_terminal + + @property + def client_id(self): + """ + Gets the client_id of this AuditEventSummary. + The client identifier in each Oracle session. + + + :return: The client_id of this AuditEventSummary. + :rtype: str + """ + return self._client_id + + @client_id.setter + def client_id(self, client_id): + """ + Sets the client_id of this AuditEventSummary. + The client identifier in each Oracle session. + + + :param client_id: The client_id of this AuditEventSummary. + :type: str + """ + self._client_id = client_id + + @property + def audit_policies(self): + """ + Gets the audit_policies of this AuditEventSummary. + Comma-seperated list of audit policies that caused the current audit event. + + + :return: The audit_policies of this AuditEventSummary. + :rtype: str + """ + return self._audit_policies + + @audit_policies.setter + def audit_policies(self, audit_policies): + """ + Sets the audit_policies of this AuditEventSummary. + Comma-seperated list of audit policies that caused the current audit event. + + + :param audit_policies: The audit_policies of this AuditEventSummary. + :type: str + """ + self._audit_policies = audit_policies + + @property + def audit_type(self): + """ + Gets the audit_type of this AuditEventSummary. + Type of auditing. + + Allowed values for this property are: "STANDARD", "FINE_GRAINED", "XS", "DATABASE_VAULT", "LABEL_SECURITY", "RMAN", "DATAPUMP", "DIRECT_PATH_API", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The audit_type of this AuditEventSummary. + :rtype: str + """ + return self._audit_type + + @audit_type.setter + def audit_type(self, audit_type): + """ + Sets the audit_type of this AuditEventSummary. + Type of auditing. + + + :param audit_type: The audit_type of this AuditEventSummary. + :type: str + """ + allowed_values = ["STANDARD", "FINE_GRAINED", "XS", "DATABASE_VAULT", "LABEL_SECURITY", "RMAN", "DATAPUMP", "DIRECT_PATH_API"] + if not value_allowed_none_or_none_sentinel(audit_type, allowed_values): + audit_type = 'UNKNOWN_ENUM_VALUE' + self._audit_type = audit_type + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditEventSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditEventSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditEventSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditEventSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditEventSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditEventSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditEventSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditEventSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_policy.py b/src/oci/data_safe/models/audit_policy.py new file mode 100644 index 0000000000..d6eb810015 --- /dev/null +++ b/src/oci/data_safe/models/audit_policy.py @@ -0,0 +1,631 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditPolicy(object): + """ + The resource represents all available audit policies relevant for the target database with their corresponding audit conditions. + The audit policies could be in any one of the following 3 states in the target database + 1) Created and enabled + 2) Created but not enabled + 3) Not created + For more details on available audit policies, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + """ + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicy. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditPolicy 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 AuditPolicy. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditPolicy. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this AuditPolicy. + :type display_name: str + + :param description: + The value to assign to the description property of this AuditPolicy. + :type description: str + + :param time_created: + The value to assign to the time_created property of this AuditPolicy. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AuditPolicy. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditPolicy. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "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 AuditPolicy. + :type lifecycle_details: str + + :param target_id: + The value to assign to the target_id property of this AuditPolicy. + :type target_id: str + + :param is_data_safe_service_account_excluded: + The value to assign to the is_data_safe_service_account_excluded property of this AuditPolicy. + :type is_data_safe_service_account_excluded: bool + + :param time_last_provisioned: + The value to assign to the time_last_provisioned property of this AuditPolicy. + :type time_last_provisioned: datetime + + :param time_last_retrieved: + The value to assign to the time_last_retrieved property of this AuditPolicy. + :type time_last_retrieved: datetime + + :param audit_specifications: + The value to assign to the audit_specifications property of this AuditPolicy. + :type audit_specifications: list[oci.data_safe.models.AuditSpecification] + + :param audit_conditions: + The value to assign to the audit_conditions property of this AuditPolicy. + :type audit_conditions: list[oci.data_safe.models.AuditConditions] + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditPolicy. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditPolicy. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AuditPolicy. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'target_id': 'str', + 'is_data_safe_service_account_excluded': 'bool', + 'time_last_provisioned': 'datetime', + 'time_last_retrieved': 'datetime', + 'audit_specifications': 'list[AuditSpecification]', + 'audit_conditions': 'list[AuditConditions]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'description': 'description', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'target_id': 'targetId', + 'is_data_safe_service_account_excluded': 'isDataSafeServiceAccountExcluded', + 'time_last_provisioned': 'timeLastProvisioned', + 'time_last_retrieved': 'timeLastRetrieved', + 'audit_specifications': 'auditSpecifications', + 'audit_conditions': 'auditConditions', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._description = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._target_id = None + self._is_data_safe_service_account_excluded = None + self._time_last_provisioned = None + self._time_last_retrieved = None + self._audit_specifications = None + self._audit_conditions = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditPolicy. + The OCID of the audit policy. + + + :return: The id of this AuditPolicy. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditPolicy. + The OCID of the audit policy. + + + :param id: The id of this AuditPolicy. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditPolicy. + The OCID of the compartment containing the audit policy. + + + :return: The compartment_id of this AuditPolicy. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditPolicy. + The OCID of the compartment containing the audit policy. + + + :param compartment_id: The compartment_id of this AuditPolicy. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditPolicy. + The display name of the audit policy. + + + :return: The display_name of this AuditPolicy. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditPolicy. + The display name of the audit policy. + + + :param display_name: The display_name of this AuditPolicy. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AuditPolicy. + Description of the audit policy. + + + :return: The description of this AuditPolicy. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditPolicy. + Description of the audit policy. + + + :param description: The description of this AuditPolicy. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AuditPolicy. + The time the the audit policy was created, in the format defined by RFC3339. + + + :return: The time_created of this AuditPolicy. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AuditPolicy. + The time the the audit policy was created, in the format defined by RFC3339. + + + :param time_created: The time_created of this AuditPolicy. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this AuditPolicy. + The last date and time the audit policy was updated, in the format defined by RFC3339. + + + :return: The time_updated of this AuditPolicy. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AuditPolicy. + The last date and time the audit policy was updated, in the format defined by RFC3339. + + + :param time_updated: The time_updated of this AuditPolicy. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditPolicy. + The current state of the audit policy. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "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 AuditPolicy. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditPolicy. + The current state of the audit policy. + + + :param lifecycle_state: The lifecycle_state of this AuditPolicy. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "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 AuditPolicy. + Details about the current state of the audit policy in Data Safe. + + + :return: The lifecycle_details of this AuditPolicy. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditPolicy. + Details about the current state of the audit policy in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this AuditPolicy. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditPolicy. + The OCID of the target for which the audit policy is created. + + + :return: The target_id of this AuditPolicy. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditPolicy. + The OCID of the target for which the audit policy is created. + + + :param target_id: The target_id of this AuditPolicy. + :type: str + """ + self._target_id = target_id + + @property + def is_data_safe_service_account_excluded(self): + """ + **[Required]** Gets the is_data_safe_service_account_excluded of this AuditPolicy. + Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies. + + + :return: The is_data_safe_service_account_excluded of this AuditPolicy. + :rtype: bool + """ + return self._is_data_safe_service_account_excluded + + @is_data_safe_service_account_excluded.setter + def is_data_safe_service_account_excluded(self, is_data_safe_service_account_excluded): + """ + Sets the is_data_safe_service_account_excluded of this AuditPolicy. + Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies. + + + :param is_data_safe_service_account_excluded: The is_data_safe_service_account_excluded of this AuditPolicy. + :type: bool + """ + self._is_data_safe_service_account_excluded = is_data_safe_service_account_excluded + + @property + def time_last_provisioned(self): + """ + Gets the time_last_provisioned of this AuditPolicy. + Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339. + + + :return: The time_last_provisioned of this AuditPolicy. + :rtype: datetime + """ + return self._time_last_provisioned + + @time_last_provisioned.setter + def time_last_provisioned(self, time_last_provisioned): + """ + Sets the time_last_provisioned of this AuditPolicy. + Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339. + + + :param time_last_provisioned: The time_last_provisioned of this AuditPolicy. + :type: datetime + """ + self._time_last_provisioned = time_last_provisioned + + @property + def time_last_retrieved(self): + """ + Gets the time_last_retrieved of this AuditPolicy. + The time when the audit policies was last retrieved from this target, in the format defined by RFC3339. + + + :return: The time_last_retrieved of this AuditPolicy. + :rtype: datetime + """ + return self._time_last_retrieved + + @time_last_retrieved.setter + def time_last_retrieved(self, time_last_retrieved): + """ + Sets the time_last_retrieved of this AuditPolicy. + The time when the audit policies was last retrieved from this target, in the format defined by RFC3339. + + + :param time_last_retrieved: The time_last_retrieved of this AuditPolicy. + :type: datetime + """ + self._time_last_retrieved = time_last_retrieved + + @property + def audit_specifications(self): + """ + Gets the audit_specifications of this AuditPolicy. + Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :return: The audit_specifications of this AuditPolicy. + :rtype: list[oci.data_safe.models.AuditSpecification] + """ + return self._audit_specifications + + @audit_specifications.setter + def audit_specifications(self, audit_specifications): + """ + Sets the audit_specifications of this AuditPolicy. + Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :param audit_specifications: The audit_specifications of this AuditPolicy. + :type: list[oci.data_safe.models.AuditSpecification] + """ + self._audit_specifications = audit_specifications + + @property + def audit_conditions(self): + """ + Gets the audit_conditions of this AuditPolicy. + Lists the audit policy provisioning conditions for the target database. + + + :return: The audit_conditions of this AuditPolicy. + :rtype: list[oci.data_safe.models.AuditConditions] + """ + return self._audit_conditions + + @audit_conditions.setter + def audit_conditions(self, audit_conditions): + """ + Sets the audit_conditions of this AuditPolicy. + Lists the audit policy provisioning conditions for the target database. + + + :param audit_conditions: The audit_conditions of this AuditPolicy. + :type: list[oci.data_safe.models.AuditConditions] + """ + self._audit_conditions = audit_conditions + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditPolicy. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditPolicy. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditPolicy. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditPolicy. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditPolicy. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditPolicy. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditPolicy. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditPolicy. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AuditPolicy. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AuditPolicy. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AuditPolicy. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AuditPolicy. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_policy_aggregation_items.py b/src/oci/data_safe/models/audit_policy_aggregation_items.py new file mode 100644 index 0000000000..d1dad2b7e8 --- /dev/null +++ b/src/oci/data_safe/models/audit_policy_aggregation_items.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditPolicyAggregationItems(object): + """ + Details of audit profile aggregation items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditPolicyAggregationItems object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dimensions: + The value to assign to the dimensions property of this AuditPolicyAggregationItems. + :type dimensions: oci.data_safe.models.AuditPolicyDimensions + + :param count: + The value to assign to the count property of this AuditPolicyAggregationItems. + :type count: int + + """ + self.swagger_types = { + 'dimensions': 'AuditPolicyDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._dimensions = None + self._count = None + + @property + def dimensions(self): + """ + Gets the dimensions of this AuditPolicyAggregationItems. + + :return: The dimensions of this AuditPolicyAggregationItems. + :rtype: oci.data_safe.models.AuditPolicyDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AuditPolicyAggregationItems. + + :param dimensions: The dimensions of this AuditPolicyAggregationItems. + :type: oci.data_safe.models.AuditPolicyDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + Gets the count of this AuditPolicyAggregationItems. + Total count of aggregated metric. + + + :return: The count of this AuditPolicyAggregationItems. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this AuditPolicyAggregationItems. + Total count of aggregated metric. + + + :param count: The count of this AuditPolicyAggregationItems. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_policy_analytic_collection.py b/src/oci/data_safe/models/audit_policy_analytic_collection.py new file mode 100644 index 0000000000..77ea0e3928 --- /dev/null +++ b/src/oci/data_safe/models/audit_policy_analytic_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditPolicyAnalyticCollection(object): + """ + Details of audit policy aggregation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditPolicyAnalyticCollection 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 AuditPolicyAnalyticCollection. + :type items: list[oci.data_safe.models.AuditPolicyAggregationItems] + + """ + self.swagger_types = { + 'items': 'list[AuditPolicyAggregationItems]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditPolicyAnalyticCollection. + Array of audit policy aggregration data. + + + :return: The items of this AuditPolicyAnalyticCollection. + :rtype: list[oci.data_safe.models.AuditPolicyAggregationItems] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditPolicyAnalyticCollection. + Array of audit policy aggregration data. + + + :param items: The items of this AuditPolicyAnalyticCollection. + :type: list[oci.data_safe.models.AuditPolicyAggregationItems] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_policy_collection.py b/src/oci/data_safe/models/audit_policy_collection.py new file mode 100644 index 0000000000..232bb46df7 --- /dev/null +++ b/src/oci/data_safe/models/audit_policy_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditPolicyCollection(object): + """ + Collection of audit policy summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditPolicyCollection 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 AuditPolicyCollection. + :type items: list[oci.data_safe.models.AuditPolicySummary] + + """ + self.swagger_types = { + 'items': 'list[AuditPolicySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditPolicyCollection. + Array of audit policy summary. + + + :return: The items of this AuditPolicyCollection. + :rtype: list[oci.data_safe.models.AuditPolicySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditPolicyCollection. + Array of audit policy summary. + + + :param items: The items of this AuditPolicyCollection. + :type: list[oci.data_safe.models.AuditPolicySummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_policy_dimensions.py b/src/oci/data_safe/models/audit_policy_dimensions.py new file mode 100644 index 0000000000..7840c2034f --- /dev/null +++ b/src/oci/data_safe/models/audit_policy_dimensions.py @@ -0,0 +1,138 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditPolicyDimensions(object): + """ + Details of aggregation dimensions used for summarizing audit policies. + """ + + #: A constant which can be used with the audit_policy_category property of a AuditPolicyDimensions. + #: This constant has a value of "BASIC_ACTIVITY" + AUDIT_POLICY_CATEGORY_BASIC_ACTIVITY = "BASIC_ACTIVITY" + + #: A constant which can be used with the audit_policy_category property of a AuditPolicyDimensions. + #: This constant has a value of "ADMIN_USER_ACTIVITY" + AUDIT_POLICY_CATEGORY_ADMIN_USER_ACTIVITY = "ADMIN_USER_ACTIVITY" + + #: A constant which can be used with the audit_policy_category property of a AuditPolicyDimensions. + #: This constant has a value of "USER_ACTIVITY" + AUDIT_POLICY_CATEGORY_USER_ACTIVITY = "USER_ACTIVITY" + + #: A constant which can be used with the audit_policy_category property of a AuditPolicyDimensions. + #: This constant has a value of "ORACLE_PREDEFINED" + AUDIT_POLICY_CATEGORY_ORACLE_PREDEFINED = "ORACLE_PREDEFINED" + + #: A constant which can be used with the audit_policy_category property of a AuditPolicyDimensions. + #: This constant has a value of "COMPLIANCE_STANDARD" + AUDIT_POLICY_CATEGORY_COMPLIANCE_STANDARD = "COMPLIANCE_STANDARD" + + #: A constant which can be used with the audit_policy_category property of a AuditPolicyDimensions. + #: This constant has a value of "CUSTOM" + AUDIT_POLICY_CATEGORY_CUSTOM = "CUSTOM" + + def __init__(self, **kwargs): + """ + Initializes a new AuditPolicyDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_policy_category: + The value to assign to the audit_policy_category property of this AuditPolicyDimensions. + Allowed values for this property are: "BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM" + :type audit_policy_category: str + + :param audit_policy_name: + The value to assign to the audit_policy_name property of this AuditPolicyDimensions. + :type audit_policy_name: str + + """ + self.swagger_types = { + 'audit_policy_category': 'str', + 'audit_policy_name': 'str' + } + + self.attribute_map = { + 'audit_policy_category': 'auditPolicyCategory', + 'audit_policy_name': 'auditPolicyName' + } + + self._audit_policy_category = None + self._audit_policy_name = None + + @property + def audit_policy_category(self): + """ + Gets the audit_policy_category of this AuditPolicyDimensions. + The category to which the audit policy belongs. + + Allowed values for this property are: "BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM" + + + :return: The audit_policy_category of this AuditPolicyDimensions. + :rtype: str + """ + return self._audit_policy_category + + @audit_policy_category.setter + def audit_policy_category(self, audit_policy_category): + """ + Sets the audit_policy_category of this AuditPolicyDimensions. + The category to which the audit policy belongs. + + + :param audit_policy_category: The audit_policy_category of this AuditPolicyDimensions. + :type: str + """ + allowed_values = ["BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM"] + if not value_allowed_none_or_none_sentinel(audit_policy_category, allowed_values): + raise ValueError( + "Invalid value for `audit_policy_category`, must be None or one of {0}" + .format(allowed_values) + ) + self._audit_policy_category = audit_policy_category + + @property + def audit_policy_name(self): + """ + Gets the audit_policy_name of this AuditPolicyDimensions. + Indicates the audit policy name. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :return: The audit_policy_name of this AuditPolicyDimensions. + :rtype: str + """ + return self._audit_policy_name + + @audit_policy_name.setter + def audit_policy_name(self, audit_policy_name): + """ + Sets the audit_policy_name of this AuditPolicyDimensions. + Indicates the audit policy name. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :param audit_policy_name: The audit_policy_name of this AuditPolicyDimensions. + :type: str + """ + self._audit_policy_name = audit_policy_name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_policy_summary.py b/src/oci/data_safe/models/audit_policy_summary.py new file mode 100644 index 0000000000..a132b1a491 --- /dev/null +++ b/src/oci/data_safe/models/audit_policy_summary.py @@ -0,0 +1,567 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditPolicySummary(object): + """ + The resource represents all available audit policies relevant for the target database with their corresponding audit conditions. + The audit policies could be in any one of the following 3 states in the target database + 1) Created and enabled + 2) Created but not enabled + 3) Not created + For more details on available audit policies, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + """ + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditPolicySummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditPolicySummary 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 AuditPolicySummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditPolicySummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this AuditPolicySummary. + :type display_name: str + + :param description: + The value to assign to the description property of this AuditPolicySummary. + :type description: str + + :param time_created: + The value to assign to the time_created property of this AuditPolicySummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AuditPolicySummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditPolicySummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "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 AuditPolicySummary. + :type lifecycle_details: str + + :param target_id: + The value to assign to the target_id property of this AuditPolicySummary. + :type target_id: str + + :param is_data_safe_service_account_excluded: + The value to assign to the is_data_safe_service_account_excluded property of this AuditPolicySummary. + :type is_data_safe_service_account_excluded: bool + + :param audit_specifications: + The value to assign to the audit_specifications property of this AuditPolicySummary. + :type audit_specifications: list[oci.data_safe.models.AuditSpecification] + + :param time_last_provisioned: + The value to assign to the time_last_provisioned property of this AuditPolicySummary. + :type time_last_provisioned: datetime + + :param time_last_retrieved: + The value to assign to the time_last_retrieved property of this AuditPolicySummary. + :type time_last_retrieved: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditPolicySummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditPolicySummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'target_id': 'str', + 'is_data_safe_service_account_excluded': 'bool', + 'audit_specifications': 'list[AuditSpecification]', + 'time_last_provisioned': 'datetime', + 'time_last_retrieved': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'description': 'description', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'target_id': 'targetId', + 'is_data_safe_service_account_excluded': 'isDataSafeServiceAccountExcluded', + 'audit_specifications': 'auditSpecifications', + 'time_last_provisioned': 'timeLastProvisioned', + 'time_last_retrieved': 'timeLastRetrieved', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._description = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._target_id = None + self._is_data_safe_service_account_excluded = None + self._audit_specifications = None + self._time_last_provisioned = None + self._time_last_retrieved = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditPolicySummary. + The OCID of the audit policy. + + + :return: The id of this AuditPolicySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditPolicySummary. + The OCID of the audit policy. + + + :param id: The id of this AuditPolicySummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditPolicySummary. + The OCID of the compartment containing the audit policy. + + + :return: The compartment_id of this AuditPolicySummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditPolicySummary. + The OCID of the compartment containing the audit policy. + + + :param compartment_id: The compartment_id of this AuditPolicySummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditPolicySummary. + The display name of the audit policy. + + + :return: The display_name of this AuditPolicySummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditPolicySummary. + The display name of the audit policy. + + + :param display_name: The display_name of this AuditPolicySummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this AuditPolicySummary. + Description of the audit policy. + + + :return: The description of this AuditPolicySummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditPolicySummary. + Description of the audit policy. + + + :param description: The description of this AuditPolicySummary. + :type: str + """ + self._description = description + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AuditPolicySummary. + The time the the audit policy was created, in the format defined by RFC3339. + + + :return: The time_created of this AuditPolicySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AuditPolicySummary. + The time the the audit policy was created, in the format defined by RFC3339. + + + :param time_created: The time_created of this AuditPolicySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this AuditPolicySummary. + The last date and time the audit policy was updated, in the format defined by RFC3339. + + + :return: The time_updated of this AuditPolicySummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AuditPolicySummary. + The last date and time the audit policy was updated, in the format defined by RFC3339. + + + :param time_updated: The time_updated of this AuditPolicySummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditPolicySummary. + The current state of the audit policy. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "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 AuditPolicySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditPolicySummary. + The current state of the audit policy. + + + :param lifecycle_state: The lifecycle_state of this AuditPolicySummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "FAILED", "NEEDS_ATTENTION", "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 AuditPolicySummary. + Details about the current state of the audit policy in Data Safe. + + + :return: The lifecycle_details of this AuditPolicySummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditPolicySummary. + Details about the current state of the audit policy in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this AuditPolicySummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditPolicySummary. + The OCID of the target for which the audit policy is created. + + + :return: The target_id of this AuditPolicySummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditPolicySummary. + The OCID of the target for which the audit policy is created. + + + :param target_id: The target_id of this AuditPolicySummary. + :type: str + """ + self._target_id = target_id + + @property + def is_data_safe_service_account_excluded(self): + """ + **[Required]** Gets the is_data_safe_service_account_excluded of this AuditPolicySummary. + Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies. + + + :return: The is_data_safe_service_account_excluded of this AuditPolicySummary. + :rtype: bool + """ + return self._is_data_safe_service_account_excluded + + @is_data_safe_service_account_excluded.setter + def is_data_safe_service_account_excluded(self, is_data_safe_service_account_excluded): + """ + Sets the is_data_safe_service_account_excluded of this AuditPolicySummary. + Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies. + + + :param is_data_safe_service_account_excluded: The is_data_safe_service_account_excluded of this AuditPolicySummary. + :type: bool + """ + self._is_data_safe_service_account_excluded = is_data_safe_service_account_excluded + + @property + def audit_specifications(self): + """ + Gets the audit_specifications of this AuditPolicySummary. + Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :return: The audit_specifications of this AuditPolicySummary. + :rtype: list[oci.data_safe.models.AuditSpecification] + """ + return self._audit_specifications + + @audit_specifications.setter + def audit_specifications(self, audit_specifications): + """ + Sets the audit_specifications of this AuditPolicySummary. + Represents all available audit policy specifications relevant for the target database. For more details on available audit polcies, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :param audit_specifications: The audit_specifications of this AuditPolicySummary. + :type: list[oci.data_safe.models.AuditSpecification] + """ + self._audit_specifications = audit_specifications + + @property + def time_last_provisioned(self): + """ + Gets the time_last_provisioned of this AuditPolicySummary. + Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339. + + + :return: The time_last_provisioned of this AuditPolicySummary. + :rtype: datetime + """ + return self._time_last_provisioned + + @time_last_provisioned.setter + def time_last_provisioned(self, time_last_provisioned): + """ + Sets the time_last_provisioned of this AuditPolicySummary. + Indicates the last provisioning time of audit policies on the target, in the format defined by RFC3339. + + + :param time_last_provisioned: The time_last_provisioned of this AuditPolicySummary. + :type: datetime + """ + self._time_last_provisioned = time_last_provisioned + + @property + def time_last_retrieved(self): + """ + Gets the time_last_retrieved of this AuditPolicySummary. + The time when the audit policies was last retrieved from this target, in the format defined by RFC3339. + + + :return: The time_last_retrieved of this AuditPolicySummary. + :rtype: datetime + """ + return self._time_last_retrieved + + @time_last_retrieved.setter + def time_last_retrieved(self, time_last_retrieved): + """ + Sets the time_last_retrieved of this AuditPolicySummary. + The time when the audit policies was last retrieved from this target, in the format defined by RFC3339. + + + :param time_last_retrieved: The time_last_retrieved of this AuditPolicySummary. + :type: datetime + """ + self._time_last_retrieved = time_last_retrieved + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditPolicySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditPolicySummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditPolicySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditPolicySummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditPolicySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditPolicySummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditPolicySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditPolicySummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_profile.py b/src/oci/data_safe/models/audit_profile.py new file mode 100644 index 0000000000..ff4e7640ae --- /dev/null +++ b/src/oci/data_safe/models/audit_profile.py @@ -0,0 +1,665 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditProfile(object): + """ + The resource represents audit profile settings and audit configurations for the database target, and helps evaluate the initial audit data volume for configuring collection in Data Safe. The resource is also responsible for auto-discovery of audit trails in the database target during target's registration. + """ + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a AuditProfile. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditProfile 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 AuditProfile. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditProfile. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this AuditProfile. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this AuditProfile. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AuditProfile. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditProfile. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "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 AuditProfile. + :type lifecycle_details: str + + :param target_id: + The value to assign to the target_id property of this AuditProfile. + :type target_id: str + + :param description: + The value to assign to the description property of this AuditProfile. + :type description: str + + :param audit_trails: + The value to assign to the audit_trails property of this AuditProfile. + :type audit_trails: list[oci.data_safe.models.AuditTrail] + + :param is_paid_usage_enabled: + The value to assign to the is_paid_usage_enabled property of this AuditProfile. + :type is_paid_usage_enabled: bool + + :param online_months: + The value to assign to the online_months property of this AuditProfile. + :type online_months: int + + :param offline_months: + The value to assign to the offline_months property of this AuditProfile. + :type offline_months: int + + :param audit_collected_volume: + The value to assign to the audit_collected_volume property of this AuditProfile. + :type audit_collected_volume: int + + :param is_override_global_retention_setting: + The value to assign to the is_override_global_retention_setting property of this AuditProfile. + :type is_override_global_retention_setting: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditProfile. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditProfile. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AuditProfile. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'target_id': 'str', + 'description': 'str', + 'audit_trails': 'list[AuditTrail]', + 'is_paid_usage_enabled': 'bool', + 'online_months': 'int', + 'offline_months': 'int', + 'audit_collected_volume': 'int', + 'is_override_global_retention_setting': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'target_id': 'targetId', + 'description': 'description', + 'audit_trails': 'auditTrails', + 'is_paid_usage_enabled': 'isPaidUsageEnabled', + 'online_months': 'onlineMonths', + 'offline_months': 'offlineMonths', + 'audit_collected_volume': 'auditCollectedVolume', + 'is_override_global_retention_setting': 'isOverrideGlobalRetentionSetting', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._target_id = None + self._description = None + self._audit_trails = None + self._is_paid_usage_enabled = None + self._online_months = None + self._offline_months = None + self._audit_collected_volume = None + self._is_override_global_retention_setting = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditProfile. + The OCID of the audit profile. + + + :return: The id of this AuditProfile. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditProfile. + The OCID of the audit profile. + + + :param id: The id of this AuditProfile. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditProfile. + The OCID of the compartment that contains the audit. + + + :return: The compartment_id of this AuditProfile. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditProfile. + The OCID of the compartment that contains the audit. + + + :param compartment_id: The compartment_id of this AuditProfile. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditProfile. + The display name of the audit profile. + + + :return: The display_name of this AuditProfile. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditProfile. + The display name of the audit profile. + + + :param display_name: The display_name of this AuditProfile. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AuditProfile. + The date and time the audit profile was created, in the format defined by RFC3339. + + + :return: The time_created of this AuditProfile. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AuditProfile. + The date and time the audit profile was created, in the format defined by RFC3339. + + + :param time_created: The time_created of this AuditProfile. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AuditProfile. + The date and time the audit profile was updated, in the format defined by RFC3339. + + + :return: The time_updated of this AuditProfile. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AuditProfile. + The date and time the audit profile was updated, in the format defined by RFC3339. + + + :param time_updated: The time_updated of this AuditProfile. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditProfile. + The current state of the audit profile. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AuditProfile. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditProfile. + The current state of the audit profile. + + + :param lifecycle_state: The lifecycle_state of this AuditProfile. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "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 AuditProfile. + Details about the current state of the audit profile in Data Safe. + + + :return: The lifecycle_details of this AuditProfile. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditProfile. + Details about the current state of the audit profile in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this AuditProfile. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditProfile. + The OCID of the Data Safe target for which the audit profile is created. + + + :return: The target_id of this AuditProfile. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditProfile. + The OCID of the Data Safe target for which the audit profile is created. + + + :param target_id: The target_id of this AuditProfile. + :type: str + """ + self._target_id = target_id + + @property + def description(self): + """ + Gets the description of this AuditProfile. + The description of the audit profile. + + + :return: The description of this AuditProfile. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditProfile. + The description of the audit profile. + + + :param description: The description of this AuditProfile. + :type: str + """ + self._description = description + + @property + def audit_trails(self): + """ + Gets the audit_trails of this AuditProfile. + Indicates the list of available audit trails on the target. + + + :return: The audit_trails of this AuditProfile. + :rtype: list[oci.data_safe.models.AuditTrail] + """ + return self._audit_trails + + @audit_trails.setter + def audit_trails(self, audit_trails): + """ + Sets the audit_trails of this AuditProfile. + Indicates the list of available audit trails on the target. + + + :param audit_trails: The audit_trails of this AuditProfile. + :type: list[oci.data_safe.models.AuditTrail] + """ + self._audit_trails = audit_trails + + @property + def is_paid_usage_enabled(self): + """ + **[Required]** Gets the is_paid_usage_enabled of this AuditProfile. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :return: The is_paid_usage_enabled of this AuditProfile. + :rtype: bool + """ + return self._is_paid_usage_enabled + + @is_paid_usage_enabled.setter + def is_paid_usage_enabled(self, is_paid_usage_enabled): + """ + Sets the is_paid_usage_enabled of this AuditProfile. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :param is_paid_usage_enabled: The is_paid_usage_enabled of this AuditProfile. + :type: bool + """ + self._is_paid_usage_enabled = is_paid_usage_enabled + + @property + def online_months(self): + """ + **[Required]** Gets the online_months of this AuditProfile. + Indicates the number of months the audit records will be stored online in Oracle Data Safe audit repository for immediate reporting and analysis. + Minimum: 1; Maximum:12 months + + + :return: The online_months of this AuditProfile. + :rtype: int + """ + return self._online_months + + @online_months.setter + def online_months(self, online_months): + """ + Sets the online_months of this AuditProfile. + Indicates the number of months the audit records will be stored online in Oracle Data Safe audit repository for immediate reporting and analysis. + Minimum: 1; Maximum:12 months + + + :param online_months: The online_months of this AuditProfile. + :type: int + """ + self._online_months = online_months + + @property + def offline_months(self): + """ + **[Required]** Gets the offline_months of this AuditProfile. + Indicates the number of months the audit records will be stored offline in the Data Safe audit archive. + Minimum: 0; Maximum: 72 months. + If you have a requirement to store the audit data even longer in archive, please contact the Oracle Support. + + + :return: The offline_months of this AuditProfile. + :rtype: int + """ + return self._offline_months + + @offline_months.setter + def offline_months(self, offline_months): + """ + Sets the offline_months of this AuditProfile. + Indicates the number of months the audit records will be stored offline in the Data Safe audit archive. + Minimum: 0; Maximum: 72 months. + If you have a requirement to store the audit data even longer in archive, please contact the Oracle Support. + + + :param offline_months: The offline_months of this AuditProfile. + :type: int + """ + self._offline_months = offline_months + + @property + def audit_collected_volume(self): + """ + Gets the audit_collected_volume of this AuditProfile. + Indicates number of audit records collected by Data Safe in the current calendar month. + Audit records for the Data Safe service account are excluded and are not counted towards your monthly free limit. + + + :return: The audit_collected_volume of this AuditProfile. + :rtype: int + """ + return self._audit_collected_volume + + @audit_collected_volume.setter + def audit_collected_volume(self, audit_collected_volume): + """ + Sets the audit_collected_volume of this AuditProfile. + Indicates number of audit records collected by Data Safe in the current calendar month. + Audit records for the Data Safe service account are excluded and are not counted towards your monthly free limit. + + + :param audit_collected_volume: The audit_collected_volume of this AuditProfile. + :type: int + """ + self._audit_collected_volume = audit_collected_volume + + @property + def is_override_global_retention_setting(self): + """ + **[Required]** Gets the is_override_global_retention_setting of this AuditProfile. + Indicates whether audit retention settings like online and offline months is set at the + target level overriding the global audit retention settings. + + + :return: The is_override_global_retention_setting of this AuditProfile. + :rtype: bool + """ + return self._is_override_global_retention_setting + + @is_override_global_retention_setting.setter + def is_override_global_retention_setting(self, is_override_global_retention_setting): + """ + Sets the is_override_global_retention_setting of this AuditProfile. + Indicates whether audit retention settings like online and offline months is set at the + target level overriding the global audit retention settings. + + + :param is_override_global_retention_setting: The is_override_global_retention_setting of this AuditProfile. + :type: bool + """ + self._is_override_global_retention_setting = is_override_global_retention_setting + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditProfile. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditProfile. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditProfile. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditProfile. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditProfile. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditProfile. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditProfile. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditProfile. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AuditProfile. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AuditProfile. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AuditProfile. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AuditProfile. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_profile_aggregation_items.py b/src/oci/data_safe/models/audit_profile_aggregation_items.py new file mode 100644 index 0000000000..01098507fe --- /dev/null +++ b/src/oci/data_safe/models/audit_profile_aggregation_items.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditProfileAggregationItems(object): + """ + Details of audit profile aggregation items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditProfileAggregationItems object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dimensions: + The value to assign to the dimensions property of this AuditProfileAggregationItems. + :type dimensions: oci.data_safe.models.AuditProfileDimensions + + :param count: + The value to assign to the count property of this AuditProfileAggregationItems. + :type count: int + + """ + self.swagger_types = { + 'dimensions': 'AuditProfileDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._dimensions = None + self._count = None + + @property + def dimensions(self): + """ + Gets the dimensions of this AuditProfileAggregationItems. + + :return: The dimensions of this AuditProfileAggregationItems. + :rtype: oci.data_safe.models.AuditProfileDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AuditProfileAggregationItems. + + :param dimensions: The dimensions of this AuditProfileAggregationItems. + :type: oci.data_safe.models.AuditProfileDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + Gets the count of this AuditProfileAggregationItems. + Total count of aggregated metric. + + + :return: The count of this AuditProfileAggregationItems. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this AuditProfileAggregationItems. + Total count of aggregated metric. + + + :param count: The count of this AuditProfileAggregationItems. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_profile_analytic_collection.py b/src/oci/data_safe/models/audit_profile_analytic_collection.py new file mode 100644 index 0000000000..728f7deb98 --- /dev/null +++ b/src/oci/data_safe/models/audit_profile_analytic_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditProfileAnalyticCollection(object): + """ + Details of audit profile analytic summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditProfileAnalyticCollection 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 AuditProfileAnalyticCollection. + :type items: list[oci.data_safe.models.AuditProfileAggregationItems] + + """ + self.swagger_types = { + 'items': 'list[AuditProfileAggregationItems]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditProfileAnalyticCollection. + Array of audit profile aggregration data. + + + :return: The items of this AuditProfileAnalyticCollection. + :rtype: list[oci.data_safe.models.AuditProfileAggregationItems] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditProfileAnalyticCollection. + Array of audit profile aggregration data. + + + :param items: The items of this AuditProfileAnalyticCollection. + :type: list[oci.data_safe.models.AuditProfileAggregationItems] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_profile_collection.py b/src/oci/data_safe/models/audit_profile_collection.py new file mode 100644 index 0000000000..2b84236c1a --- /dev/null +++ b/src/oci/data_safe/models/audit_profile_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditProfileCollection(object): + """ + Collection of audit profile summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditProfileCollection 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 AuditProfileCollection. + :type items: list[oci.data_safe.models.AuditProfileSummary] + + """ + self.swagger_types = { + 'items': 'list[AuditProfileSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditProfileCollection. + Array of audit profile summary. + + + :return: The items of this AuditProfileCollection. + :rtype: list[oci.data_safe.models.AuditProfileSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditProfileCollection. + Array of audit profile summary. + + + :param items: The items of this AuditProfileCollection. + :type: list[oci.data_safe.models.AuditProfileSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_profile_dimensions.py b/src/oci/data_safe/models/audit_profile_dimensions.py new file mode 100644 index 0000000000..7b1b91aa6d --- /dev/null +++ b/src/oci/data_safe/models/audit_profile_dimensions.py @@ -0,0 +1,74 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditProfileDimensions(object): + """ + Details of aggregation dimensions used for summarizing audit profiles. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditProfileDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_paid_usage_enabled: + The value to assign to the is_paid_usage_enabled property of this AuditProfileDimensions. + :type is_paid_usage_enabled: bool + + """ + self.swagger_types = { + 'is_paid_usage_enabled': 'bool' + } + + self.attribute_map = { + 'is_paid_usage_enabled': 'isPaidUsageEnabled' + } + + self._is_paid_usage_enabled = None + + @property + def is_paid_usage_enabled(self): + """ + Gets the is_paid_usage_enabled of this AuditProfileDimensions. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :return: The is_paid_usage_enabled of this AuditProfileDimensions. + :rtype: bool + """ + return self._is_paid_usage_enabled + + @is_paid_usage_enabled.setter + def is_paid_usage_enabled(self, is_paid_usage_enabled): + """ + Sets the is_paid_usage_enabled of this AuditProfileDimensions. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :param is_paid_usage_enabled: The is_paid_usage_enabled of this AuditProfileDimensions. + :type: bool + """ + self._is_paid_usage_enabled = is_paid_usage_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_profile_summary.py b/src/oci/data_safe/models/audit_profile_summary.py new file mode 100644 index 0000000000..c7eeb6eb5f --- /dev/null +++ b/src/oci/data_safe/models/audit_profile_summary.py @@ -0,0 +1,603 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditProfileSummary(object): + """ + Summary of an audit profile. + """ + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a AuditProfileSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditProfileSummary 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 AuditProfileSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditProfileSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this AuditProfileSummary. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this AuditProfileSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AuditProfileSummary. + :type time_updated: datetime + + :param target_id: + The value to assign to the target_id property of this AuditProfileSummary. + :type target_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditProfileSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param description: + The value to assign to the description property of this AuditProfileSummary. + :type description: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AuditProfileSummary. + :type lifecycle_details: str + + :param is_paid_usage_enabled: + The value to assign to the is_paid_usage_enabled property of this AuditProfileSummary. + :type is_paid_usage_enabled: bool + + :param online_months: + The value to assign to the online_months property of this AuditProfileSummary. + :type online_months: int + + :param offline_months: + The value to assign to the offline_months property of this AuditProfileSummary. + :type offline_months: int + + :param audit_collected_volume: + The value to assign to the audit_collected_volume property of this AuditProfileSummary. + :type audit_collected_volume: int + + :param is_override_global_retention_setting: + The value to assign to the is_override_global_retention_setting property of this AuditProfileSummary. + :type is_override_global_retention_setting: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditProfileSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditProfileSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'target_id': 'str', + 'lifecycle_state': 'str', + 'description': 'str', + 'lifecycle_details': 'str', + 'is_paid_usage_enabled': 'bool', + 'online_months': 'int', + 'offline_months': 'int', + 'audit_collected_volume': 'int', + 'is_override_global_retention_setting': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'target_id': 'targetId', + 'lifecycle_state': 'lifecycleState', + 'description': 'description', + 'lifecycle_details': 'lifecycleDetails', + 'is_paid_usage_enabled': 'isPaidUsageEnabled', + 'online_months': 'onlineMonths', + 'offline_months': 'offlineMonths', + 'audit_collected_volume': 'auditCollectedVolume', + 'is_override_global_retention_setting': 'isOverrideGlobalRetentionSetting', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._target_id = None + self._lifecycle_state = None + self._description = None + self._lifecycle_details = None + self._is_paid_usage_enabled = None + self._online_months = None + self._offline_months = None + self._audit_collected_volume = None + self._is_override_global_retention_setting = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditProfileSummary. + The OCID of the audit profile. + + + :return: The id of this AuditProfileSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditProfileSummary. + The OCID of the audit profile. + + + :param id: The id of this AuditProfileSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditProfileSummary. + The OCID of the compartment that contains the audit profile. + + + :return: The compartment_id of this AuditProfileSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditProfileSummary. + The OCID of the compartment that contains the audit profile. + + + :param compartment_id: The compartment_id of this AuditProfileSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditProfileSummary. + The display name of the audit profile. + + + :return: The display_name of this AuditProfileSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditProfileSummary. + The display name of the audit profile. + + + :param display_name: The display_name of this AuditProfileSummary. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AuditProfileSummary. + The date and time the audit profile was created, in the format defined by RFC3339. + + + :return: The time_created of this AuditProfileSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AuditProfileSummary. + The date and time the audit profile was created, in the format defined by RFC3339. + + + :param time_created: The time_created of this AuditProfileSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AuditProfileSummary. + The date and time the audit profile was updated, in the format defined by RFC3339. + + + :return: The time_updated of this AuditProfileSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AuditProfileSummary. + The date and time the audit profile was updated, in the format defined by RFC3339. + + + :param time_updated: The time_updated of this AuditProfileSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditProfileSummary. + The OCID of the Data Safe target for which the audit profile is created. + + + :return: The target_id of this AuditProfileSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditProfileSummary. + The OCID of the Data Safe target for which the audit profile is created. + + + :param target_id: The target_id of this AuditProfileSummary. + :type: str + """ + self._target_id = target_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditProfileSummary. + The current state of the audit profile. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AuditProfileSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditProfileSummary. + The current state of the audit profile. + + + :param lifecycle_state: The lifecycle_state of this AuditProfileSummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", "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 description(self): + """ + Gets the description of this AuditProfileSummary. + The description of audit profile. + + + :return: The description of this AuditProfileSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditProfileSummary. + The description of audit profile. + + + :param description: The description of this AuditProfileSummary. + :type: str + """ + self._description = description + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this AuditProfileSummary. + Details about the current state of the audit profile in Data Safe. + + + :return: The lifecycle_details of this AuditProfileSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditProfileSummary. + Details about the current state of the audit profile in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this AuditProfileSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def is_paid_usage_enabled(self): + """ + **[Required]** Gets the is_paid_usage_enabled of this AuditProfileSummary. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :return: The is_paid_usage_enabled of this AuditProfileSummary. + :rtype: bool + """ + return self._is_paid_usage_enabled + + @is_paid_usage_enabled.setter + def is_paid_usage_enabled(self, is_paid_usage_enabled): + """ + Sets the is_paid_usage_enabled of this AuditProfileSummary. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :param is_paid_usage_enabled: The is_paid_usage_enabled of this AuditProfileSummary. + :type: bool + """ + self._is_paid_usage_enabled = is_paid_usage_enabled + + @property + def online_months(self): + """ + **[Required]** Gets the online_months of this AuditProfileSummary. + Indicates the number of months the audit records will be stored online in Oracle Data Safe audit repository for immediate reporting and analysis. + Minimum: 1; Maximum:12 months + + + :return: The online_months of this AuditProfileSummary. + :rtype: int + """ + return self._online_months + + @online_months.setter + def online_months(self, online_months): + """ + Sets the online_months of this AuditProfileSummary. + Indicates the number of months the audit records will be stored online in Oracle Data Safe audit repository for immediate reporting and analysis. + Minimum: 1; Maximum:12 months + + + :param online_months: The online_months of this AuditProfileSummary. + :type: int + """ + self._online_months = online_months + + @property + def offline_months(self): + """ + **[Required]** Gets the offline_months of this AuditProfileSummary. + Indicates the number of months the audit records will be stored offline in the Data Safe audit archive. + Minimum: 0; Maximum: 72 months. + If you have a requirement to store the audit data even longer in archive, please contact the Oracle Support. + + + :return: The offline_months of this AuditProfileSummary. + :rtype: int + """ + return self._offline_months + + @offline_months.setter + def offline_months(self, offline_months): + """ + Sets the offline_months of this AuditProfileSummary. + Indicates the number of months the audit records will be stored offline in the Data Safe audit archive. + Minimum: 0; Maximum: 72 months. + If you have a requirement to store the audit data even longer in archive, please contact the Oracle Support. + + + :param offline_months: The offline_months of this AuditProfileSummary. + :type: int + """ + self._offline_months = offline_months + + @property + def audit_collected_volume(self): + """ + Gets the audit_collected_volume of this AuditProfileSummary. + Indicates count of audit records collected by Data Safe from the target which is eligible + for the current month's billing cycle. Audit records for actions performed by Data Safe service + account on the target is excluded. + + + :return: The audit_collected_volume of this AuditProfileSummary. + :rtype: int + """ + return self._audit_collected_volume + + @audit_collected_volume.setter + def audit_collected_volume(self, audit_collected_volume): + """ + Sets the audit_collected_volume of this AuditProfileSummary. + Indicates count of audit records collected by Data Safe from the target which is eligible + for the current month's billing cycle. Audit records for actions performed by Data Safe service + account on the target is excluded. + + + :param audit_collected_volume: The audit_collected_volume of this AuditProfileSummary. + :type: int + """ + self._audit_collected_volume = audit_collected_volume + + @property + def is_override_global_retention_setting(self): + """ + **[Required]** Gets the is_override_global_retention_setting of this AuditProfileSummary. + Indicates whether audit retention settings like online and offline months is set at the + target level overriding the global audit retention settings. + + + :return: The is_override_global_retention_setting of this AuditProfileSummary. + :rtype: bool + """ + return self._is_override_global_retention_setting + + @is_override_global_retention_setting.setter + def is_override_global_retention_setting(self, is_override_global_retention_setting): + """ + Sets the is_override_global_retention_setting of this AuditProfileSummary. + Indicates whether audit retention settings like online and offline months is set at the + target level overriding the global audit retention settings. + + + :param is_override_global_retention_setting: The is_override_global_retention_setting of this AuditProfileSummary. + :type: bool + """ + self._is_override_global_retention_setting = is_override_global_retention_setting + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditProfileSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditProfileSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditProfileSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditProfileSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditProfileSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditProfileSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditProfileSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditProfileSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_specification.py b/src/oci/data_safe/models/audit_specification.py new file mode 100644 index 0000000000..a4e5a8810a --- /dev/null +++ b/src/oci/data_safe/models/audit_specification.py @@ -0,0 +1,474 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditSpecification(object): + """ + Represents an audit policy relevant for the target database.The audit policy could be in any one of the following 3 states in the target database + 1) Created and enabled + 2) Created but not enabled + 3) Not created + For more details on relevant audit policies for the target database, refer to `documentation`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + """ + + #: A constant which can be used with the audit_policy_category property of a AuditSpecification. + #: This constant has a value of "BASIC_ACTIVITY" + AUDIT_POLICY_CATEGORY_BASIC_ACTIVITY = "BASIC_ACTIVITY" + + #: A constant which can be used with the audit_policy_category property of a AuditSpecification. + #: This constant has a value of "ADMIN_USER_ACTIVITY" + AUDIT_POLICY_CATEGORY_ADMIN_USER_ACTIVITY = "ADMIN_USER_ACTIVITY" + + #: A constant which can be used with the audit_policy_category property of a AuditSpecification. + #: This constant has a value of "USER_ACTIVITY" + AUDIT_POLICY_CATEGORY_USER_ACTIVITY = "USER_ACTIVITY" + + #: A constant which can be used with the audit_policy_category property of a AuditSpecification. + #: This constant has a value of "ORACLE_PREDEFINED" + AUDIT_POLICY_CATEGORY_ORACLE_PREDEFINED = "ORACLE_PREDEFINED" + + #: A constant which can be used with the audit_policy_category property of a AuditSpecification. + #: This constant has a value of "COMPLIANCE_STANDARD" + AUDIT_POLICY_CATEGORY_COMPLIANCE_STANDARD = "COMPLIANCE_STANDARD" + + #: A constant which can be used with the audit_policy_category property of a AuditSpecification. + #: This constant has a value of "CUSTOM" + AUDIT_POLICY_CATEGORY_CUSTOM = "CUSTOM" + + #: A constant which can be used with the enable_status property of a AuditSpecification. + #: This constant has a value of "ENABLED" + ENABLE_STATUS_ENABLED = "ENABLED" + + #: A constant which can be used with the enable_status property of a AuditSpecification. + #: This constant has a value of "DISABLED" + ENABLE_STATUS_DISABLED = "DISABLED" + + #: A constant which can be used with the enable_status property of a AuditSpecification. + #: This constant has a value of "PARTIALLY_ENABLED" + ENABLE_STATUS_PARTIALLY_ENABLED = "PARTIALLY_ENABLED" + + #: A constant which can be used with the enabled_entities property of a AuditSpecification. + #: This constant has a value of "ALL_USERS" + ENABLED_ENTITIES_ALL_USERS = "ALL_USERS" + + #: A constant which can be used with the enabled_entities property of a AuditSpecification. + #: This constant has a value of "INCLUDE_USERS" + ENABLED_ENTITIES_INCLUDE_USERS = "INCLUDE_USERS" + + #: A constant which can be used with the enabled_entities property of a AuditSpecification. + #: This constant has a value of "INCLUDE_ROLES" + ENABLED_ENTITIES_INCLUDE_ROLES = "INCLUDE_ROLES" + + #: A constant which can be used with the enabled_entities property of a AuditSpecification. + #: This constant has a value of "EXCLUDE_USERS" + ENABLED_ENTITIES_EXCLUDE_USERS = "EXCLUDE_USERS" + + #: A constant which can be used with the enabled_entities property of a AuditSpecification. + #: This constant has a value of "INCLUDE_USERS_ROLES" + ENABLED_ENTITIES_INCLUDE_USERS_ROLES = "INCLUDE_USERS_ROLES" + + #: A constant which can be used with the enabled_entities property of a AuditSpecification. + #: This constant has a value of "DISABLED" + ENABLED_ENTITIES_DISABLED = "DISABLED" + + def __init__(self, **kwargs): + """ + Initializes a new AuditSpecification object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_policy_name: + The value to assign to the audit_policy_name property of this AuditSpecification. + :type audit_policy_name: str + + :param database_policy_names: + The value to assign to the database_policy_names property of this AuditSpecification. + :type database_policy_names: list[str] + + :param audit_policy_category: + The value to assign to the audit_policy_category property of this AuditSpecification. + Allowed values for this property are: "BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type audit_policy_category: str + + :param enable_status: + The value to assign to the enable_status property of this AuditSpecification. + Allowed values for this property are: "ENABLED", "DISABLED", "PARTIALLY_ENABLED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type enable_status: str + + :param partially_enabled_msg: + The value to assign to the partially_enabled_msg property of this AuditSpecification. + :type partially_enabled_msg: str + + :param is_enabled_for_all_users: + The value to assign to the is_enabled_for_all_users property of this AuditSpecification. + :type is_enabled_for_all_users: bool + + :param is_view_only: + The value to assign to the is_view_only property of this AuditSpecification. + :type is_view_only: bool + + :param is_seeded_in_target: + The value to assign to the is_seeded_in_target property of this AuditSpecification. + :type is_seeded_in_target: bool + + :param is_seeded_in_data_safe: + The value to assign to the is_seeded_in_data_safe property of this AuditSpecification. + :type is_seeded_in_data_safe: bool + + :param is_created: + The value to assign to the is_created property of this AuditSpecification. + :type is_created: bool + + :param enabled_entities: + The value to assign to the enabled_entities property of this AuditSpecification. + Allowed values for this property are: "ALL_USERS", "INCLUDE_USERS", "INCLUDE_ROLES", "EXCLUDE_USERS", "INCLUDE_USERS_ROLES", "DISABLED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type enabled_entities: str + + """ + self.swagger_types = { + 'audit_policy_name': 'str', + 'database_policy_names': 'list[str]', + 'audit_policy_category': 'str', + 'enable_status': 'str', + 'partially_enabled_msg': 'str', + 'is_enabled_for_all_users': 'bool', + 'is_view_only': 'bool', + 'is_seeded_in_target': 'bool', + 'is_seeded_in_data_safe': 'bool', + 'is_created': 'bool', + 'enabled_entities': 'str' + } + + self.attribute_map = { + 'audit_policy_name': 'auditPolicyName', + 'database_policy_names': 'databasePolicyNames', + 'audit_policy_category': 'auditPolicyCategory', + 'enable_status': 'enableStatus', + 'partially_enabled_msg': 'partiallyEnabledMsg', + 'is_enabled_for_all_users': 'isEnabledForAllUsers', + 'is_view_only': 'isViewOnly', + 'is_seeded_in_target': 'isSeededInTarget', + 'is_seeded_in_data_safe': 'isSeededInDataSafe', + 'is_created': 'isCreated', + 'enabled_entities': 'enabledEntities' + } + + self._audit_policy_name = None + self._database_policy_names = None + self._audit_policy_category = None + self._enable_status = None + self._partially_enabled_msg = None + self._is_enabled_for_all_users = None + self._is_view_only = None + self._is_seeded_in_target = None + self._is_seeded_in_data_safe = None + self._is_created = None + self._enabled_entities = None + + @property + def audit_policy_name(self): + """ + **[Required]** Gets the audit_policy_name of this AuditSpecification. + Indicates the audit policy name. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :return: The audit_policy_name of this AuditSpecification. + :rtype: str + """ + return self._audit_policy_name + + @audit_policy_name.setter + def audit_policy_name(self, audit_policy_name): + """ + Sets the audit_policy_name of this AuditSpecification. + Indicates the audit policy name. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :param audit_policy_name: The audit_policy_name of this AuditSpecification. + :type: str + """ + self._audit_policy_name = audit_policy_name + + @property + def database_policy_names(self): + """ + **[Required]** Gets the database_policy_names of this AuditSpecification. + Indicates the names of corresponding database policy ( or policies) in the target database. + + + :return: The database_policy_names of this AuditSpecification. + :rtype: list[str] + """ + return self._database_policy_names + + @database_policy_names.setter + def database_policy_names(self, database_policy_names): + """ + Sets the database_policy_names of this AuditSpecification. + Indicates the names of corresponding database policy ( or policies) in the target database. + + + :param database_policy_names: The database_policy_names of this AuditSpecification. + :type: list[str] + """ + self._database_policy_names = database_policy_names + + @property + def audit_policy_category(self): + """ + **[Required]** Gets the audit_policy_category of this AuditSpecification. + The category to which the audit policy belongs. + + Allowed values for this property are: "BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The audit_policy_category of this AuditSpecification. + :rtype: str + """ + return self._audit_policy_category + + @audit_policy_category.setter + def audit_policy_category(self, audit_policy_category): + """ + Sets the audit_policy_category of this AuditSpecification. + The category to which the audit policy belongs. + + + :param audit_policy_category: The audit_policy_category of this AuditSpecification. + :type: str + """ + allowed_values = ["BASIC_ACTIVITY", "ADMIN_USER_ACTIVITY", "USER_ACTIVITY", "ORACLE_PREDEFINED", "COMPLIANCE_STANDARD", "CUSTOM"] + if not value_allowed_none_or_none_sentinel(audit_policy_category, allowed_values): + audit_policy_category = 'UNKNOWN_ENUM_VALUE' + self._audit_policy_category = audit_policy_category + + @property + def enable_status(self): + """ + **[Required]** Gets the enable_status of this AuditSpecification. + Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled. + + Allowed values for this property are: "ENABLED", "DISABLED", "PARTIALLY_ENABLED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The enable_status of this AuditSpecification. + :rtype: str + """ + return self._enable_status + + @enable_status.setter + def enable_status(self, enable_status): + """ + Sets the enable_status of this AuditSpecification. + Indicates whether the policy has been enabled, disabled or partially enabled in the target database. The status is PARTIALLY_ENABLED if any of the constituent database audit policies is not enabled. + + + :param enable_status: The enable_status of this AuditSpecification. + :type: str + """ + allowed_values = ["ENABLED", "DISABLED", "PARTIALLY_ENABLED"] + if not value_allowed_none_or_none_sentinel(enable_status, allowed_values): + enable_status = 'UNKNOWN_ENUM_VALUE' + self._enable_status = enable_status + + @property + def partially_enabled_msg(self): + """ + Gets the partially_enabled_msg of this AuditSpecification. + Provides information about the policy that has been only partially enabled. + + + :return: The partially_enabled_msg of this AuditSpecification. + :rtype: str + """ + return self._partially_enabled_msg + + @partially_enabled_msg.setter + def partially_enabled_msg(self, partially_enabled_msg): + """ + Sets the partially_enabled_msg of this AuditSpecification. + Provides information about the policy that has been only partially enabled. + + + :param partially_enabled_msg: The partially_enabled_msg of this AuditSpecification. + :type: str + """ + self._partially_enabled_msg = partially_enabled_msg + + @property + def is_enabled_for_all_users(self): + """ + **[Required]** Gets the is_enabled_for_all_users of this AuditSpecification. + Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions. + + + :return: The is_enabled_for_all_users of this AuditSpecification. + :rtype: bool + """ + return self._is_enabled_for_all_users + + @is_enabled_for_all_users.setter + def is_enabled_for_all_users(self, is_enabled_for_all_users): + """ + Sets the is_enabled_for_all_users of this AuditSpecification. + Indicates whether the policy by default is enabled for all users with no flexibility to alter the enablement conditions. + + + :param is_enabled_for_all_users: The is_enabled_for_all_users of this AuditSpecification. + :type: bool + """ + self._is_enabled_for_all_users = is_enabled_for_all_users + + @property + def is_view_only(self): + """ + **[Required]** Gets the is_view_only of this AuditSpecification. + Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target. + + + :return: The is_view_only of this AuditSpecification. + :rtype: bool + """ + return self._is_view_only + + @is_view_only.setter + def is_view_only(self, is_view_only): + """ + Sets the is_view_only of this AuditSpecification. + Indicates whether the audit policy is available for provisioning/ de-provisioning from Oracle Data Safe, or is only available for displaying the current provisioning status from the target. + + + :param is_view_only: The is_view_only of this AuditSpecification. + :type: bool + """ + self._is_view_only = is_view_only + + @property + def is_seeded_in_target(self): + """ + **[Required]** Gets the is_seeded_in_target of this AuditSpecification. + Indicates whether the audit policy is one of the predefined policies provided by Oracle Database. + + + :return: The is_seeded_in_target of this AuditSpecification. + :rtype: bool + """ + return self._is_seeded_in_target + + @is_seeded_in_target.setter + def is_seeded_in_target(self, is_seeded_in_target): + """ + Sets the is_seeded_in_target of this AuditSpecification. + Indicates whether the audit policy is one of the predefined policies provided by Oracle Database. + + + :param is_seeded_in_target: The is_seeded_in_target of this AuditSpecification. + :type: bool + """ + self._is_seeded_in_target = is_seeded_in_target + + @property + def is_seeded_in_data_safe(self): + """ + **[Required]** Gets the is_seeded_in_data_safe of this AuditSpecification. + Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe. + + + :return: The is_seeded_in_data_safe of this AuditSpecification. + :rtype: bool + """ + return self._is_seeded_in_data_safe + + @is_seeded_in_data_safe.setter + def is_seeded_in_data_safe(self, is_seeded_in_data_safe): + """ + Sets the is_seeded_in_data_safe of this AuditSpecification. + Indicates whether the audit policy is one of the seeded policies provided by Oracle Data Safe. + + + :param is_seeded_in_data_safe: The is_seeded_in_data_safe of this AuditSpecification. + :type: bool + """ + self._is_seeded_in_data_safe = is_seeded_in_data_safe + + @property + def is_created(self): + """ + **[Required]** Gets the is_created of this AuditSpecification. + Indicates whether the policy is already created on the target database. + + + :return: The is_created of this AuditSpecification. + :rtype: bool + """ + return self._is_created + + @is_created.setter + def is_created(self, is_created): + """ + Sets the is_created of this AuditSpecification. + Indicates whether the policy is already created on the target database. + + + :param is_created: The is_created of this AuditSpecification. + :type: bool + """ + self._is_created = is_created + + @property + def enabled_entities(self): + """ + **[Required]** Gets the enabled_entities of this AuditSpecification. + Indicates on whom the audit policy is enabled. + + Allowed values for this property are: "ALL_USERS", "INCLUDE_USERS", "INCLUDE_ROLES", "EXCLUDE_USERS", "INCLUDE_USERS_ROLES", "DISABLED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The enabled_entities of this AuditSpecification. + :rtype: str + """ + return self._enabled_entities + + @enabled_entities.setter + def enabled_entities(self, enabled_entities): + """ + Sets the enabled_entities of this AuditSpecification. + Indicates on whom the audit policy is enabled. + + + :param enabled_entities: The enabled_entities of this AuditSpecification. + :type: str + """ + allowed_values = ["ALL_USERS", "INCLUDE_USERS", "INCLUDE_ROLES", "EXCLUDE_USERS", "INCLUDE_USERS_ROLES", "DISABLED"] + if not value_allowed_none_or_none_sentinel(enabled_entities, allowed_values): + enabled_entities = 'UNKNOWN_ENUM_VALUE' + self._enabled_entities = enabled_entities + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_trail.py b/src/oci/data_safe/models/audit_trail.py new file mode 100644 index 0000000000..c2452ef72e --- /dev/null +++ b/src/oci/data_safe/models/audit_trail.py @@ -0,0 +1,696 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditTrail(object): + """ + An audit trail represents the source of audit records that provides documentary evidence of + the sequence of activities in the target database. Configuring audit trails in Data Safe, and enabling + audit data collection on the audit trails copies the audit records from the target database's audit trail + into the Data Safe repository. + """ + + #: A constant which can be used with the lifecycle_state property of a AuditTrail. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditTrail. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrail. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditTrail. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrail. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditTrail. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "STARTING" + STATUS_STARTING = "STARTING" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "COLLECTING" + STATUS_COLLECTING = "COLLECTING" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "RECOVERING" + STATUS_RECOVERING = "RECOVERING" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "IDLE" + STATUS_IDLE = "IDLE" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "STOPPING" + STATUS_STOPPING = "STOPPING" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "STOPPED" + STATUS_STOPPED = "STOPPED" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "RESUMING" + STATUS_RESUMING = "RESUMING" + + #: A constant which can be used with the status property of a AuditTrail. + #: This constant has a value of "RETRYING" + STATUS_RETRYING = "RETRYING" + + def __init__(self, **kwargs): + """ + Initializes a new AuditTrail 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 AuditTrail. + :type id: str + + :param audit_profile_id: + The value to assign to the audit_profile_id property of this AuditTrail. + :type audit_profile_id: str + + :param target_id: + The value to assign to the target_id property of this AuditTrail. + :type target_id: str + + :param display_name: + The value to assign to the display_name property of this AuditTrail. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this AuditTrail. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AuditTrail. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditTrail. + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param status: + The value to assign to the status property of this AuditTrail. + Allowed values for this property are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AuditTrail. + :type lifecycle_details: str + + :param trail_location: + The value to assign to the trail_location property of this AuditTrail. + :type trail_location: str + + :param description: + The value to assign to the description property of this AuditTrail. + :type description: str + + :param is_auto_purge_enabled: + The value to assign to the is_auto_purge_enabled property of this AuditTrail. + :type is_auto_purge_enabled: bool + + :param audit_collection_start_time: + The value to assign to the audit_collection_start_time property of this AuditTrail. + :type audit_collection_start_time: datetime + + :param work_request_id: + The value to assign to the work_request_id property of this AuditTrail. + :type work_request_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditTrail. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditTrail. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditTrail. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this AuditTrail. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'audit_profile_id': 'str', + 'target_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'status': 'str', + 'lifecycle_details': 'str', + 'trail_location': 'str', + 'description': 'str', + 'is_auto_purge_enabled': 'bool', + 'audit_collection_start_time': 'datetime', + 'work_request_id': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'audit_profile_id': 'auditProfileId', + 'target_id': 'targetId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'status': 'status', + 'lifecycle_details': 'lifecycleDetails', + 'trail_location': 'trailLocation', + 'description': 'description', + 'is_auto_purge_enabled': 'isAutoPurgeEnabled', + 'audit_collection_start_time': 'auditCollectionStartTime', + 'work_request_id': 'workRequestId', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._audit_profile_id = None + self._target_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._status = None + self._lifecycle_details = None + self._trail_location = None + self._description = None + self._is_auto_purge_enabled = None + self._audit_collection_start_time = None + self._work_request_id = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditTrail. + The OCID of the audit trail. + + + :return: The id of this AuditTrail. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditTrail. + The OCID of the audit trail. + + + :param id: The id of this AuditTrail. + :type: str + """ + self._id = id + + @property + def audit_profile_id(self): + """ + **[Required]** Gets the audit_profile_id of this AuditTrail. + The OCID of the parent audit. + + + :return: The audit_profile_id of this AuditTrail. + :rtype: str + """ + return self._audit_profile_id + + @audit_profile_id.setter + def audit_profile_id(self, audit_profile_id): + """ + Sets the audit_profile_id of this AuditTrail. + The OCID of the parent audit. + + + :param audit_profile_id: The audit_profile_id of this AuditTrail. + :type: str + """ + self._audit_profile_id = audit_profile_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditTrail. + The OCID of the Data Safe target for which the audit trail is created. + + + :return: The target_id of this AuditTrail. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditTrail. + The OCID of the Data Safe target for which the audit trail is created. + + + :param target_id: The target_id of this AuditTrail. + :type: str + """ + self._target_id = target_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditTrail. + The display name of the audit trail. + + + :return: The display_name of this AuditTrail. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditTrail. + The display name of the audit trail. + + + :param display_name: The display_name of this AuditTrail. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AuditTrail. + The date and time the audit trail was created, in the format defined by RFC3339. + + + :return: The time_created of this AuditTrail. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AuditTrail. + The date and time the audit trail was created, in the format defined by RFC3339. + + + :param time_created: The time_created of this AuditTrail. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AuditTrail. + The date and time the audit trail was updated, in the format defined by RFC3339. + + + :return: The time_updated of this AuditTrail. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AuditTrail. + The date and time the audit trail was updated, in the format defined by RFC3339. + + + :param time_updated: The time_updated of this AuditTrail. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditTrail. + The current state of the audit trail. + + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AuditTrail. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditTrail. + The current state of the audit trail. + + + :param lifecycle_state: The lifecycle_state of this AuditTrail. + :type: str + """ + allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def status(self): + """ + **[Required]** Gets the status of this AuditTrail. + The current sub-state of the audit trail. + + Allowed values for this property are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this AuditTrail. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this AuditTrail. + The current sub-state of the audit trail. + + + :param status: The status of this AuditTrail. + :type: str + """ + allowed_values = ["STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this AuditTrail. + Details about the current state of the audit trail in Data Safe. + + + :return: The lifecycle_details of this AuditTrail. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditTrail. + Details about the current state of the audit trail in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this AuditTrail. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def trail_location(self): + """ + Gets the trail_location of this AuditTrail. + An audit trail location represents the source of audit records that provides documentary + evidence of the sequence of activities in the target database. + + + :return: The trail_location of this AuditTrail. + :rtype: str + """ + return self._trail_location + + @trail_location.setter + def trail_location(self, trail_location): + """ + Sets the trail_location of this AuditTrail. + An audit trail location represents the source of audit records that provides documentary + evidence of the sequence of activities in the target database. + + + :param trail_location: The trail_location of this AuditTrail. + :type: str + """ + self._trail_location = trail_location + + @property + def description(self): + """ + Gets the description of this AuditTrail. + The description of the audit trail. + + + :return: The description of this AuditTrail. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditTrail. + The description of the audit trail. + + + :param description: The description of this AuditTrail. + :type: str + """ + self._description = description + + @property + def is_auto_purge_enabled(self): + """ + Gets the is_auto_purge_enabled of this AuditTrail. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :return: The is_auto_purge_enabled of this AuditTrail. + :rtype: bool + """ + return self._is_auto_purge_enabled + + @is_auto_purge_enabled.setter + def is_auto_purge_enabled(self, is_auto_purge_enabled): + """ + Sets the is_auto_purge_enabled of this AuditTrail. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :param is_auto_purge_enabled: The is_auto_purge_enabled of this AuditTrail. + :type: bool + """ + self._is_auto_purge_enabled = is_auto_purge_enabled + + @property + def audit_collection_start_time(self): + """ + Gets the audit_collection_start_time of this AuditTrail. + The date from which the audit trail must start collecting data, in the format defined by RFC3339. + + + :return: The audit_collection_start_time of this AuditTrail. + :rtype: datetime + """ + return self._audit_collection_start_time + + @audit_collection_start_time.setter + def audit_collection_start_time(self, audit_collection_start_time): + """ + Sets the audit_collection_start_time of this AuditTrail. + The date from which the audit trail must start collecting data, in the format defined by RFC3339. + + + :param audit_collection_start_time: The audit_collection_start_time of this AuditTrail. + :type: datetime + """ + self._audit_collection_start_time = audit_collection_start_time + + @property + def work_request_id(self): + """ + Gets the work_request_id of this AuditTrail. + The OCID of the workrequest for audit trail which collects audit records. + + + :return: The work_request_id of this AuditTrail. + :rtype: str + """ + return self._work_request_id + + @work_request_id.setter + def work_request_id(self, work_request_id): + """ + Sets the work_request_id of this AuditTrail. + The OCID of the workrequest for audit trail which collects audit records. + + + :param work_request_id: The work_request_id of this AuditTrail. + :type: str + """ + self._work_request_id = work_request_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditTrail. + The OCID of the compartment that contains the audit trail and its same as the compartment + of audit profile resource. + + + :return: The compartment_id of this AuditTrail. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditTrail. + The OCID of the compartment that contains the audit trail and its same as the compartment + of audit profile resource. + + + :param compartment_id: The compartment_id of this AuditTrail. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditTrail. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditTrail. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditTrail. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditTrail. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditTrail. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditTrail. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditTrail. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditTrail. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this AuditTrail. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this AuditTrail. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this AuditTrail. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this AuditTrail. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_trail_aggregation_items.py b/src/oci/data_safe/models/audit_trail_aggregation_items.py new file mode 100644 index 0000000000..d7c4ac9f96 --- /dev/null +++ b/src/oci/data_safe/models/audit_trail_aggregation_items.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditTrailAggregationItems(object): + """ + Details of audit trail aggregation items. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditTrailAggregationItems object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dimensions: + The value to assign to the dimensions property of this AuditTrailAggregationItems. + :type dimensions: oci.data_safe.models.AuditTrailDimensions + + :param count: + The value to assign to the count property of this AuditTrailAggregationItems. + :type count: int + + """ + self.swagger_types = { + 'dimensions': 'AuditTrailDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._dimensions = None + self._count = None + + @property + def dimensions(self): + """ + Gets the dimensions of this AuditTrailAggregationItems. + + :return: The dimensions of this AuditTrailAggregationItems. + :rtype: oci.data_safe.models.AuditTrailDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this AuditTrailAggregationItems. + + :param dimensions: The dimensions of this AuditTrailAggregationItems. + :type: oci.data_safe.models.AuditTrailDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + Gets the count of this AuditTrailAggregationItems. + Total count of aggregated metric. + + + :return: The count of this AuditTrailAggregationItems. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this AuditTrailAggregationItems. + Total count of aggregated metric. + + + :param count: The count of this AuditTrailAggregationItems. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_trail_analytic_collection.py b/src/oci/data_safe/models/audit_trail_analytic_collection.py new file mode 100644 index 0000000000..f90cd62b97 --- /dev/null +++ b/src/oci/data_safe/models/audit_trail_analytic_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditTrailAnalyticCollection(object): + """ + Details of audit trail analytic summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditTrailAnalyticCollection 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 AuditTrailAnalyticCollection. + :type items: list[oci.data_safe.models.AuditTrailAggregationItems] + + """ + self.swagger_types = { + 'items': 'list[AuditTrailAggregationItems]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditTrailAnalyticCollection. + Array of audit trail aggregration data. + + + :return: The items of this AuditTrailAnalyticCollection. + :rtype: list[oci.data_safe.models.AuditTrailAggregationItems] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditTrailAnalyticCollection. + Array of audit trail aggregration data. + + + :param items: The items of this AuditTrailAnalyticCollection. + :type: list[oci.data_safe.models.AuditTrailAggregationItems] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_trail_collection.py b/src/oci/data_safe/models/audit_trail_collection.py new file mode 100644 index 0000000000..f122ce8064 --- /dev/null +++ b/src/oci/data_safe/models/audit_trail_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditTrailCollection(object): + """ + Collection of audit trail summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AuditTrailCollection 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 AuditTrailCollection. + :type items: list[oci.data_safe.models.AuditTrailSummary] + + """ + self.swagger_types = { + 'items': 'list[AuditTrailSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AuditTrailCollection. + Array of audit trail summary. + + + :return: The items of this AuditTrailCollection. + :rtype: list[oci.data_safe.models.AuditTrailSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AuditTrailCollection. + Array of audit trail summary. + + + :param items: The items of this AuditTrailCollection. + :type: list[oci.data_safe.models.AuditTrailSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_trail_dimensions.py b/src/oci/data_safe/models/audit_trail_dimensions.py new file mode 100644 index 0000000000..14a8563798 --- /dev/null +++ b/src/oci/data_safe/models/audit_trail_dimensions.py @@ -0,0 +1,195 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditTrailDimensions(object): + """ + Details of aggregation dimensions used for summarizing audit trails. + """ + + #: A constant which can be used with the lifecycle_state property of a AuditTrailDimensions. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailDimensions. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailDimensions. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailDimensions. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailDimensions. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailDimensions. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + def __init__(self, **kwargs): + """ + Initializes a new AuditTrailDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param location: + The value to assign to the location property of this AuditTrailDimensions. + :type location: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditTrailDimensions. + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param status: + The value to assign to the status property of this AuditTrailDimensions. + :type status: str + + :param target_id: + The value to assign to the target_id property of this AuditTrailDimensions. + :type target_id: str + + """ + self.swagger_types = { + 'location': 'str', + 'lifecycle_state': 'str', + 'status': 'str', + 'target_id': 'str' + } + + self.attribute_map = { + 'location': 'location', + 'lifecycle_state': 'lifecycleState', + 'status': 'status', + 'target_id': 'targetId' + } + + self._location = None + self._lifecycle_state = None + self._status = None + self._target_id = None + + @property + def location(self): + """ + Gets the location of this AuditTrailDimensions. + The location represents the source of audit records that provides documentary evidence of the sequence of activities in the target database. + + + :return: The location of this AuditTrailDimensions. + :rtype: str + """ + return self._location + + @location.setter + def location(self, location): + """ + Sets the location of this AuditTrailDimensions. + The location represents the source of audit records that provides documentary evidence of the sequence of activities in the target database. + + + :param location: The location of this AuditTrailDimensions. + :type: str + """ + self._location = location + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this AuditTrailDimensions. + The current state of the audit trail. + + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AuditTrailDimensions. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditTrailDimensions. + The current state of the audit trail. + + + :param lifecycle_state: The lifecycle_state of this AuditTrailDimensions. + :type: str + """ + allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def status(self): + """ + Gets the status of this AuditTrailDimensions. + The current sub-state of the audit trail.. + + + :return: The status of this AuditTrailDimensions. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this AuditTrailDimensions. + The current sub-state of the audit trail.. + + + :param status: The status of this AuditTrailDimensions. + :type: str + """ + self._status = status + + @property + def target_id(self): + """ + Gets the target_id of this AuditTrailDimensions. + The OCID of the Data Safe target for which the audit trail is created. + + + :return: The target_id of this AuditTrailDimensions. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditTrailDimensions. + The OCID of the Data Safe target for which the audit trail is created. + + + :param target_id: The target_id of this AuditTrailDimensions. + :type: str + """ + self._target_id = target_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/audit_trail_summary.py b/src/oci/data_safe/models/audit_trail_summary.py new file mode 100644 index 0000000000..e0ae3460ff --- /dev/null +++ b/src/oci/data_safe/models/audit_trail_summary.py @@ -0,0 +1,625 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AuditTrailSummary(object): + """ + Summary of an audit trail. + """ + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "STARTING" + STATUS_STARTING = "STARTING" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "COLLECTING" + STATUS_COLLECTING = "COLLECTING" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "RECOVERING" + STATUS_RECOVERING = "RECOVERING" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "IDLE" + STATUS_IDLE = "IDLE" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "STOPPING" + STATUS_STOPPING = "STOPPING" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "STOPPED" + STATUS_STOPPED = "STOPPED" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "RESUMING" + STATUS_RESUMING = "RESUMING" + + #: A constant which can be used with the status property of a AuditTrailSummary. + #: This constant has a value of "RETRYING" + STATUS_RETRYING = "RETRYING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailSummary. + #: This constant has a value of "INACTIVE" + LIFECYCLE_STATE_INACTIVE = "INACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the lifecycle_state property of a AuditTrailSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + def __init__(self, **kwargs): + """ + Initializes a new AuditTrailSummary 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 AuditTrailSummary. + :type id: str + + :param audit_profile_id: + The value to assign to the audit_profile_id property of this AuditTrailSummary. + :type audit_profile_id: str + + :param display_name: + The value to assign to the display_name property of this AuditTrailSummary. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this AuditTrailSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this AuditTrailSummary. + :type time_updated: datetime + + :param status: + The value to assign to the status property of this AuditTrailSummary. + Allowed values for this property are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param description: + The value to assign to the description property of this AuditTrailSummary. + :type description: str + + :param trail_location: + The value to assign to the trail_location property of this AuditTrailSummary. + :type trail_location: str + + :param compartment_id: + The value to assign to the compartment_id property of this AuditTrailSummary. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this AuditTrailSummary. + :type target_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this AuditTrailSummary. + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this AuditTrailSummary. + :type lifecycle_details: str + + :param is_auto_purge_enabled: + The value to assign to the is_auto_purge_enabled property of this AuditTrailSummary. + :type is_auto_purge_enabled: bool + + :param audit_collection_start_time: + The value to assign to the audit_collection_start_time property of this AuditTrailSummary. + :type audit_collection_start_time: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this AuditTrailSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this AuditTrailSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'audit_profile_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'status': 'str', + 'description': 'str', + 'trail_location': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'is_auto_purge_enabled': 'bool', + 'audit_collection_start_time': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'audit_profile_id': 'auditProfileId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'status': 'status', + 'description': 'description', + 'trail_location': 'trailLocation', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'is_auto_purge_enabled': 'isAutoPurgeEnabled', + 'audit_collection_start_time': 'auditCollectionStartTime', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._audit_profile_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._status = None + self._description = None + self._trail_location = None + self._compartment_id = None + self._target_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._is_auto_purge_enabled = None + self._audit_collection_start_time = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this AuditTrailSummary. + The OCID of the audit trail. + + + :return: The id of this AuditTrailSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this AuditTrailSummary. + The OCID of the audit trail. + + + :param id: The id of this AuditTrailSummary. + :type: str + """ + self._id = id + + @property + def audit_profile_id(self): + """ + **[Required]** Gets the audit_profile_id of this AuditTrailSummary. + The OCID of the parent audit. + + + :return: The audit_profile_id of this AuditTrailSummary. + :rtype: str + """ + return self._audit_profile_id + + @audit_profile_id.setter + def audit_profile_id(self, audit_profile_id): + """ + Sets the audit_profile_id of this AuditTrailSummary. + The OCID of the parent audit. + + + :param audit_profile_id: The audit_profile_id of this AuditTrailSummary. + :type: str + """ + self._audit_profile_id = audit_profile_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this AuditTrailSummary. + The display name of the audit trail. + + + :return: The display_name of this AuditTrailSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this AuditTrailSummary. + The display name of the audit trail. + + + :param display_name: The display_name of this AuditTrailSummary. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this AuditTrailSummary. + The date and time the audit trail was created, in the format defined by RFC3339. + + + :return: The time_created of this AuditTrailSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this AuditTrailSummary. + The date and time the audit trail was created, in the format defined by RFC3339. + + + :param time_created: The time_created of this AuditTrailSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this AuditTrailSummary. + The date and time the audit trail was updated, in the format defined by RFC3339. + + + :return: The time_updated of this AuditTrailSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this AuditTrailSummary. + The date and time the audit trail was updated, in the format defined by RFC3339. + + + :param time_updated: The time_updated of this AuditTrailSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def status(self): + """ + **[Required]** Gets the status of this AuditTrailSummary. + The current sub-state of the audit trail. + + Allowed values for this property are: "STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this AuditTrailSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this AuditTrailSummary. + The current sub-state of the audit trail. + + + :param status: The status of this AuditTrailSummary. + :type: str + """ + allowed_values = ["STARTING", "COLLECTING", "RECOVERING", "IDLE", "STOPPING", "STOPPED", "RESUMING", "RETRYING"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def description(self): + """ + Gets the description of this AuditTrailSummary. + The description of audit trail. + + + :return: The description of this AuditTrailSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this AuditTrailSummary. + The description of audit trail. + + + :param description: The description of this AuditTrailSummary. + :type: str + """ + self._description = description + + @property + def trail_location(self): + """ + Gets the trail_location of this AuditTrailSummary. + An audit trail location represents the source of audit records that provides documentary evidence of the sequence of activities in the target database. + + + :return: The trail_location of this AuditTrailSummary. + :rtype: str + """ + return self._trail_location + + @trail_location.setter + def trail_location(self, trail_location): + """ + Sets the trail_location of this AuditTrailSummary. + An audit trail location represents the source of audit records that provides documentary evidence of the sequence of activities in the target database. + + + :param trail_location: The trail_location of this AuditTrailSummary. + :type: str + """ + self._trail_location = trail_location + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this AuditTrailSummary. + The OCID of the compartment that contains the audit. + + + :return: The compartment_id of this AuditTrailSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this AuditTrailSummary. + The OCID of the compartment that contains the audit. + + + :param compartment_id: The compartment_id of this AuditTrailSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this AuditTrailSummary. + The OCID of the Data Safe target for which the audit trail is created. + + + :return: The target_id of this AuditTrailSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this AuditTrailSummary. + The OCID of the Data Safe target for which the audit trail is created. + + + :param target_id: The target_id of this AuditTrailSummary. + :type: str + """ + self._target_id = target_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this AuditTrailSummary. + The current state of the audit trail. + + Allowed values for this property are: "INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this AuditTrailSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this AuditTrailSummary. + The current state of the audit trail. + + + :param lifecycle_state: The lifecycle_state of this AuditTrailSummary. + :type: str + """ + allowed_values = ["INACTIVE", "UPDATING", "ACTIVE", "DELETING", "FAILED", "NEEDS_ATTENTION"] + 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 AuditTrailSummary. + Details about the current state of the audit trail in Data Safe. + + + :return: The lifecycle_details of this AuditTrailSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this AuditTrailSummary. + Details about the current state of the audit trail in Data Safe. + + + :param lifecycle_details: The lifecycle_details of this AuditTrailSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def is_auto_purge_enabled(self): + """ + Gets the is_auto_purge_enabled of this AuditTrailSummary. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :return: The is_auto_purge_enabled of this AuditTrailSummary. + :rtype: bool + """ + return self._is_auto_purge_enabled + + @is_auto_purge_enabled.setter + def is_auto_purge_enabled(self, is_auto_purge_enabled): + """ + Sets the is_auto_purge_enabled of this AuditTrailSummary. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :param is_auto_purge_enabled: The is_auto_purge_enabled of this AuditTrailSummary. + :type: bool + """ + self._is_auto_purge_enabled = is_auto_purge_enabled + + @property + def audit_collection_start_time(self): + """ + Gets the audit_collection_start_time of this AuditTrailSummary. + The date from which the audit trail must start collecting data, in the format defined by RFC3339. + + + :return: The audit_collection_start_time of this AuditTrailSummary. + :rtype: datetime + """ + return self._audit_collection_start_time + + @audit_collection_start_time.setter + def audit_collection_start_time(self, audit_collection_start_time): + """ + Sets the audit_collection_start_time of this AuditTrailSummary. + The date from which the audit trail must start collecting data, in the format defined by RFC3339. + + + :param audit_collection_start_time: The audit_collection_start_time of this AuditTrailSummary. + :type: datetime + """ + self._audit_collection_start_time = audit_collection_start_time + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this AuditTrailSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this AuditTrailSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this AuditTrailSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this AuditTrailSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this AuditTrailSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this AuditTrailSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this AuditTrailSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this AuditTrailSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/available_audit_volume_collection.py b/src/oci/data_safe/models/available_audit_volume_collection.py new file mode 100644 index 0000000000..e230f2b077 --- /dev/null +++ b/src/oci/data_safe/models/available_audit_volume_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AvailableAuditVolumeCollection(object): + """ + Collection of available audit volume summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AvailableAuditVolumeCollection 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 AvailableAuditVolumeCollection. + :type items: list[oci.data_safe.models.AvailableAuditVolumeSummary] + + """ + self.swagger_types = { + 'items': 'list[AvailableAuditVolumeSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this AvailableAuditVolumeCollection. + Array of available audit volume summary. + + + :return: The items of this AvailableAuditVolumeCollection. + :rtype: list[oci.data_safe.models.AvailableAuditVolumeSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this AvailableAuditVolumeCollection. + Array of available audit volume summary. + + + :param items: The items of this AvailableAuditVolumeCollection. + :type: list[oci.data_safe.models.AvailableAuditVolumeSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/available_audit_volume_summary.py b/src/oci/data_safe/models/available_audit_volume_summary.py new file mode 100644 index 0000000000..e4a688b011 --- /dev/null +++ b/src/oci/data_safe/models/available_audit_volume_summary.py @@ -0,0 +1,167 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class AvailableAuditVolumeSummary(object): + """ + Represents the audit data volume collected by Data Safe from the target database for the specified audit profile. + """ + + def __init__(self, **kwargs): + """ + Initializes a new AvailableAuditVolumeSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_profile_id: + The value to assign to the audit_profile_id property of this AvailableAuditVolumeSummary. + :type audit_profile_id: str + + :param trail_location: + The value to assign to the trail_location property of this AvailableAuditVolumeSummary. + :type trail_location: str + + :param month_in_consideration: + The value to assign to the month_in_consideration property of this AvailableAuditVolumeSummary. + :type month_in_consideration: datetime + + :param volume: + The value to assign to the volume property of this AvailableAuditVolumeSummary. + :type volume: int + + """ + self.swagger_types = { + 'audit_profile_id': 'str', + 'trail_location': 'str', + 'month_in_consideration': 'datetime', + 'volume': 'int' + } + + self.attribute_map = { + 'audit_profile_id': 'auditProfileId', + 'trail_location': 'trailLocation', + 'month_in_consideration': 'monthInConsideration', + 'volume': 'volume' + } + + self._audit_profile_id = None + self._trail_location = None + self._month_in_consideration = None + self._volume = None + + @property + def audit_profile_id(self): + """ + **[Required]** Gets the audit_profile_id of this AvailableAuditVolumeSummary. + The OCID of the audit profile resource. + + + :return: The audit_profile_id of this AvailableAuditVolumeSummary. + :rtype: str + """ + return self._audit_profile_id + + @audit_profile_id.setter + def audit_profile_id(self, audit_profile_id): + """ + Sets the audit_profile_id of this AvailableAuditVolumeSummary. + The OCID of the audit profile resource. + + + :param audit_profile_id: The audit_profile_id of this AvailableAuditVolumeSummary. + :type: str + """ + self._audit_profile_id = audit_profile_id + + @property + def trail_location(self): + """ + **[Required]** Gets the trail_location of this AvailableAuditVolumeSummary. + Audit trail location on the target database from where the audit data is being collected by Data Safe. + + + :return: The trail_location of this AvailableAuditVolumeSummary. + :rtype: str + """ + return self._trail_location + + @trail_location.setter + def trail_location(self, trail_location): + """ + Sets the trail_location of this AvailableAuditVolumeSummary. + Audit trail location on the target database from where the audit data is being collected by Data Safe. + + + :param trail_location: The trail_location of this AvailableAuditVolumeSummary. + :type: str + """ + self._trail_location = trail_location + + @property + def month_in_consideration(self): + """ + **[Required]** Gets the month_in_consideration of this AvailableAuditVolumeSummary. + Represents the month under consideration for which aggregated audit data volume available at the target is computed. + This field will be the UTC start of the day of the first day of the month for which the aggregate count corresponds to, in the format defined by RFC3339.. + For instance, the value of 01-01-2021T00:00:00Z represents Jan 2021. + + + :return: The month_in_consideration of this AvailableAuditVolumeSummary. + :rtype: datetime + """ + return self._month_in_consideration + + @month_in_consideration.setter + def month_in_consideration(self, month_in_consideration): + """ + Sets the month_in_consideration of this AvailableAuditVolumeSummary. + Represents the month under consideration for which aggregated audit data volume available at the target is computed. + This field will be the UTC start of the day of the first day of the month for which the aggregate count corresponds to, in the format defined by RFC3339.. + For instance, the value of 01-01-2021T00:00:00Z represents Jan 2021. + + + :param month_in_consideration: The month_in_consideration of this AvailableAuditVolumeSummary. + :type: datetime + """ + self._month_in_consideration = month_in_consideration + + @property + def volume(self): + """ + **[Required]** Gets the volume of this AvailableAuditVolumeSummary. + Represents the aggregated audit data volume available in the audit trails on the target database which is yet to be collected by Data Safe for the specified month. + + + :return: The volume of this AvailableAuditVolumeSummary. + :rtype: int + """ + return self._volume + + @volume.setter + def volume(self, volume): + """ + Sets the volume of this AvailableAuditVolumeSummary. + Represents the aggregated audit data volume available in the audit trails on the target database which is yet to be collected by Data Safe for the specified month. + + + :param volume: The volume of this AvailableAuditVolumeSummary. + :type: int + """ + self._volume = volume + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/calculate_audit_volume_available_details.py b/src/oci/data_safe/models/calculate_audit_volume_available_details.py new file mode 100644 index 0000000000..1f50b031fc --- /dev/null +++ b/src/oci/data_safe/models/calculate_audit_volume_available_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CalculateAuditVolumeAvailableDetails(object): + """ + The details for calculating audit data volume on target. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CalculateAuditVolumeAvailableDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_collection_start_time: + The value to assign to the audit_collection_start_time property of this CalculateAuditVolumeAvailableDetails. + :type audit_collection_start_time: datetime + + :param trail_locations: + The value to assign to the trail_locations property of this CalculateAuditVolumeAvailableDetails. + :type trail_locations: list[str] + + """ + self.swagger_types = { + 'audit_collection_start_time': 'datetime', + 'trail_locations': 'list[str]' + } + + self.attribute_map = { + 'audit_collection_start_time': 'auditCollectionStartTime', + 'trail_locations': 'trailLocations' + } + + self._audit_collection_start_time = None + self._trail_locations = None + + @property + def audit_collection_start_time(self): + """ + Gets the audit_collection_start_time of this CalculateAuditVolumeAvailableDetails. + The date from which the audit trail must start collecting data in UTC, in the format defined by RFC3339. If not specified, this will default to the date based on the retention period. + + + :return: The audit_collection_start_time of this CalculateAuditVolumeAvailableDetails. + :rtype: datetime + """ + return self._audit_collection_start_time + + @audit_collection_start_time.setter + def audit_collection_start_time(self, audit_collection_start_time): + """ + Sets the audit_collection_start_time of this CalculateAuditVolumeAvailableDetails. + The date from which the audit trail must start collecting data in UTC, in the format defined by RFC3339. If not specified, this will default to the date based on the retention period. + + + :param audit_collection_start_time: The audit_collection_start_time of this CalculateAuditVolumeAvailableDetails. + :type: datetime + """ + self._audit_collection_start_time = audit_collection_start_time + + @property + def trail_locations(self): + """ + **[Required]** Gets the trail_locations of this CalculateAuditVolumeAvailableDetails. + The trail locations for which the audit data volume has to be calculated. + + + :return: The trail_locations of this CalculateAuditVolumeAvailableDetails. + :rtype: list[str] + """ + return self._trail_locations + + @trail_locations.setter + def trail_locations(self, trail_locations): + """ + Sets the trail_locations of this CalculateAuditVolumeAvailableDetails. + The trail locations for which the audit data volume has to be calculated. + + + :param trail_locations: The trail_locations of this CalculateAuditVolumeAvailableDetails. + :type: list[str] + """ + self._trail_locations = trail_locations + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/calculate_audit_volume_collected_details.py b/src/oci/data_safe/models/calculate_audit_volume_collected_details.py new file mode 100644 index 0000000000..beaf04b3c3 --- /dev/null +++ b/src/oci/data_safe/models/calculate_audit_volume_collected_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CalculateAuditVolumeCollectedDetails(object): + """ + The details for calculating audit data volume collected by data safe. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CalculateAuditVolumeCollectedDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param time_from_month: + The value to assign to the time_from_month property of this CalculateAuditVolumeCollectedDetails. + :type time_from_month: datetime + + :param time_to_month: + The value to assign to the time_to_month property of this CalculateAuditVolumeCollectedDetails. + :type time_to_month: datetime + + """ + self.swagger_types = { + 'time_from_month': 'datetime', + 'time_to_month': 'datetime' + } + + self.attribute_map = { + 'time_from_month': 'timeFromMonth', + 'time_to_month': 'timeToMonth' + } + + self._time_from_month = None + self._time_to_month = None + + @property + def time_from_month(self): + """ + **[Required]** Gets the time_from_month of this CalculateAuditVolumeCollectedDetails. + The date from which the audit volume collected by data safe has to be calculated, in the format defined by RFC3339. + + + :return: The time_from_month of this CalculateAuditVolumeCollectedDetails. + :rtype: datetime + """ + return self._time_from_month + + @time_from_month.setter + def time_from_month(self, time_from_month): + """ + Sets the time_from_month of this CalculateAuditVolumeCollectedDetails. + The date from which the audit volume collected by data safe has to be calculated, in the format defined by RFC3339. + + + :param time_from_month: The time_from_month of this CalculateAuditVolumeCollectedDetails. + :type: datetime + """ + self._time_from_month = time_from_month + + @property + def time_to_month(self): + """ + Gets the time_to_month of this CalculateAuditVolumeCollectedDetails. + The date from which the audit volume collected by data safe has to be calculated, in the format defined by RFC3339. If not specified, this will default to the current date. + + + :return: The time_to_month of this CalculateAuditVolumeCollectedDetails. + :rtype: datetime + """ + return self._time_to_month + + @time_to_month.setter + def time_to_month(self, time_to_month): + """ + Sets the time_to_month of this CalculateAuditVolumeCollectedDetails. + The date from which the audit volume collected by data safe has to be calculated, in the format defined by RFC3339. If not specified, this will default to the current date. + + + :param time_to_month: The time_to_month of this CalculateAuditVolumeCollectedDetails. + :type: datetime + """ + self._time_to_month = time_to_month + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_alert_compartment_details.py b/src/oci/data_safe/models/change_alert_compartment_details.py new file mode 100644 index 0000000000..5729c13a57 --- /dev/null +++ b/src/oci/data_safe/models/change_alert_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeAlertCompartmentDetails(object): + """ + The details used to change the compartment of an alert. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeAlertCompartmentDetails 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 ChangeAlertCompartmentDetails. + :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 ChangeAlertCompartmentDetails. + The OCID of the new compartment to move the alert to. + + + :return: The compartment_id of this ChangeAlertCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeAlertCompartmentDetails. + The OCID of the new compartment to move the alert to. + + + :param compartment_id: The compartment_id of this ChangeAlertCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_alert_policy_compartment_details.py b/src/oci/data_safe/models/change_alert_policy_compartment_details.py new file mode 100644 index 0000000000..7f57df2511 --- /dev/null +++ b/src/oci/data_safe/models/change_alert_policy_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeAlertPolicyCompartmentDetails(object): + """ + The details used to change the compartment of an alert policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeAlertPolicyCompartmentDetails 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 ChangeAlertPolicyCompartmentDetails. + :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 ChangeAlertPolicyCompartmentDetails. + The OCID of the compartment where the alert policy has to be moved. + + + :return: The compartment_id of this ChangeAlertPolicyCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeAlertPolicyCompartmentDetails. + The OCID of the compartment where the alert policy has to be moved. + + + :param compartment_id: The compartment_id of this ChangeAlertPolicyCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_audit_archive_retrieval_compartment_details.py b/src/oci/data_safe/models/change_audit_archive_retrieval_compartment_details.py new file mode 100644 index 0000000000..5b4adb3b1d --- /dev/null +++ b/src/oci/data_safe/models/change_audit_archive_retrieval_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeAuditArchiveRetrievalCompartmentDetails(object): + """ + The description of the achieve retrieval change compartment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeAuditArchiveRetrievalCompartmentDetails 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 ChangeAuditArchiveRetrievalCompartmentDetails. + :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 ChangeAuditArchiveRetrievalCompartmentDetails. + The `OCID`__ of the new compartment were + achieve retrieval resource would move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeAuditArchiveRetrievalCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeAuditArchiveRetrievalCompartmentDetails. + The `OCID`__ of the new compartment were + achieve retrieval resource would move. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeAuditArchiveRetrievalCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_audit_policy_compartment_details.py b/src/oci/data_safe/models/change_audit_policy_compartment_details.py new file mode 100644 index 0000000000..52b582806d --- /dev/null +++ b/src/oci/data_safe/models/change_audit_policy_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeAuditPolicyCompartmentDetails(object): + """ + Details for which compartment to move the resource to. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeAuditPolicyCompartmentDetails 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 ChangeAuditPolicyCompartmentDetails. + :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 ChangeAuditPolicyCompartmentDetails. + The OCID of the compartment where you want to move the audit policy. + + + :return: The compartment_id of this ChangeAuditPolicyCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeAuditPolicyCompartmentDetails. + The OCID of the compartment where you want to move the audit policy. + + + :param compartment_id: The compartment_id of this ChangeAuditPolicyCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_audit_profile_compartment_details.py b/src/oci/data_safe/models/change_audit_profile_compartment_details.py new file mode 100644 index 0000000000..984f3065a0 --- /dev/null +++ b/src/oci/data_safe/models/change_audit_profile_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeAuditProfileCompartmentDetails(object): + """ + Moves the specified audit profile and its assoicated resources into a different compartment. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeAuditProfileCompartmentDetails 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 ChangeAuditProfileCompartmentDetails. + :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 ChangeAuditProfileCompartmentDetails. + The OCID of the compartment where you want to move the audit profile. + + + :return: The compartment_id of this ChangeAuditProfileCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeAuditProfileCompartmentDetails. + The OCID of the compartment where you want to move the audit profile. + + + :param compartment_id: The compartment_id of this ChangeAuditProfileCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_discovery_job_compartment_details.py b/src/oci/data_safe/models/change_discovery_job_compartment_details.py new file mode 100644 index 0000000000..a9f6b63af7 --- /dev/null +++ b/src/oci/data_safe/models/change_discovery_job_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeDiscoveryJobCompartmentDetails(object): + """ + Details to change the compartment of a discovery job resource. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeDiscoveryJobCompartmentDetails 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 ChangeDiscoveryJobCompartmentDetails. + :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 ChangeDiscoveryJobCompartmentDetails. + The OCID of the compartment where the discovery job should be moved. + + + :return: The compartment_id of this ChangeDiscoveryJobCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeDiscoveryJobCompartmentDetails. + The OCID of the compartment where the discovery job should be moved. + + + :param compartment_id: The compartment_id of this ChangeDiscoveryJobCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_library_masking_format_compartment_details.py b/src/oci/data_safe/models/change_library_masking_format_compartment_details.py new file mode 100644 index 0000000000..26846d4f06 --- /dev/null +++ b/src/oci/data_safe/models/change_library_masking_format_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeLibraryMaskingFormatCompartmentDetails(object): + """ + Details to change the compartment of a library masking format. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeLibraryMaskingFormatCompartmentDetails 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 ChangeLibraryMaskingFormatCompartmentDetails. + :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 ChangeLibraryMaskingFormatCompartmentDetails. + The OCID of the compartment where the library masking format should be moved. + + + :return: The compartment_id of this ChangeLibraryMaskingFormatCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeLibraryMaskingFormatCompartmentDetails. + The OCID of the compartment where the library masking format should be moved. + + + :param compartment_id: The compartment_id of this ChangeLibraryMaskingFormatCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_masking_policy_compartment_details.py b/src/oci/data_safe/models/change_masking_policy_compartment_details.py new file mode 100644 index 0000000000..4444ac6ae8 --- /dev/null +++ b/src/oci/data_safe/models/change_masking_policy_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeMaskingPolicyCompartmentDetails(object): + """ + Details to change the compartment of a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeMaskingPolicyCompartmentDetails 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 ChangeMaskingPolicyCompartmentDetails. + :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 ChangeMaskingPolicyCompartmentDetails. + The OCID of the compartment where the masking policy should be moved. + + + :return: The compartment_id of this ChangeMaskingPolicyCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeMaskingPolicyCompartmentDetails. + The OCID of the compartment where the masking policy should be moved. + + + :param compartment_id: The compartment_id of this ChangeMaskingPolicyCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_report_compartment_details.py b/src/oci/data_safe/models/change_report_compartment_details.py new file mode 100644 index 0000000000..eaf2558fa8 --- /dev/null +++ b/src/oci/data_safe/models/change_report_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeReportCompartmentDetails(object): + """ + Details for which compartment to move the resource to. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeReportCompartmentDetails 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 ChangeReportCompartmentDetails. + :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 ChangeReportCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeReportCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeReportCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeReportCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_report_definition_compartment_details.py b/src/oci/data_safe/models/change_report_definition_compartment_details.py new file mode 100644 index 0000000000..3653286615 --- /dev/null +++ b/src/oci/data_safe/models/change_report_definition_compartment_details.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeReportDefinitionCompartmentDetails(object): + """ + Details for which compartment to move the resource to. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeReportDefinitionCompartmentDetails 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 ChangeReportDefinitionCompartmentDetails. + :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 ChangeReportDefinitionCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this ChangeReportDefinitionCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeReportDefinitionCompartmentDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this ChangeReportDefinitionCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_retention_details.py b/src/oci/data_safe/models/change_retention_details.py new file mode 100644 index 0000000000..ce474b4dba --- /dev/null +++ b/src/oci/data_safe/models/change_retention_details.py @@ -0,0 +1,140 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeRetentionDetails(object): + """ + Details for the audit retention months to be modified. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeRetentionDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param online_months: + The value to assign to the online_months property of this ChangeRetentionDetails. + :type online_months: int + + :param offline_months: + The value to assign to the offline_months property of this ChangeRetentionDetails. + :type offline_months: int + + :param is_override_global_retention_setting: + The value to assign to the is_override_global_retention_setting property of this ChangeRetentionDetails. + :type is_override_global_retention_setting: bool + + """ + self.swagger_types = { + 'online_months': 'int', + 'offline_months': 'int', + 'is_override_global_retention_setting': 'bool' + } + + self.attribute_map = { + 'online_months': 'onlineMonths', + 'offline_months': 'offlineMonths', + 'is_override_global_retention_setting': 'isOverrideGlobalRetentionSetting' + } + + self._online_months = None + self._offline_months = None + self._is_override_global_retention_setting = None + + @property + def online_months(self): + """ + Gets the online_months of this ChangeRetentionDetails. + Indicates the number of months the audit records will be stored online in Oracle Data Safe audit repository for + immediate reporting and analysis. Minimum: 1; Maximum:12 months + + + :return: The online_months of this ChangeRetentionDetails. + :rtype: int + """ + return self._online_months + + @online_months.setter + def online_months(self, online_months): + """ + Sets the online_months of this ChangeRetentionDetails. + Indicates the number of months the audit records will be stored online in Oracle Data Safe audit repository for + immediate reporting and analysis. Minimum: 1; Maximum:12 months + + + :param online_months: The online_months of this ChangeRetentionDetails. + :type: int + """ + self._online_months = online_months + + @property + def offline_months(self): + """ + Gets the offline_months of this ChangeRetentionDetails. + Indicates the number of months the audit records will be stored offline in the Data Safe audit archive. + Minimum: 0; Maximum: 72 months. + If you have a requirement to store the audit data even longer in archive, please contact the Oracle Support. + + + :return: The offline_months of this ChangeRetentionDetails. + :rtype: int + """ + return self._offline_months + + @offline_months.setter + def offline_months(self, offline_months): + """ + Sets the offline_months of this ChangeRetentionDetails. + Indicates the number of months the audit records will be stored offline in the Data Safe audit archive. + Minimum: 0; Maximum: 72 months. + If you have a requirement to store the audit data even longer in archive, please contact the Oracle Support. + + + :param offline_months: The offline_months of this ChangeRetentionDetails. + :type: int + """ + self._offline_months = offline_months + + @property + def is_override_global_retention_setting(self): + """ + Gets the is_override_global_retention_setting of this ChangeRetentionDetails. + Indicates whether audit retention settings like online and offline months is set at the + target level overriding the global audit retention settings. + + + :return: The is_override_global_retention_setting of this ChangeRetentionDetails. + :rtype: bool + """ + return self._is_override_global_retention_setting + + @is_override_global_retention_setting.setter + def is_override_global_retention_setting(self, is_override_global_retention_setting): + """ + Sets the is_override_global_retention_setting of this ChangeRetentionDetails. + Indicates whether audit retention settings like online and offline months is set at the + target level overriding the global audit retention settings. + + + :param is_override_global_retention_setting: The is_override_global_retention_setting of this ChangeRetentionDetails. + :type: bool + """ + self._is_override_global_retention_setting = is_override_global_retention_setting + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_sensitive_data_model_compartment_details.py b/src/oci/data_safe/models/change_sensitive_data_model_compartment_details.py new file mode 100644 index 0000000000..2680c5c6f4 --- /dev/null +++ b/src/oci/data_safe/models/change_sensitive_data_model_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeSensitiveDataModelCompartmentDetails(object): + """ + Details to change the compartment of a sensitive data model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeSensitiveDataModelCompartmentDetails 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 ChangeSensitiveDataModelCompartmentDetails. + :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 ChangeSensitiveDataModelCompartmentDetails. + The OCID of the compartment where the sensitive data model should be moved. + + + :return: The compartment_id of this ChangeSensitiveDataModelCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeSensitiveDataModelCompartmentDetails. + The OCID of the compartment where the sensitive data model should be moved. + + + :param compartment_id: The compartment_id of this ChangeSensitiveDataModelCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_sensitive_type_compartment_details.py b/src/oci/data_safe/models/change_sensitive_type_compartment_details.py new file mode 100644 index 0000000000..a26c1241f7 --- /dev/null +++ b/src/oci/data_safe/models/change_sensitive_type_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeSensitiveTypeCompartmentDetails(object): + """ + Details to change the compartment of a sensitive type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeSensitiveTypeCompartmentDetails 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 ChangeSensitiveTypeCompartmentDetails. + :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 ChangeSensitiveTypeCompartmentDetails. + The OCID of the compartment where the sensitive type should be moved. + + + :return: The compartment_id of this ChangeSensitiveTypeCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeSensitiveTypeCompartmentDetails. + The OCID of the compartment where the sensitive type should be moved. + + + :param compartment_id: The compartment_id of this ChangeSensitiveTypeCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/change_target_alert_policy_association_compartment_details.py b/src/oci/data_safe/models/change_target_alert_policy_association_compartment_details.py new file mode 100644 index 0000000000..6708e9f200 --- /dev/null +++ b/src/oci/data_safe/models/change_target_alert_policy_association_compartment_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ChangeTargetAlertPolicyAssociationCompartmentDetails(object): + """ + The details used to change the compartment of a target-alert policy association. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ChangeTargetAlertPolicyAssociationCompartmentDetails 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 ChangeTargetAlertPolicyAssociationCompartmentDetails. + :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 ChangeTargetAlertPolicyAssociationCompartmentDetails. + The OCID of the new compartment to move the target-alert policy association to. + + + :return: The compartment_id of this ChangeTargetAlertPolicyAssociationCompartmentDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ChangeTargetAlertPolicyAssociationCompartmentDetails. + The OCID of the new compartment to move the target-alert policy association to. + + + :param compartment_id: The compartment_id of this ChangeTargetAlertPolicyAssociationCompartmentDetails. + :type: str + """ + self._compartment_id = compartment_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/collected_audit_volume_collection.py b/src/oci/data_safe/models/collected_audit_volume_collection.py new file mode 100644 index 0000000000..1275b8d45f --- /dev/null +++ b/src/oci/data_safe/models/collected_audit_volume_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CollectedAuditVolumeCollection(object): + """ + Collection of collected audit volume summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CollectedAuditVolumeCollection 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 CollectedAuditVolumeCollection. + :type items: list[oci.data_safe.models.CollectedAuditVolumeSummary] + + """ + self.swagger_types = { + 'items': 'list[CollectedAuditVolumeSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this CollectedAuditVolumeCollection. + Array of collected audit volume summary. + + + :return: The items of this CollectedAuditVolumeCollection. + :rtype: list[oci.data_safe.models.CollectedAuditVolumeSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this CollectedAuditVolumeCollection. + Array of collected audit volume summary. + + + :param items: The items of this CollectedAuditVolumeCollection. + :type: list[oci.data_safe.models.CollectedAuditVolumeSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/collected_audit_volume_summary.py b/src/oci/data_safe/models/collected_audit_volume_summary.py new file mode 100644 index 0000000000..715eed1892 --- /dev/null +++ b/src/oci/data_safe/models/collected_audit_volume_summary.py @@ -0,0 +1,167 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CollectedAuditVolumeSummary(object): + """ + The volume data point for audit data collected by datasafe. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CollectedAuditVolumeSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_profile_id: + The value to assign to the audit_profile_id property of this CollectedAuditVolumeSummary. + :type audit_profile_id: str + + :param month_in_consideration: + The value to assign to the month_in_consideration property of this CollectedAuditVolumeSummary. + :type month_in_consideration: datetime + + :param online_volume: + The value to assign to the online_volume property of this CollectedAuditVolumeSummary. + :type online_volume: int + + :param archived_volume: + The value to assign to the archived_volume property of this CollectedAuditVolumeSummary. + :type archived_volume: int + + """ + self.swagger_types = { + 'audit_profile_id': 'str', + 'month_in_consideration': 'datetime', + 'online_volume': 'int', + 'archived_volume': 'int' + } + + self.attribute_map = { + 'audit_profile_id': 'auditProfileId', + 'month_in_consideration': 'monthInConsideration', + 'online_volume': 'onlineVolume', + 'archived_volume': 'archivedVolume' + } + + self._audit_profile_id = None + self._month_in_consideration = None + self._online_volume = None + self._archived_volume = None + + @property + def audit_profile_id(self): + """ + **[Required]** Gets the audit_profile_id of this CollectedAuditVolumeSummary. + The OCID of the audit profile resource. + + + :return: The audit_profile_id of this CollectedAuditVolumeSummary. + :rtype: str + """ + return self._audit_profile_id + + @audit_profile_id.setter + def audit_profile_id(self, audit_profile_id): + """ + Sets the audit_profile_id of this CollectedAuditVolumeSummary. + The OCID of the audit profile resource. + + + :param audit_profile_id: The audit_profile_id of this CollectedAuditVolumeSummary. + :type: str + """ + self._audit_profile_id = audit_profile_id + + @property + def month_in_consideration(self): + """ + **[Required]** Gets the month_in_consideration of this CollectedAuditVolumeSummary. + Represents the month under consideration in which the aggregated audit data volume collected by Data Safe is displayed. + This field will be the UTC start of the day of the first day of the month for which the aggregate count corresponds to, in the format defined by RFC3339.. + For instance, the value of 01-01-2021T00:00:00Z represents Jan 2021. + + + :return: The month_in_consideration of this CollectedAuditVolumeSummary. + :rtype: datetime + """ + return self._month_in_consideration + + @month_in_consideration.setter + def month_in_consideration(self, month_in_consideration): + """ + Sets the month_in_consideration of this CollectedAuditVolumeSummary. + Represents the month under consideration in which the aggregated audit data volume collected by Data Safe is displayed. + This field will be the UTC start of the day of the first day of the month for which the aggregate count corresponds to, in the format defined by RFC3339.. + For instance, the value of 01-01-2021T00:00:00Z represents Jan 2021. + + + :param month_in_consideration: The month_in_consideration of this CollectedAuditVolumeSummary. + :type: datetime + """ + self._month_in_consideration = month_in_consideration + + @property + def online_volume(self): + """ + **[Required]** Gets the online_volume of this CollectedAuditVolumeSummary. + The audit data volume collected by Data Safe and is available online in repository. + + + :return: The online_volume of this CollectedAuditVolumeSummary. + :rtype: int + """ + return self._online_volume + + @online_volume.setter + def online_volume(self, online_volume): + """ + Sets the online_volume of this CollectedAuditVolumeSummary. + The audit data volume collected by Data Safe and is available online in repository. + + + :param online_volume: The online_volume of this CollectedAuditVolumeSummary. + :type: int + """ + self._online_volume = online_volume + + @property + def archived_volume(self): + """ + **[Required]** Gets the archived_volume of this CollectedAuditVolumeSummary. + The audit data volume collected by Data Safe and is available in archive storage. + + + :return: The archived_volume of this CollectedAuditVolumeSummary. + :rtype: int + """ + return self._archived_volume + + @archived_volume.setter + def archived_volume(self, archived_volume): + """ + Sets the archived_volume of this CollectedAuditVolumeSummary. + The audit data volume collected by Data Safe and is available in archive storage. + + + :param archived_volume: The archived_volume of this CollectedAuditVolumeSummary. + :type: int + """ + self._archived_volume = archived_volume + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column.py b/src/oci/data_safe/models/column.py new file mode 100644 index 0000000000..00dafc4301 --- /dev/null +++ b/src/oci/data_safe/models/column.py @@ -0,0 +1,194 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Column(object): + """ + Description of a column + """ + + def __init__(self, **kwargs): + """ + Initializes a new Column 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 Column. + :type display_name: str + + :param field_name: + The value to assign to the field_name property of this Column. + :type field_name: str + + :param data_type: + The value to assign to the data_type property of this Column. + :type data_type: str + + :param is_hidden: + The value to assign to the is_hidden property of this Column. + :type is_hidden: bool + + :param display_order: + The value to assign to the display_order property of this Column. + :type display_order: int + + """ + self.swagger_types = { + 'display_name': 'str', + 'field_name': 'str', + 'data_type': 'str', + 'is_hidden': 'bool', + 'display_order': 'int' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'field_name': 'fieldName', + 'data_type': 'dataType', + 'is_hidden': 'isHidden', + 'display_order': 'displayOrder' + } + + self._display_name = None + self._field_name = None + self._data_type = None + self._is_hidden = None + self._display_order = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Column. + Name of the column displayed on UI. + + + :return: The display_name of this Column. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Column. + Name of the column displayed on UI. + + + :param display_name: The display_name of this Column. + :type: str + """ + self._display_name = display_name + + @property + def field_name(self): + """ + **[Required]** Gets the field_name of this Column. + Specifies the corresponding field name in the data source. + + + :return: The field_name of this Column. + :rtype: str + """ + return self._field_name + + @field_name.setter + def field_name(self, field_name): + """ + Sets the field_name of this Column. + Specifies the corresponding field name in the data source. + + + :param field_name: The field_name of this Column. + :type: str + """ + self._field_name = field_name + + @property + def data_type(self): + """ + Gets the data_type of this Column. + Specifies the data type of the column. + + + :return: The data_type of this Column. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this Column. + Specifies the data type of the column. + + + :param data_type: The data_type of this Column. + :type: str + """ + self._data_type = data_type + + @property + def is_hidden(self): + """ + **[Required]** Gets the is_hidden of this Column. + Indicates if the column is hidden. Values can either be 'true' or 'false'. + + + :return: The is_hidden of this Column. + :rtype: bool + """ + return self._is_hidden + + @is_hidden.setter + def is_hidden(self, is_hidden): + """ + Sets the is_hidden of this Column. + Indicates if the column is hidden. Values can either be 'true' or 'false'. + + + :param is_hidden: The is_hidden of this Column. + :type: bool + """ + self._is_hidden = is_hidden + + @property + def display_order(self): + """ + **[Required]** Gets the display_order of this Column. + Specifies the display order of the column. + + + :return: The display_order of this Column. + :rtype: int + """ + return self._display_order + + @display_order.setter + def display_order(self, display_order): + """ + Sets the display_order of this Column. + Specifies the display order of the column. + + + :param display_order: The display_order of this Column. + :type: int + """ + self._display_order = display_order + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column_filter.py b/src/oci/data_safe/models/column_filter.py new file mode 100644 index 0000000000..b9aa76284c --- /dev/null +++ b/src/oci/data_safe/models/column_filter.py @@ -0,0 +1,250 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ColumnFilter(object): + """ + Filters that are applied to the data at the column level. + """ + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "IN" + OPERATOR_IN = "IN" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "EQ" + OPERATOR_EQ = "EQ" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "GT" + OPERATOR_GT = "GT" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "GE" + OPERATOR_GE = "GE" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "LT" + OPERATOR_LT = "LT" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "LE" + OPERATOR_LE = "LE" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "AND" + OPERATOR_AND = "AND" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "OR" + OPERATOR_OR = "OR" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "NE" + OPERATOR_NE = "NE" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "CO" + OPERATOR_CO = "CO" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "NOT" + OPERATOR_NOT = "NOT" + + #: A constant which can be used with the operator property of a ColumnFilter. + #: This constant has a value of "NOT_IN" + OPERATOR_NOT_IN = "NOT_IN" + + def __init__(self, **kwargs): + """ + Initializes a new ColumnFilter object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param field_name: + The value to assign to the field_name property of this ColumnFilter. + :type field_name: str + + :param operator: + The value to assign to the operator property of this ColumnFilter. + Allowed values for this property are: "IN", "EQ", "GT", "GE", "LT", "LE", "AND", "OR", "NE", "CO", "NOT", "NOT_IN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operator: str + + :param expressions: + The value to assign to the expressions property of this ColumnFilter. + :type expressions: list[str] + + :param is_enabled: + The value to assign to the is_enabled property of this ColumnFilter. + :type is_enabled: bool + + :param is_hidden: + The value to assign to the is_hidden property of this ColumnFilter. + :type is_hidden: bool + + """ + self.swagger_types = { + 'field_name': 'str', + 'operator': 'str', + 'expressions': 'list[str]', + 'is_enabled': 'bool', + 'is_hidden': 'bool' + } + + self.attribute_map = { + 'field_name': 'fieldName', + 'operator': 'operator', + 'expressions': 'expressions', + 'is_enabled': 'isEnabled', + 'is_hidden': 'isHidden' + } + + self._field_name = None + self._operator = None + self._expressions = None + self._is_enabled = None + self._is_hidden = None + + @property + def field_name(self): + """ + **[Required]** Gets the field_name of this ColumnFilter. + Name of the column on which the filter must be applied. + + + :return: The field_name of this ColumnFilter. + :rtype: str + """ + return self._field_name + + @field_name.setter + def field_name(self, field_name): + """ + Sets the field_name of this ColumnFilter. + Name of the column on which the filter must be applied. + + + :param field_name: The field_name of this ColumnFilter. + :type: str + """ + self._field_name = field_name + + @property + def operator(self): + """ + **[Required]** Gets the operator of this ColumnFilter. + Specifies the type of operator that must be applied for example in, eq etc. + + Allowed values for this property are: "IN", "EQ", "GT", "GE", "LT", "LE", "AND", "OR", "NE", "CO", "NOT", "NOT_IN", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operator of this ColumnFilter. + :rtype: str + """ + return self._operator + + @operator.setter + def operator(self, operator): + """ + Sets the operator of this ColumnFilter. + Specifies the type of operator that must be applied for example in, eq etc. + + + :param operator: The operator of this ColumnFilter. + :type: str + """ + allowed_values = ["IN", "EQ", "GT", "GE", "LT", "LE", "AND", "OR", "NE", "CO", "NOT", "NOT_IN"] + if not value_allowed_none_or_none_sentinel(operator, allowed_values): + operator = 'UNKNOWN_ENUM_VALUE' + self._operator = operator + + @property + def expressions(self): + """ + **[Required]** Gets the expressions of this ColumnFilter. + An array of expressions based on the operator type. A filter may have one or more expressions. + + + :return: The expressions of this ColumnFilter. + :rtype: list[str] + """ + return self._expressions + + @expressions.setter + def expressions(self, expressions): + """ + Sets the expressions of this ColumnFilter. + An array of expressions based on the operator type. A filter may have one or more expressions. + + + :param expressions: The expressions of this ColumnFilter. + :type: list[str] + """ + self._expressions = expressions + + @property + def is_enabled(self): + """ + **[Required]** Gets the is_enabled of this ColumnFilter. + Indicates if the filter is enabled. Values can either be 'true' or 'false'. + + + :return: The is_enabled of this ColumnFilter. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this ColumnFilter. + Indicates if the filter is enabled. Values can either be 'true' or 'false'. + + + :param is_enabled: The is_enabled of this ColumnFilter. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def is_hidden(self): + """ + **[Required]** Gets the is_hidden of this ColumnFilter. + Indicates if the filter is hidden. Values can either be 'true' or 'false'. + + + :return: The is_hidden of this ColumnFilter. + :rtype: bool + """ + return self._is_hidden + + @is_hidden.setter + def is_hidden(self, is_hidden): + """ + Sets the is_hidden of this ColumnFilter. + Indicates if the filter is hidden. Values can either be 'true' or 'false'. + + + :param is_hidden: The is_hidden of this ColumnFilter. + :type: bool + """ + self._is_hidden = is_hidden + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column_sorting.py b/src/oci/data_safe/models/column_sorting.py new file mode 100644 index 0000000000..0c27fb541d --- /dev/null +++ b/src/oci/data_safe/models/column_sorting.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ColumnSorting(object): + """ + Sorting the data at the column level. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ColumnSorting object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param field_name: + The value to assign to the field_name property of this ColumnSorting. + :type field_name: str + + :param is_ascending: + The value to assign to the is_ascending property of this ColumnSorting. + :type is_ascending: bool + + :param sorting_order: + The value to assign to the sorting_order property of this ColumnSorting. + :type sorting_order: int + + """ + self.swagger_types = { + 'field_name': 'str', + 'is_ascending': 'bool', + 'sorting_order': 'int' + } + + self.attribute_map = { + 'field_name': 'fieldName', + 'is_ascending': 'isAscending', + 'sorting_order': 'sortingOrder' + } + + self._field_name = None + self._is_ascending = None + self._sorting_order = None + + @property + def field_name(self): + """ + **[Required]** Gets the field_name of this ColumnSorting. + Name of the column that must be sorted. + + + :return: The field_name of this ColumnSorting. + :rtype: str + """ + return self._field_name + + @field_name.setter + def field_name(self, field_name): + """ + Sets the field_name of this ColumnSorting. + Name of the column that must be sorted. + + + :param field_name: The field_name of this ColumnSorting. + :type: str + """ + self._field_name = field_name + + @property + def is_ascending(self): + """ + **[Required]** Gets the is_ascending of this ColumnSorting. + Indicates if the column must be sorted in ascending order. Values can either be 'true' or 'false'. + + + :return: The is_ascending of this ColumnSorting. + :rtype: bool + """ + return self._is_ascending + + @is_ascending.setter + def is_ascending(self, is_ascending): + """ + Sets the is_ascending of this ColumnSorting. + Indicates if the column must be sorted in ascending order. Values can either be 'true' or 'false'. + + + :param is_ascending: The is_ascending of this ColumnSorting. + :type: bool + """ + self._is_ascending = is_ascending + + @property + def sorting_order(self): + """ + **[Required]** Gets the sorting_order of this ColumnSorting. + Indicates the order at which column must be sorted. + + + :return: The sorting_order of this ColumnSorting. + :rtype: int + """ + return self._sorting_order + + @sorting_order.setter + def sorting_order(self, sorting_order): + """ + Sets the sorting_order of this ColumnSorting. + Indicates the order at which column must be sorted. + + + :param sorting_order: The sorting_order of this ColumnSorting. + :type: int + """ + self._sorting_order = sorting_order + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column_source_details.py b/src/oci/data_safe/models/column_source_details.py new file mode 100644 index 0000000000..e967d7045e --- /dev/null +++ b/src/oci/data_safe/models/column_source_details.py @@ -0,0 +1,107 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ColumnSourceDetails(object): + """ + The source of masking columns. + """ + + #: A constant which can be used with the column_source property of a ColumnSourceDetails. + #: This constant has a value of "TARGET" + COLUMN_SOURCE_TARGET = "TARGET" + + #: A constant which can be used with the column_source property of a ColumnSourceDetails. + #: This constant has a value of "SENSITIVE_DATA_MODEL" + COLUMN_SOURCE_SENSITIVE_DATA_MODEL = "SENSITIVE_DATA_MODEL" + + def __init__(self, **kwargs): + """ + Initializes a new ColumnSourceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.ColumnSourceFromSdmDetails` + * :class:`~oci.data_safe.models.ColumnSourceFromTargetDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this ColumnSourceDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type column_source: str + + """ + self.swagger_types = { + 'column_source': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource' + } + + self._column_source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['columnSource'] + + if type == 'SENSITIVE_DATA_MODEL': + return 'ColumnSourceFromSdmDetails' + + if type == 'TARGET': + return 'ColumnSourceFromTargetDetails' + else: + return 'ColumnSourceDetails' + + @property + def column_source(self): + """ + **[Required]** Gets the column_source of this ColumnSourceDetails. + The source of masking columns. + + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The column_source of this ColumnSourceDetails. + :rtype: str + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this ColumnSourceDetails. + The source of masking columns. + + + :param column_source: The column_source of this ColumnSourceDetails. + :type: str + """ + allowed_values = ["TARGET", "SENSITIVE_DATA_MODEL"] + if not value_allowed_none_or_none_sentinel(column_source, allowed_values): + column_source = 'UNKNOWN_ENUM_VALUE' + self._column_source = column_source + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column_source_from_sdm_details.py b/src/oci/data_safe/models/column_source_from_sdm_details.py new file mode 100644 index 0000000000..eb7275113e --- /dev/null +++ b/src/oci/data_safe/models/column_source_from_sdm_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .column_source_details import ColumnSourceDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ColumnSourceFromSdmDetails(ColumnSourceDetails): + """ + Details of the sensitive data model that's used as the source of masking columns.. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ColumnSourceFromSdmDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.ColumnSourceFromSdmDetails.column_source` attribute + of this class is ``SENSITIVE_DATA_MODEL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this ColumnSourceFromSdmDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this ColumnSourceFromSdmDetails. + :type sensitive_data_model_id: str + + """ + self.swagger_types = { + 'column_source': 'str', + 'sensitive_data_model_id': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource', + 'sensitive_data_model_id': 'sensitiveDataModelId' + } + + self._column_source = None + self._sensitive_data_model_id = None + self._column_source = 'SENSITIVE_DATA_MODEL' + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this ColumnSourceFromSdmDetails. + The OCID of the sensitive data model that's used as the source of masking columns. + + + :return: The sensitive_data_model_id of this ColumnSourceFromSdmDetails. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this ColumnSourceFromSdmDetails. + The OCID of the sensitive data model that's used as the source of masking columns. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this ColumnSourceFromSdmDetails. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column_source_from_target_details.py b/src/oci/data_safe/models/column_source_from_target_details.py new file mode 100644 index 0000000000..9590de8873 --- /dev/null +++ b/src/oci/data_safe/models/column_source_from_target_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .column_source_details import ColumnSourceDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ColumnSourceFromTargetDetails(ColumnSourceDetails): + """ + Details of the target database that's used as the source of masking columns. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ColumnSourceFromTargetDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.ColumnSourceFromTargetDetails.column_source` attribute + of this class is ``TARGET`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this ColumnSourceFromTargetDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + :param target_id: + The value to assign to the target_id property of this ColumnSourceFromTargetDetails. + :type target_id: str + + """ + self.swagger_types = { + 'column_source': 'str', + 'target_id': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource', + 'target_id': 'targetId' + } + + self._column_source = None + self._target_id = None + self._column_source = 'TARGET' + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this ColumnSourceFromTargetDetails. + The OCID of the target database that's used as the source of masking columns. + + + :return: The target_id of this ColumnSourceFromTargetDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this ColumnSourceFromTargetDetails. + The OCID of the target database that's used as the source of masking columns. + + + :param target_id: The target_id of this ColumnSourceFromTargetDetails. + :type: str + """ + self._target_id = target_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/column_summary.py b/src/oci/data_safe/models/column_summary.py new file mode 100644 index 0000000000..4ee538a587 --- /dev/null +++ b/src/oci/data_safe/models/column_summary.py @@ -0,0 +1,287 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ColumnSummary(object): + """ + Details of a column in a table fetched from the database. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ColumnSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_name: + The value to assign to the column_name property of this ColumnSummary. + :type column_name: str + + :param data_type: + The value to assign to the data_type property of this ColumnSummary. + :type data_type: str + + :param length: + The value to assign to the length property of this ColumnSummary. + :type length: int + + :param precision: + The value to assign to the precision property of this ColumnSummary. + :type precision: int + + :param scale: + The value to assign to the scale property of this ColumnSummary. + :type scale: int + + :param character_length: + The value to assign to the character_length property of this ColumnSummary. + :type character_length: int + + :param table_name: + The value to assign to the table_name property of this ColumnSummary. + :type table_name: str + + :param schema_name: + The value to assign to the schema_name property of this ColumnSummary. + :type schema_name: str + + """ + self.swagger_types = { + 'column_name': 'str', + 'data_type': 'str', + 'length': 'int', + 'precision': 'int', + 'scale': 'int', + 'character_length': 'int', + 'table_name': 'str', + 'schema_name': 'str' + } + + self.attribute_map = { + 'column_name': 'columnName', + 'data_type': 'dataType', + 'length': 'length', + 'precision': 'precision', + 'scale': 'scale', + 'character_length': 'characterLength', + 'table_name': 'tableName', + 'schema_name': 'schemaName' + } + + self._column_name = None + self._data_type = None + self._length = None + self._precision = None + self._scale = None + self._character_length = None + self._table_name = None + self._schema_name = None + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this ColumnSummary. + Name of the column. + + + :return: The column_name of this ColumnSummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this ColumnSummary. + Name of the column. + + + :param column_name: The column_name of this ColumnSummary. + :type: str + """ + self._column_name = column_name + + @property + def data_type(self): + """ + **[Required]** Gets the data_type of this ColumnSummary. + Data type of the column. + + + :return: The data_type of this ColumnSummary. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this ColumnSummary. + Data type of the column. + + + :param data_type: The data_type of this ColumnSummary. + :type: str + """ + self._data_type = data_type + + @property + def length(self): + """ + **[Required]** Gets the length of this ColumnSummary. + Length of the data represented by the column. + + + :return: The length of this ColumnSummary. + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """ + Sets the length of this ColumnSummary. + Length of the data represented by the column. + + + :param length: The length of this ColumnSummary. + :type: int + """ + self._length = length + + @property + def precision(self): + """ + Gets the precision of this ColumnSummary. + Precision of the column. + + + :return: The precision of this ColumnSummary. + :rtype: int + """ + return self._precision + + @precision.setter + def precision(self, precision): + """ + Sets the precision of this ColumnSummary. + Precision of the column. + + + :param precision: The precision of this ColumnSummary. + :type: int + """ + self._precision = precision + + @property + def scale(self): + """ + Gets the scale of this ColumnSummary. + Scale of the column. + + + :return: The scale of this ColumnSummary. + :rtype: int + """ + return self._scale + + @scale.setter + def scale(self, scale): + """ + Sets the scale of this ColumnSummary. + Scale of the column. + + + :param scale: The scale of this ColumnSummary. + :type: int + """ + self._scale = scale + + @property + def character_length(self): + """ + Gets the character_length of this ColumnSummary. + Character length. + + + :return: The character_length of this ColumnSummary. + :rtype: int + """ + return self._character_length + + @character_length.setter + def character_length(self, character_length): + """ + Sets the character_length of this ColumnSummary. + Character length. + + + :param character_length: The character_length of this ColumnSummary. + :type: int + """ + self._character_length = character_length + + @property + def table_name(self): + """ + **[Required]** Gets the table_name of this ColumnSummary. + Name of the table. + + + :return: The table_name of this ColumnSummary. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this ColumnSummary. + Name of the table. + + + :param table_name: The table_name of this ColumnSummary. + :type: str + """ + self._table_name = table_name + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this ColumnSummary. + Name of the schema. + + + :return: The schema_name of this ColumnSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this ColumnSummary. + Name of the schema. + + + :param schema_name: The schema_name of this ColumnSummary. + :type: str + """ + self._schema_name = schema_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/data_safe/models/compatible_formats_for_data_types.py b/src/oci/data_safe/models/compatible_formats_for_data_types.py new file mode 100644 index 0000000000..f444ca49a2 --- /dev/null +++ b/src/oci/data_safe/models/compatible_formats_for_data_types.py @@ -0,0 +1,76 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CompatibleFormatsForDataTypes(object): + """ + A list of basic masking formats compatible with and grouped by the supported data types. The data types are grouped into + the following categories - + Character - Includes CHAR, NCHAR, VARCHAR2, and NVARCHAR2 + Numeric - Includes NUMBER, FLOAT, RAW, BINARY_FLOAT, and BINARY_DOUBLE + Date - Includes DATE and TIMESTAMP + LOB - Includes BLOB, CLOB, and NCLOB + All - Includes all the supported data types + """ + + def __init__(self, **kwargs): + """ + Initializes a new CompatibleFormatsForDataTypes object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param formats_for_data_type: + The value to assign to the formats_for_data_type property of this CompatibleFormatsForDataTypes. + :type formats_for_data_type: list[oci.data_safe.models.FormatsForDataType] + + """ + self.swagger_types = { + 'formats_for_data_type': 'list[FormatsForDataType]' + } + + self.attribute_map = { + 'formats_for_data_type': 'formatsForDataType' + } + + self._formats_for_data_type = None + + @property + def formats_for_data_type(self): + """ + **[Required]** Gets the formats_for_data_type of this CompatibleFormatsForDataTypes. + An array of lists of basic masking formats compatible with the supported data types. + + + :return: The formats_for_data_type of this CompatibleFormatsForDataTypes. + :rtype: list[oci.data_safe.models.FormatsForDataType] + """ + return self._formats_for_data_type + + @formats_for_data_type.setter + def formats_for_data_type(self, formats_for_data_type): + """ + Sets the formats_for_data_type of this CompatibleFormatsForDataTypes. + An array of lists of basic masking formats compatible with the supported data types. + + + :param formats_for_data_type: The formats_for_data_type of this CompatibleFormatsForDataTypes. + :type: list[oci.data_safe.models.FormatsForDataType] + """ + self._formats_for_data_type = formats_for_data_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/data_safe/models/compatible_formats_for_sensitive_types.py b/src/oci/data_safe/models/compatible_formats_for_sensitive_types.py new file mode 100644 index 0000000000..73a8fa1c6a --- /dev/null +++ b/src/oci/data_safe/models/compatible_formats_for_sensitive_types.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CompatibleFormatsForSensitiveTypes(object): + """ + The list of compatible masking formats grouped by generic sensitive types. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CompatibleFormatsForSensitiveTypes object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param formats_for_sensitive_type: + The value to assign to the formats_for_sensitive_type property of this CompatibleFormatsForSensitiveTypes. + :type formats_for_sensitive_type: list[oci.data_safe.models.FormatsForSensitiveType] + + """ + self.swagger_types = { + 'formats_for_sensitive_type': 'list[FormatsForSensitiveType]' + } + + self.attribute_map = { + 'formats_for_sensitive_type': 'formatsForSensitiveType' + } + + self._formats_for_sensitive_type = None + + @property + def formats_for_sensitive_type(self): + """ + **[Required]** Gets the formats_for_sensitive_type of this CompatibleFormatsForSensitiveTypes. + An array of library masking formats compatible with the existing sensitive types. + + + :return: The formats_for_sensitive_type of this CompatibleFormatsForSensitiveTypes. + :rtype: list[oci.data_safe.models.FormatsForSensitiveType] + """ + return self._formats_for_sensitive_type + + @formats_for_sensitive_type.setter + def formats_for_sensitive_type(self, formats_for_sensitive_type): + """ + Sets the formats_for_sensitive_type of this CompatibleFormatsForSensitiveTypes. + An array of library masking formats compatible with the existing sensitive types. + + + :param formats_for_sensitive_type: The formats_for_sensitive_type of this CompatibleFormatsForSensitiveTypes. + :type: list[oci.data_safe.models.FormatsForSensitiveType] + """ + self._formats_for_sensitive_type = formats_for_sensitive_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/data_safe/models/create_alert_policy_details.py b/src/oci/data_safe/models/create_alert_policy_details.py new file mode 100644 index 0000000000..fa9bfa0314 --- /dev/null +++ b/src/oci/data_safe/models/create_alert_policy_details.py @@ -0,0 +1,322 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAlertPolicyDetails(object): + """ + The details used to create a new alert policy. + """ + + #: A constant which can be used with the alert_policy_type property of a CreateAlertPolicyDetails. + #: This constant has a value of "AUDITING" + ALERT_POLICY_TYPE_AUDITING = "AUDITING" + + #: A constant which can be used with the alert_policy_type property of a CreateAlertPolicyDetails. + #: This constant has a value of "SECURITY_ASSESSMENT" + ALERT_POLICY_TYPE_SECURITY_ASSESSMENT = "SECURITY_ASSESSMENT" + + #: A constant which can be used with the alert_policy_type property of a CreateAlertPolicyDetails. + #: This constant has a value of "USER_ASSESSMENT" + ALERT_POLICY_TYPE_USER_ASSESSMENT = "USER_ASSESSMENT" + + #: A constant which can be used with the severity property of a CreateAlertPolicyDetails. + #: This constant has a value of "CRITICAL" + SEVERITY_CRITICAL = "CRITICAL" + + #: A constant which can be used with the severity property of a CreateAlertPolicyDetails. + #: This constant has a value of "HIGH" + SEVERITY_HIGH = "HIGH" + + #: A constant which can be used with the severity property of a CreateAlertPolicyDetails. + #: This constant has a value of "MEDIUM" + SEVERITY_MEDIUM = "MEDIUM" + + #: A constant which can be used with the severity property of a CreateAlertPolicyDetails. + #: This constant has a value of "LOW" + SEVERITY_LOW = "LOW" + + #: A constant which can be used with the severity property of a CreateAlertPolicyDetails. + #: This constant has a value of "EVALUATE" + SEVERITY_EVALUATE = "EVALUATE" + + def __init__(self, **kwargs): + """ + Initializes a new CreateAlertPolicyDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param alert_policy_type: + The value to assign to the alert_policy_type property of this CreateAlertPolicyDetails. + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT" + :type alert_policy_type: str + + :param display_name: + The value to assign to the display_name property of this CreateAlertPolicyDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateAlertPolicyDetails. + :type description: str + + :param severity: + The value to assign to the severity property of this CreateAlertPolicyDetails. + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE" + :type severity: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateAlertPolicyDetails. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAlertPolicyDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAlertPolicyDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'alert_policy_type': 'str', + 'display_name': 'str', + 'description': 'str', + 'severity': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'alert_policy_type': 'alertPolicyType', + 'display_name': 'displayName', + 'description': 'description', + 'severity': 'severity', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._alert_policy_type = None + self._display_name = None + self._description = None + self._severity = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def alert_policy_type(self): + """ + **[Required]** Gets the alert_policy_type of this CreateAlertPolicyDetails. + Indicates the Data Safe feature the alert policy belongs to + + Allowed values for this property are: "AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT" + + + :return: The alert_policy_type of this CreateAlertPolicyDetails. + :rtype: str + """ + return self._alert_policy_type + + @alert_policy_type.setter + def alert_policy_type(self, alert_policy_type): + """ + Sets the alert_policy_type of this CreateAlertPolicyDetails. + Indicates the Data Safe feature the alert policy belongs to + + + :param alert_policy_type: The alert_policy_type of this CreateAlertPolicyDetails. + :type: str + """ + allowed_values = ["AUDITING", "SECURITY_ASSESSMENT", "USER_ASSESSMENT"] + if not value_allowed_none_or_none_sentinel(alert_policy_type, allowed_values): + raise ValueError( + "Invalid value for `alert_policy_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._alert_policy_type = alert_policy_type + + @property + def display_name(self): + """ + Gets the display_name of this CreateAlertPolicyDetails. + The display name of the alert policy. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateAlertPolicyDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAlertPolicyDetails. + The display name of the alert policy. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateAlertPolicyDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateAlertPolicyDetails. + The description of the alert policy. + + + :return: The description of this CreateAlertPolicyDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAlertPolicyDetails. + The description of the alert policy. + + + :param description: The description of this CreateAlertPolicyDetails. + :type: str + """ + self._description = description + + @property + def severity(self): + """ + **[Required]** Gets the severity of this CreateAlertPolicyDetails. + Severity level of the alert raised by this policy. + + Allowed values for this property are: "CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE" + + + :return: The severity of this CreateAlertPolicyDetails. + :rtype: str + """ + return self._severity + + @severity.setter + def severity(self, severity): + """ + Sets the severity of this CreateAlertPolicyDetails. + Severity level of the alert raised by this policy. + + + :param severity: The severity of this CreateAlertPolicyDetails. + :type: str + """ + allowed_values = ["CRITICAL", "HIGH", "MEDIUM", "LOW", "EVALUATE"] + if not value_allowed_none_or_none_sentinel(severity, allowed_values): + raise ValueError( + "Invalid value for `severity`, must be None or one of {0}" + .format(allowed_values) + ) + self._severity = severity + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateAlertPolicyDetails. + The OCID of the compartment where you want to create the alert policy. + + + :return: The compartment_id of this CreateAlertPolicyDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateAlertPolicyDetails. + The OCID of the compartment where you want to create the alert policy. + + + :param compartment_id: The compartment_id of this CreateAlertPolicyDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateAlertPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateAlertPolicyDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateAlertPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateAlertPolicyDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateAlertPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateAlertPolicyDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateAlertPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateAlertPolicyDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_alert_policy_rule_details.py b/src/oci/data_safe/models/create_alert_policy_rule_details.py new file mode 100644 index 0000000000..92a6927cf7 --- /dev/null +++ b/src/oci/data_safe/models/create_alert_policy_rule_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAlertPolicyRuleDetails(object): + """ + The details used to create a new alert policy rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAlertPolicyRuleDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param expression: + The value to assign to the expression property of this CreateAlertPolicyRuleDetails. + :type expression: str + + :param description: + The value to assign to the description property of this CreateAlertPolicyRuleDetails. + :type description: str + + """ + self.swagger_types = { + 'expression': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'expression': 'expression', + 'description': 'description' + } + + self._expression = None + self._description = None + + @property + def expression(self): + """ + **[Required]** Gets the expression of this CreateAlertPolicyRuleDetails. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :return: The expression of this CreateAlertPolicyRuleDetails. + :rtype: str + """ + return self._expression + + @expression.setter + def expression(self, expression): + """ + Sets the expression of this CreateAlertPolicyRuleDetails. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :param expression: The expression of this CreateAlertPolicyRuleDetails. + :type: str + """ + self._expression = expression + + @property + def description(self): + """ + Gets the description of this CreateAlertPolicyRuleDetails. + Describes the alert policy rule. + + + :return: The description of this CreateAlertPolicyRuleDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAlertPolicyRuleDetails. + Describes the alert policy rule. + + + :param description: The description of this CreateAlertPolicyRuleDetails. + :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/data_safe/models/create_audit_archive_retrieval_details.py b/src/oci/data_safe/models/create_audit_archive_retrieval_details.py new file mode 100644 index 0000000000..93ef0a3743 --- /dev/null +++ b/src/oci/data_safe/models/create_audit_archive_retrieval_details.py @@ -0,0 +1,303 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAuditArchiveRetrievalDetails(object): + """ + Request details for creating a new archive retrieval. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAuditArchiveRetrievalDetails 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 CreateAuditArchiveRetrievalDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateAuditArchiveRetrievalDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateAuditArchiveRetrievalDetails. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this CreateAuditArchiveRetrievalDetails. + :type target_id: str + + :param start_date: + The value to assign to the start_date property of this CreateAuditArchiveRetrievalDetails. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this CreateAuditArchiveRetrievalDetails. + :type end_date: datetime + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAuditArchiveRetrievalDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAuditArchiveRetrievalDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'start_date': 'startDate', + 'end_date': 'endDate', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._target_id = None + self._start_date = None + self._end_date = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateAuditArchiveRetrievalDetails. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :return: The display_name of this CreateAuditArchiveRetrievalDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAuditArchiveRetrievalDetails. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :param display_name: The display_name of this CreateAuditArchiveRetrievalDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateAuditArchiveRetrievalDetails. + Description of the archive retrieval. + + + :return: The description of this CreateAuditArchiveRetrievalDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAuditArchiveRetrievalDetails. + Description of the archive retrieval. + + + :param description: The description of this CreateAuditArchiveRetrievalDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateAuditArchiveRetrievalDetails. + The OCID of the compartment that contains the archival retrieval. + + + :return: The compartment_id of this CreateAuditArchiveRetrievalDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateAuditArchiveRetrievalDetails. + The OCID of the compartment that contains the archival retrieval. + + + :param compartment_id: The compartment_id of this CreateAuditArchiveRetrievalDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this CreateAuditArchiveRetrievalDetails. + The OCID of the target associated with the archive retrieval. + + + :return: The target_id of this CreateAuditArchiveRetrievalDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this CreateAuditArchiveRetrievalDetails. + The OCID of the target associated with the archive retrieval. + + + :param target_id: The target_id of this CreateAuditArchiveRetrievalDetails. + :type: str + """ + self._target_id = target_id + + @property + def start_date(self): + """ + **[Required]** Gets the start_date of this CreateAuditArchiveRetrievalDetails. + Start month of the archive retrieval, in the format defined by RFC3339. + + + :return: The start_date of this CreateAuditArchiveRetrievalDetails. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this CreateAuditArchiveRetrievalDetails. + Start month of the archive retrieval, in the format defined by RFC3339. + + + :param start_date: The start_date of this CreateAuditArchiveRetrievalDetails. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + **[Required]** Gets the end_date of this CreateAuditArchiveRetrievalDetails. + End month of the archive retrieval, in the format defined by RFC3339. + + + :return: The end_date of this CreateAuditArchiveRetrievalDetails. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this CreateAuditArchiveRetrievalDetails. + End month of the archive retrieval, in the format defined by RFC3339. + + + :param end_date: The end_date of this CreateAuditArchiveRetrievalDetails. + :type: datetime + """ + self._end_date = end_date + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateAuditArchiveRetrievalDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateAuditArchiveRetrievalDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateAuditArchiveRetrievalDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateAuditArchiveRetrievalDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateAuditArchiveRetrievalDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateAuditArchiveRetrievalDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateAuditArchiveRetrievalDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateAuditArchiveRetrievalDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_audit_policy_details.py b/src/oci/data_safe/models/create_audit_policy_details.py new file mode 100644 index 0000000000..37bab39acf --- /dev/null +++ b/src/oci/data_safe/models/create_audit_policy_details.py @@ -0,0 +1,241 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAuditPolicyDetails(object): + """ + Details for the new audit policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAuditPolicyDetails 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 CreateAuditPolicyDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateAuditPolicyDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateAuditPolicyDetails. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this CreateAuditPolicyDetails. + :type target_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAuditPolicyDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAuditPolicyDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._compartment_id = None + self._target_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateAuditPolicyDetails. + The display name of the audit policy. The name does not have to be unique, and it is changeable. + + + :return: The display_name of this CreateAuditPolicyDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAuditPolicyDetails. + The display name of the audit policy. The name does not have to be unique, and it is changeable. + + + :param display_name: The display_name of this CreateAuditPolicyDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateAuditPolicyDetails. + The description of the audit policy. + + + :return: The description of this CreateAuditPolicyDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAuditPolicyDetails. + The description of the audit policy. + + + :param description: The description of this CreateAuditPolicyDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateAuditPolicyDetails. + The OCID of the compartment where you want to create the audit policy. + + + :return: The compartment_id of this CreateAuditPolicyDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateAuditPolicyDetails. + The OCID of the compartment where you want to create the audit policy. + + + :param compartment_id: The compartment_id of this CreateAuditPolicyDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this CreateAuditPolicyDetails. + The OCID of the target for which the audit policy has to be created. + + + :return: The target_id of this CreateAuditPolicyDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this CreateAuditPolicyDetails. + The OCID of the target for which the audit policy has to be created. + + + :param target_id: The target_id of this CreateAuditPolicyDetails. + :type: str + """ + self._target_id = target_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateAuditPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateAuditPolicyDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateAuditPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateAuditPolicyDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateAuditPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateAuditPolicyDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateAuditPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateAuditPolicyDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_audit_profile_details.py b/src/oci/data_safe/models/create_audit_profile_details.py new file mode 100644 index 0000000000..fb7239f690 --- /dev/null +++ b/src/oci/data_safe/models/create_audit_profile_details.py @@ -0,0 +1,276 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateAuditProfileDetails(object): + """ + The details used to create a new audit profile. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateAuditProfileDetails 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 CreateAuditProfileDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateAuditProfileDetails. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this CreateAuditProfileDetails. + :type target_id: str + + :param description: + The value to assign to the description property of this CreateAuditProfileDetails. + :type description: str + + :param is_paid_usage_enabled: + The value to assign to the is_paid_usage_enabled property of this CreateAuditProfileDetails. + :type is_paid_usage_enabled: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateAuditProfileDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateAuditProfileDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'description': 'str', + 'is_paid_usage_enabled': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'description': 'description', + 'is_paid_usage_enabled': 'isPaidUsageEnabled', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._compartment_id = None + self._target_id = None + self._description = None + self._is_paid_usage_enabled = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateAuditProfileDetails. + The display name of the audit profile. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateAuditProfileDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateAuditProfileDetails. + The display name of the audit profile. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateAuditProfileDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateAuditProfileDetails. + The OCID of the compartment where you want to create the audit profile. + + + :return: The compartment_id of this CreateAuditProfileDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateAuditProfileDetails. + The OCID of the compartment where you want to create the audit profile. + + + :param compartment_id: The compartment_id of this CreateAuditProfileDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this CreateAuditProfileDetails. + The OCID of the Data Safe target for which the audit profile is created. + + + :return: The target_id of this CreateAuditProfileDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this CreateAuditProfileDetails. + The OCID of the Data Safe target for which the audit profile is created. + + + :param target_id: The target_id of this CreateAuditProfileDetails. + :type: str + """ + self._target_id = target_id + + @property + def description(self): + """ + Gets the description of this CreateAuditProfileDetails. + The description of the audit profile. + + + :return: The description of this CreateAuditProfileDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateAuditProfileDetails. + The description of the audit profile. + + + :param description: The description of this CreateAuditProfileDetails. + :type: str + """ + self._description = description + + @property + def is_paid_usage_enabled(self): + """ + Gets the is_paid_usage_enabled of this CreateAuditProfileDetails. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :return: The is_paid_usage_enabled of this CreateAuditProfileDetails. + :rtype: bool + """ + return self._is_paid_usage_enabled + + @is_paid_usage_enabled.setter + def is_paid_usage_enabled(self, is_paid_usage_enabled): + """ + Sets the is_paid_usage_enabled of this CreateAuditProfileDetails. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :param is_paid_usage_enabled: The is_paid_usage_enabled of this CreateAuditProfileDetails. + :type: bool + """ + self._is_paid_usage_enabled = is_paid_usage_enabled + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateAuditProfileDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateAuditProfileDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateAuditProfileDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateAuditProfileDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateAuditProfileDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateAuditProfileDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateAuditProfileDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateAuditProfileDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_column_source_details.py b/src/oci/data_safe/models/create_column_source_details.py new file mode 100644 index 0000000000..aaf190e57e --- /dev/null +++ b/src/oci/data_safe/models/create_column_source_details.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateColumnSourceDetails(object): + """ + Details to associate a column source with a masking policy. + """ + + #: A constant which can be used with the column_source property of a CreateColumnSourceDetails. + #: This constant has a value of "TARGET" + COLUMN_SOURCE_TARGET = "TARGET" + + #: A constant which can be used with the column_source property of a CreateColumnSourceDetails. + #: This constant has a value of "SENSITIVE_DATA_MODEL" + COLUMN_SOURCE_SENSITIVE_DATA_MODEL = "SENSITIVE_DATA_MODEL" + + def __init__(self, **kwargs): + """ + Initializes a new CreateColumnSourceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.CreateColumnSourceFromTargetDetails` + * :class:`~oci.data_safe.models.CreateColumnSourceFromSdmDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this CreateColumnSourceDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + """ + self.swagger_types = { + 'column_source': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource' + } + + self._column_source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['columnSource'] + + if type == 'TARGET': + return 'CreateColumnSourceFromTargetDetails' + + if type == 'SENSITIVE_DATA_MODEL': + return 'CreateColumnSourceFromSdmDetails' + else: + return 'CreateColumnSourceDetails' + + @property + def column_source(self): + """ + **[Required]** Gets the column_source of this CreateColumnSourceDetails. + The source of masking columns. + + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + + + :return: The column_source of this CreateColumnSourceDetails. + :rtype: str + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this CreateColumnSourceDetails. + The source of masking columns. + + + :param column_source: The column_source of this CreateColumnSourceDetails. + :type: str + """ + allowed_values = ["TARGET", "SENSITIVE_DATA_MODEL"] + if not value_allowed_none_or_none_sentinel(column_source, allowed_values): + raise ValueError( + "Invalid value for `column_source`, must be None or one of {0}" + .format(allowed_values) + ) + self._column_source = column_source + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_column_source_from_sdm_details.py b/src/oci/data_safe/models/create_column_source_from_sdm_details.py new file mode 100644 index 0000000000..96c66a89b2 --- /dev/null +++ b/src/oci/data_safe/models/create_column_source_from_sdm_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_column_source_details import CreateColumnSourceDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateColumnSourceFromSdmDetails(CreateColumnSourceDetails): + """ + Details of the sensitive data model to be associated as the column source with a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateColumnSourceFromSdmDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.CreateColumnSourceFromSdmDetails.column_source` attribute + of this class is ``SENSITIVE_DATA_MODEL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this CreateColumnSourceFromSdmDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this CreateColumnSourceFromSdmDetails. + :type sensitive_data_model_id: str + + """ + self.swagger_types = { + 'column_source': 'str', + 'sensitive_data_model_id': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource', + 'sensitive_data_model_id': 'sensitiveDataModelId' + } + + self._column_source = None + self._sensitive_data_model_id = None + self._column_source = 'SENSITIVE_DATA_MODEL' + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this CreateColumnSourceFromSdmDetails. + The OCID of the sensitive data model to be associated as the column source with the masking policy. + + + :return: The sensitive_data_model_id of this CreateColumnSourceFromSdmDetails. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this CreateColumnSourceFromSdmDetails. + The OCID of the sensitive data model to be associated as the column source with the masking policy. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this CreateColumnSourceFromSdmDetails. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_column_source_from_target_details.py b/src/oci/data_safe/models/create_column_source_from_target_details.py new file mode 100644 index 0000000000..ef034845fe --- /dev/null +++ b/src/oci/data_safe/models/create_column_source_from_target_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_column_source_details import CreateColumnSourceDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateColumnSourceFromTargetDetails(CreateColumnSourceDetails): + """ + Details of the target database to be associated as the column source with a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateColumnSourceFromTargetDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.CreateColumnSourceFromTargetDetails.column_source` attribute + of this class is ``TARGET`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this CreateColumnSourceFromTargetDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + :param target_id: + The value to assign to the target_id property of this CreateColumnSourceFromTargetDetails. + :type target_id: str + + """ + self.swagger_types = { + 'column_source': 'str', + 'target_id': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource', + 'target_id': 'targetId' + } + + self._column_source = None + self._target_id = None + self._column_source = 'TARGET' + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this CreateColumnSourceFromTargetDetails. + The OCID of the target database to be associated as the column source with the masking policy. + + + :return: The target_id of this CreateColumnSourceFromTargetDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this CreateColumnSourceFromTargetDetails. + The OCID of the target database to be associated as the column source with the masking policy. + + + :param target_id: The target_id of this CreateColumnSourceFromTargetDetails. + :type: str + """ + self._target_id = target_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_discovery_job_details.py b/src/oci/data_safe/models/create_discovery_job_details.py new file mode 100644 index 0000000000..35e04ae550 --- /dev/null +++ b/src/oci/data_safe/models/create_discovery_job_details.py @@ -0,0 +1,465 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateDiscoveryJobDetails(object): + """ + Details to create a new data discovery job. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateDiscoveryJobDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param discovery_type: + The value to assign to the discovery_type property of this CreateDiscoveryJobDetails. + :type discovery_type: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this CreateDiscoveryJobDetails. + :type sensitive_data_model_id: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateDiscoveryJobDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateDiscoveryJobDetails. + :type display_name: str + + :param schemas_for_discovery: + The value to assign to the schemas_for_discovery property of this CreateDiscoveryJobDetails. + :type schemas_for_discovery: list[str] + + :param sensitive_type_ids_for_discovery: + The value to assign to the sensitive_type_ids_for_discovery property of this CreateDiscoveryJobDetails. + :type sensitive_type_ids_for_discovery: list[str] + + :param is_sample_data_collection_enabled: + The value to assign to the is_sample_data_collection_enabled property of this CreateDiscoveryJobDetails. + :type is_sample_data_collection_enabled: bool + + :param is_app_defined_relation_discovery_enabled: + The value to assign to the is_app_defined_relation_discovery_enabled property of this CreateDiscoveryJobDetails. + :type is_app_defined_relation_discovery_enabled: bool + + :param is_include_all_schemas: + The value to assign to the is_include_all_schemas property of this CreateDiscoveryJobDetails. + :type is_include_all_schemas: bool + + :param is_include_all_sensitive_types: + The value to assign to the is_include_all_sensitive_types property of this CreateDiscoveryJobDetails. + :type is_include_all_sensitive_types: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateDiscoveryJobDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateDiscoveryJobDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'discovery_type': 'str', + 'sensitive_data_model_id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'schemas_for_discovery': 'list[str]', + 'sensitive_type_ids_for_discovery': 'list[str]', + 'is_sample_data_collection_enabled': 'bool', + 'is_app_defined_relation_discovery_enabled': 'bool', + 'is_include_all_schemas': 'bool', + 'is_include_all_sensitive_types': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'discovery_type': 'discoveryType', + 'sensitive_data_model_id': 'sensitiveDataModelId', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'schemas_for_discovery': 'schemasForDiscovery', + 'sensitive_type_ids_for_discovery': 'sensitiveTypeIdsForDiscovery', + 'is_sample_data_collection_enabled': 'isSampleDataCollectionEnabled', + 'is_app_defined_relation_discovery_enabled': 'isAppDefinedRelationDiscoveryEnabled', + 'is_include_all_schemas': 'isIncludeAllSchemas', + 'is_include_all_sensitive_types': 'isIncludeAllSensitiveTypes', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._discovery_type = None + self._sensitive_data_model_id = None + self._compartment_id = None + self._display_name = None + self._schemas_for_discovery = None + self._sensitive_type_ids_for_discovery = None + self._is_sample_data_collection_enabled = None + self._is_app_defined_relation_discovery_enabled = None + self._is_include_all_schemas = None + self._is_include_all_sensitive_types = None + self._freeform_tags = None + self._defined_tags = None + + @property + def discovery_type(self): + """ + Gets the discovery_type of this CreateDiscoveryJobDetails. + The type of the discovery job. It defines the job's scope. + NEW identifies new sensitive columns in the target database that are not in the sensitive data model. + DELETED identifies columns that are present in the sensitive data model but have been deleted from the target database. + MODIFIED identifies columns that are present in the target database as well as the sensitive data model but some of their attributes have been modified. + ALL covers all the above three scenarios and reports new, deleted and modified columns. + + + :return: The discovery_type of this CreateDiscoveryJobDetails. + :rtype: str + """ + return self._discovery_type + + @discovery_type.setter + def discovery_type(self, discovery_type): + """ + Sets the discovery_type of this CreateDiscoveryJobDetails. + The type of the discovery job. It defines the job's scope. + NEW identifies new sensitive columns in the target database that are not in the sensitive data model. + DELETED identifies columns that are present in the sensitive data model but have been deleted from the target database. + MODIFIED identifies columns that are present in the target database as well as the sensitive data model but some of their attributes have been modified. + ALL covers all the above three scenarios and reports new, deleted and modified columns. + + + :param discovery_type: The discovery_type of this CreateDiscoveryJobDetails. + :type: str + """ + self._discovery_type = discovery_type + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this CreateDiscoveryJobDetails. + The OCID of the sensitive data model. + + + :return: The sensitive_data_model_id of this CreateDiscoveryJobDetails. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this CreateDiscoveryJobDetails. + The OCID of the sensitive data model. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this CreateDiscoveryJobDetails. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateDiscoveryJobDetails. + The OCID of the compartment where the discovery job resource should be created. + + + :return: The compartment_id of this CreateDiscoveryJobDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateDiscoveryJobDetails. + The OCID of the compartment where the discovery job resource should be created. + + + :param compartment_id: The compartment_id of this CreateDiscoveryJobDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateDiscoveryJobDetails. + A user-friendly name for the discovery job. Does not have to be unique, and it is changeable. Avoid entering confidential information. + + + :return: The display_name of this CreateDiscoveryJobDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateDiscoveryJobDetails. + A user-friendly name for the discovery job. Does not have to be unique, and it is changeable. Avoid entering confidential information. + + + :param display_name: The display_name of this CreateDiscoveryJobDetails. + :type: str + """ + self._display_name = display_name + + @property + def schemas_for_discovery(self): + """ + Gets the schemas_for_discovery of this CreateDiscoveryJobDetails. + The schemas to be scanned by the discovery job. If not provided, the schemasForDiscovery attribute of the sensitive + data model is used to get the list of schemas. + + + :return: The schemas_for_discovery of this CreateDiscoveryJobDetails. + :rtype: list[str] + """ + return self._schemas_for_discovery + + @schemas_for_discovery.setter + def schemas_for_discovery(self, schemas_for_discovery): + """ + Sets the schemas_for_discovery of this CreateDiscoveryJobDetails. + The schemas to be scanned by the discovery job. If not provided, the schemasForDiscovery attribute of the sensitive + data model is used to get the list of schemas. + + + :param schemas_for_discovery: The schemas_for_discovery of this CreateDiscoveryJobDetails. + :type: list[str] + """ + self._schemas_for_discovery = schemas_for_discovery + + @property + def sensitive_type_ids_for_discovery(self): + """ + Gets the sensitive_type_ids_for_discovery of this CreateDiscoveryJobDetails. + The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery + attribute of the sensitive data model is used to get the list of sensitive types. + + + :return: The sensitive_type_ids_for_discovery of this CreateDiscoveryJobDetails. + :rtype: list[str] + """ + return self._sensitive_type_ids_for_discovery + + @sensitive_type_ids_for_discovery.setter + def sensitive_type_ids_for_discovery(self, sensitive_type_ids_for_discovery): + """ + Sets the sensitive_type_ids_for_discovery of this CreateDiscoveryJobDetails. + The OCIDs of the sensitive types to be used by the discovery job. If not provided, the sensitiveTypeIdsForDiscovery + attribute of the sensitive data model is used to get the list of sensitive types. + + + :param sensitive_type_ids_for_discovery: The sensitive_type_ids_for_discovery of this CreateDiscoveryJobDetails. + :type: list[str] + """ + self._sensitive_type_ids_for_discovery = sensitive_type_ids_for_discovery + + @property + def is_sample_data_collection_enabled(self): + """ + Gets the is_sample_data_collection_enabled of this CreateDiscoveryJobDetails. + Indicates if the discovery job should collect and store sample data values for the discovered columns. Sample data + helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original + data from the target database, it's disabled by default and should be used only if it's acceptable to store sample + data in Data Safe's repository in Oracle Cloud. Note that sample data values are not collected for columns with the + following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :return: The is_sample_data_collection_enabled of this CreateDiscoveryJobDetails. + :rtype: bool + """ + return self._is_sample_data_collection_enabled + + @is_sample_data_collection_enabled.setter + def is_sample_data_collection_enabled(self, is_sample_data_collection_enabled): + """ + Sets the is_sample_data_collection_enabled of this CreateDiscoveryJobDetails. + Indicates if the discovery job should collect and store sample data values for the discovered columns. Sample data + helps review the discovered columns and ensure that they actually contain sensitive data. As it collects original + data from the target database, it's disabled by default and should be used only if it's acceptable to store sample + data in Data Safe's repository in Oracle Cloud. Note that sample data values are not collected for columns with the + following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :param is_sample_data_collection_enabled: The is_sample_data_collection_enabled of this CreateDiscoveryJobDetails. + :type: bool + """ + self._is_sample_data_collection_enabled = is_sample_data_collection_enabled + + @property + def is_app_defined_relation_discovery_enabled(self): + """ + Gets the is_app_defined_relation_discovery_enabled of this CreateDiscoveryJobDetails. + Indicates if the discovery job should identify potential application-level (non-dictionary) referential relationships + between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) + relationships. This option helps identify application-level relationships that are not defined in the database + dictionary, which in turn, helps identify additional sensitive columns and preserve referential integrity during + data masking. It's disabled by default and should be used only if there is a need to identify application-level + relationships. + + + :return: The is_app_defined_relation_discovery_enabled of this CreateDiscoveryJobDetails. + :rtype: bool + """ + return self._is_app_defined_relation_discovery_enabled + + @is_app_defined_relation_discovery_enabled.setter + def is_app_defined_relation_discovery_enabled(self, is_app_defined_relation_discovery_enabled): + """ + Sets the is_app_defined_relation_discovery_enabled of this CreateDiscoveryJobDetails. + Indicates if the discovery job should identify potential application-level (non-dictionary) referential relationships + between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) + relationships. This option helps identify application-level relationships that are not defined in the database + dictionary, which in turn, helps identify additional sensitive columns and preserve referential integrity during + data masking. It's disabled by default and should be used only if there is a need to identify application-level + relationships. + + + :param is_app_defined_relation_discovery_enabled: The is_app_defined_relation_discovery_enabled of this CreateDiscoveryJobDetails. + :type: bool + """ + self._is_app_defined_relation_discovery_enabled = is_app_defined_relation_discovery_enabled + + @property + def is_include_all_schemas(self): + """ + Gets the is_include_all_schemas of this CreateDiscoveryJobDetails. + Indicates if all the schemas should be scanned by the discovery job. If it's set to true, the schemasForDiscovery + attribute is ignored and all schemas are used for data discovery. If both attributes are not provided, the configuration + from the sensitive data model is used. + + + :return: The is_include_all_schemas of this CreateDiscoveryJobDetails. + :rtype: bool + """ + return self._is_include_all_schemas + + @is_include_all_schemas.setter + def is_include_all_schemas(self, is_include_all_schemas): + """ + Sets the is_include_all_schemas of this CreateDiscoveryJobDetails. + Indicates if all the schemas should be scanned by the discovery job. If it's set to true, the schemasForDiscovery + attribute is ignored and all schemas are used for data discovery. If both attributes are not provided, the configuration + from the sensitive data model is used. + + + :param is_include_all_schemas: The is_include_all_schemas of this CreateDiscoveryJobDetails. + :type: bool + """ + self._is_include_all_schemas = is_include_all_schemas + + @property + def is_include_all_sensitive_types(self): + """ + Gets the is_include_all_sensitive_types of this CreateDiscoveryJobDetails. + Indicates if all the existing sensitive types should be used by the discovery job. If it's set to true, the + sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. If both + attributes are not provided, the configuration from the sensitive data model is used. + + + :return: The is_include_all_sensitive_types of this CreateDiscoveryJobDetails. + :rtype: bool + """ + return self._is_include_all_sensitive_types + + @is_include_all_sensitive_types.setter + def is_include_all_sensitive_types(self, is_include_all_sensitive_types): + """ + Sets the is_include_all_sensitive_types of this CreateDiscoveryJobDetails. + Indicates if all the existing sensitive types should be used by the discovery job. If it's set to true, the + sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. If both + attributes are not provided, the configuration from the sensitive data model is used. + + + :param is_include_all_sensitive_types: The is_include_all_sensitive_types of this CreateDiscoveryJobDetails. + :type: bool + """ + self._is_include_all_sensitive_types = is_include_all_sensitive_types + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateDiscoveryJobDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateDiscoveryJobDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateDiscoveryJobDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateDiscoveryJobDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateDiscoveryJobDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateDiscoveryJobDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateDiscoveryJobDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateDiscoveryJobDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_library_masking_format_details.py b/src/oci/data_safe/models/create_library_masking_format_details.py new file mode 100644 index 0000000000..cc64ec00ed --- /dev/null +++ b/src/oci/data_safe/models/create_library_masking_format_details.py @@ -0,0 +1,277 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateLibraryMaskingFormatDetails(object): + """ + Details to create a library masking format, which can have one or more format entries. A format + entry can be a basic masking format such as Random Number, or it can be a library masking format. + The combined output of all the format entries is used for masking. It provides the flexibility + to define a masking format that can generate different parts of a data value separately and then + combine them to get the final data value for masking. Note that you cannot define masking + condition in a library masking format. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateLibraryMaskingFormatDetails 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 CreateLibraryMaskingFormatDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateLibraryMaskingFormatDetails. + :type compartment_id: str + + :param description: + The value to assign to the description property of this CreateLibraryMaskingFormatDetails. + :type description: str + + :param sensitive_type_ids: + The value to assign to the sensitive_type_ids property of this CreateLibraryMaskingFormatDetails. + :type sensitive_type_ids: list[str] + + :param format_entries: + The value to assign to the format_entries property of this CreateLibraryMaskingFormatDetails. + :type format_entries: list[oci.data_safe.models.FormatEntry] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateLibraryMaskingFormatDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateLibraryMaskingFormatDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'compartment_id': 'str', + 'description': 'str', + 'sensitive_type_ids': 'list[str]', + 'format_entries': 'list[FormatEntry]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'description': 'description', + 'sensitive_type_ids': 'sensitiveTypeIds', + 'format_entries': 'formatEntries', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._compartment_id = None + self._description = None + self._sensitive_type_ids = None + self._format_entries = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateLibraryMaskingFormatDetails. + The display name of the library masking format. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateLibraryMaskingFormatDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateLibraryMaskingFormatDetails. + The display name of the library masking format. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateLibraryMaskingFormatDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateLibraryMaskingFormatDetails. + The OCID of the compartment where the library masking format should be created. + + + :return: The compartment_id of this CreateLibraryMaskingFormatDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateLibraryMaskingFormatDetails. + The OCID of the compartment where the library masking format should be created. + + + :param compartment_id: The compartment_id of this CreateLibraryMaskingFormatDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def description(self): + """ + Gets the description of this CreateLibraryMaskingFormatDetails. + The description of the library masking format. + + + :return: The description of this CreateLibraryMaskingFormatDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateLibraryMaskingFormatDetails. + The description of the library masking format. + + + :param description: The description of this CreateLibraryMaskingFormatDetails. + :type: str + """ + self._description = description + + @property + def sensitive_type_ids(self): + """ + Gets the sensitive_type_ids of this CreateLibraryMaskingFormatDetails. + An array of OCIDs of the sensitive types compatible with the library masking format. It helps track the sensitive types for which the library masking format is being created. + + + :return: The sensitive_type_ids of this CreateLibraryMaskingFormatDetails. + :rtype: list[str] + """ + return self._sensitive_type_ids + + @sensitive_type_ids.setter + def sensitive_type_ids(self, sensitive_type_ids): + """ + Sets the sensitive_type_ids of this CreateLibraryMaskingFormatDetails. + An array of OCIDs of the sensitive types compatible with the library masking format. It helps track the sensitive types for which the library masking format is being created. + + + :param sensitive_type_ids: The sensitive_type_ids of this CreateLibraryMaskingFormatDetails. + :type: list[str] + """ + self._sensitive_type_ids = sensitive_type_ids + + @property + def format_entries(self): + """ + **[Required]** Gets the format_entries of this CreateLibraryMaskingFormatDetails. + An array of format entries. The combined output of all the format entries is used for masking. + + + :return: The format_entries of this CreateLibraryMaskingFormatDetails. + :rtype: list[oci.data_safe.models.FormatEntry] + """ + return self._format_entries + + @format_entries.setter + def format_entries(self, format_entries): + """ + Sets the format_entries of this CreateLibraryMaskingFormatDetails. + An array of format entries. The combined output of all the format entries is used for masking. + + + :param format_entries: The format_entries of this CreateLibraryMaskingFormatDetails. + :type: list[oci.data_safe.models.FormatEntry] + """ + self._format_entries = format_entries + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateLibraryMaskingFormatDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateLibraryMaskingFormatDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateLibraryMaskingFormatDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateLibraryMaskingFormatDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateLibraryMaskingFormatDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateLibraryMaskingFormatDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateLibraryMaskingFormatDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateLibraryMaskingFormatDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_masking_column_details.py b/src/oci/data_safe/models/create_masking_column_details.py new file mode 100644 index 0000000000..abfa753141 --- /dev/null +++ b/src/oci/data_safe/models/create_masking_column_details.py @@ -0,0 +1,358 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateMaskingColumnDetails(object): + """ + Details to create a new masking column. You can use this to add a parent column only. + It automatically adds the child columns from the associated sensitive data model or + target database. If you provide the sensitiveTypeId attribute but not the maskingFormats + attribute, it automatically assigns the default masking format associated with the + specified sensitive type. Alternatively, if you provide the maskingFormats attribute, + the specified masking formats are assigned to the column. + + Using the maskingFormats attribute, you can assign one or more masking formats to a + column. You can specify a condition as part of each masking format. It enables you + to do conditional masking + so that you can mask the column data values differently using different masking formats + and the associated conditions. A masking format can have one or more format entries. + The combined output of all the format entries is used for masking. It provides the + flexibility to define a masking format that can generate different parts of a data + value separately and then combine them to get the final data value for masking. + + You can use the maskingColumnGroup attribute to group the columns that you would like + to mask together. It enables you to do + group or compound masking + that ensures that the masked data across the columns in a group continue to retain + the same logical relationship. + """ + + #: A constant which can be used with the object_type property of a CreateMaskingColumnDetails. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a CreateMaskingColumnDetails. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + def __init__(self, **kwargs): + """ + Initializes a new CreateMaskingColumnDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schema_name: + The value to assign to the schema_name property of this CreateMaskingColumnDetails. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this CreateMaskingColumnDetails. + :type object_name: str + + :param object_type: + The value to assign to the object_type property of this CreateMaskingColumnDetails. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW" + :type object_type: str + + :param column_name: + The value to assign to the column_name property of this CreateMaskingColumnDetails. + :type column_name: str + + :param masking_column_group: + The value to assign to the masking_column_group property of this CreateMaskingColumnDetails. + :type masking_column_group: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this CreateMaskingColumnDetails. + :type sensitive_type_id: str + + :param is_masking_enabled: + The value to assign to the is_masking_enabled property of this CreateMaskingColumnDetails. + :type is_masking_enabled: bool + + :param masking_formats: + The value to assign to the masking_formats property of this CreateMaskingColumnDetails. + :type masking_formats: list[oci.data_safe.models.MaskingFormat] + + """ + self.swagger_types = { + 'schema_name': 'str', + 'object_name': 'str', + 'object_type': 'str', + 'column_name': 'str', + 'masking_column_group': 'str', + 'sensitive_type_id': 'str', + 'is_masking_enabled': 'bool', + 'masking_formats': 'list[MaskingFormat]' + } + + self.attribute_map = { + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'object_type': 'objectType', + 'column_name': 'columnName', + 'masking_column_group': 'maskingColumnGroup', + 'sensitive_type_id': 'sensitiveTypeId', + 'is_masking_enabled': 'isMaskingEnabled', + 'masking_formats': 'maskingFormats' + } + + self._schema_name = None + self._object_name = None + self._object_type = None + self._column_name = None + self._masking_column_group = None + self._sensitive_type_id = None + self._is_masking_enabled = None + self._masking_formats = None + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this CreateMaskingColumnDetails. + The name of the schema that contains the database column. This attribute cannot be updated for an existing masking column. + + + :return: The schema_name of this CreateMaskingColumnDetails. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this CreateMaskingColumnDetails. + The name of the schema that contains the database column. This attribute cannot be updated for an existing masking column. + + + :param schema_name: The schema_name of this CreateMaskingColumnDetails. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this CreateMaskingColumnDetails. + The name of the object (table or editioning view) that contains the database column. This attribute cannot be updated for an existing masking column. + + + :return: The object_name of this CreateMaskingColumnDetails. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this CreateMaskingColumnDetails. + The name of the object (table or editioning view) that contains the database column. This attribute cannot be updated for an existing masking column. + + + :param object_name: The object_name of this CreateMaskingColumnDetails. + :type: str + """ + self._object_name = object_name + + @property + def object_type(self): + """ + Gets the object_type of this CreateMaskingColumnDetails. + The type of the object that contains the database column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW" + + + :return: The object_type of this CreateMaskingColumnDetails. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this CreateMaskingColumnDetails. + The type of the object that contains the database column. + + + :param object_type: The object_type of this CreateMaskingColumnDetails. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + raise ValueError( + "Invalid value for `object_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._object_type = object_type + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this CreateMaskingColumnDetails. + The name of the database column. This attribute cannot be updated for an existing + masking column. Note that the same name is used for the masking column. There + is no separate displayName attribute for the masking column. + + + :return: The column_name of this CreateMaskingColumnDetails. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this CreateMaskingColumnDetails. + The name of the database column. This attribute cannot be updated for an existing + masking column. Note that the same name is used for the masking column. There + is no separate displayName attribute for the masking column. + + + :param column_name: The column_name of this CreateMaskingColumnDetails. + :type: str + """ + self._column_name = column_name + + @property + def masking_column_group(self): + """ + Gets the masking_column_group of this CreateMaskingColumnDetails. + The group of the masking column. It's a masking group identifier and can be any string + of acceptable length. All the columns in a group are masked together to ensure that + the masked data across these columns continue to retain the same logical relationship. + For more details, check + Group Masking in the Data Safe documentation. + + + :return: The masking_column_group of this CreateMaskingColumnDetails. + :rtype: str + """ + return self._masking_column_group + + @masking_column_group.setter + def masking_column_group(self, masking_column_group): + """ + Sets the masking_column_group of this CreateMaskingColumnDetails. + The group of the masking column. It's a masking group identifier and can be any string + of acceptable length. All the columns in a group are masked together to ensure that + the masked data across these columns continue to retain the same logical relationship. + For more details, check + Group Masking in the Data Safe documentation. + + + :param masking_column_group: The masking_column_group of this CreateMaskingColumnDetails. + :type: str + """ + self._masking_column_group = masking_column_group + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this CreateMaskingColumnDetails. + The OCID of the sensitive type to be associated with the masking column. Note that + if the maskingFormats attribute isn't provided while creating a masking column, + the default masking format associated with the specified sensitive type is assigned + to the masking column. + + + :return: The sensitive_type_id of this CreateMaskingColumnDetails. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this CreateMaskingColumnDetails. + The OCID of the sensitive type to be associated with the masking column. Note that + if the maskingFormats attribute isn't provided while creating a masking column, + the default masking format associated with the specified sensitive type is assigned + to the masking column. + + + :param sensitive_type_id: The sensitive_type_id of this CreateMaskingColumnDetails. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def is_masking_enabled(self): + """ + Gets the is_masking_enabled of this CreateMaskingColumnDetails. + Indicates if data masking is enabled for the masking column. Set it to false if + you don't want to mask the column. + + + :return: The is_masking_enabled of this CreateMaskingColumnDetails. + :rtype: bool + """ + return self._is_masking_enabled + + @is_masking_enabled.setter + def is_masking_enabled(self, is_masking_enabled): + """ + Sets the is_masking_enabled of this CreateMaskingColumnDetails. + Indicates if data masking is enabled for the masking column. Set it to false if + you don't want to mask the column. + + + :param is_masking_enabled: The is_masking_enabled of this CreateMaskingColumnDetails. + :type: bool + """ + self._is_masking_enabled = is_masking_enabled + + @property + def masking_formats(self): + """ + Gets the masking_formats of this CreateMaskingColumnDetails. + The masking formats to be assigned to the masking column. You can specify a condition + as part of each masking format. It enables you to do + conditional masking + so that you can mask the column data values differently using different masking + formats and the associated conditions. A masking format can have one or more format + entries. The combined output of all the format entries is used for masking. It + provides the flexibility to define a masking format that can generate different parts + of a data value separately and then combine them to get the final data value for masking. + + + :return: The masking_formats of this CreateMaskingColumnDetails. + :rtype: list[oci.data_safe.models.MaskingFormat] + """ + return self._masking_formats + + @masking_formats.setter + def masking_formats(self, masking_formats): + """ + Sets the masking_formats of this CreateMaskingColumnDetails. + The masking formats to be assigned to the masking column. You can specify a condition + as part of each masking format. It enables you to do + conditional masking + so that you can mask the column data values differently using different masking + formats and the associated conditions. A masking format can have one or more format + entries. The combined output of all the format entries is used for masking. It + provides the flexibility to define a masking format that can generate different parts + of a data value separately and then combine them to get the final data value for masking. + + + :param masking_formats: The masking_formats of this CreateMaskingColumnDetails. + :type: list[oci.data_safe.models.MaskingFormat] + """ + self._masking_formats = masking_formats + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_masking_policy_details.py b/src/oci/data_safe/models/create_masking_policy_details.py new file mode 100644 index 0000000000..5ebf992a41 --- /dev/null +++ b/src/oci/data_safe/models/create_masking_policy_details.py @@ -0,0 +1,505 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateMaskingPolicyDetails(object): + """ + Details to create a new masking policy. Use either a sensitive data model or a reference + target database to create your masking policy. + + To use a sensitive data model as the source of masking columns, set the columnSource + attribute to SENSITIVE_DATA_MODEL and provide the sensitiveDataModelId attribute. After + creating a masking policy, you can use the AddMaskingColumnsFromSdm operation to automatically + add all the columns from the associated sensitive data model. In this case, the target + database associated with the sensitive data model is used for column and masking format validations. + + You can also create a masking policy without using a sensitive data model. In this case, + you need to associate your masking policy with a target database by setting the columnSource + attribute to TARGET and providing the targetId attribute. The specified target database is + used for column and masking format validations. + + After creating a masking policy, you can use the CreateMaskingColumn or PatchMaskingColumns + operation to manually add columns to the policy. You need to add the parent columns only, + and it automatically adds the child columns (in referential relationship with the parent + columns) from the associated sensitive data model or target database. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateMaskingPolicyDetails 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 CreateMaskingPolicyDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateMaskingPolicyDetails. + :type compartment_id: str + + :param description: + The value to assign to the description property of this CreateMaskingPolicyDetails. + :type description: str + + :param is_drop_temp_tables_enabled: + The value to assign to the is_drop_temp_tables_enabled property of this CreateMaskingPolicyDetails. + :type is_drop_temp_tables_enabled: bool + + :param is_redo_logging_enabled: + The value to assign to the is_redo_logging_enabled property of this CreateMaskingPolicyDetails. + :type is_redo_logging_enabled: bool + + :param is_refresh_stats_enabled: + The value to assign to the is_refresh_stats_enabled property of this CreateMaskingPolicyDetails. + :type is_refresh_stats_enabled: bool + + :param parallel_degree: + The value to assign to the parallel_degree property of this CreateMaskingPolicyDetails. + :type parallel_degree: str + + :param recompile: + The value to assign to the recompile property of this CreateMaskingPolicyDetails. + :type recompile: str + + :param pre_masking_script: + The value to assign to the pre_masking_script property of this CreateMaskingPolicyDetails. + :type pre_masking_script: str + + :param post_masking_script: + The value to assign to the post_masking_script property of this CreateMaskingPolicyDetails. + :type post_masking_script: str + + :param column_source: + The value to assign to the column_source property of this CreateMaskingPolicyDetails. + :type column_source: oci.data_safe.models.CreateColumnSourceDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateMaskingPolicyDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateMaskingPolicyDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'compartment_id': 'str', + 'description': 'str', + 'is_drop_temp_tables_enabled': 'bool', + 'is_redo_logging_enabled': 'bool', + 'is_refresh_stats_enabled': 'bool', + 'parallel_degree': 'str', + 'recompile': 'str', + 'pre_masking_script': 'str', + 'post_masking_script': 'str', + 'column_source': 'CreateColumnSourceDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'description': 'description', + 'is_drop_temp_tables_enabled': 'isDropTempTablesEnabled', + 'is_redo_logging_enabled': 'isRedoLoggingEnabled', + 'is_refresh_stats_enabled': 'isRefreshStatsEnabled', + 'parallel_degree': 'parallelDegree', + 'recompile': 'recompile', + 'pre_masking_script': 'preMaskingScript', + 'post_masking_script': 'postMaskingScript', + 'column_source': 'columnSource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._compartment_id = None + self._description = None + self._is_drop_temp_tables_enabled = None + self._is_redo_logging_enabled = None + self._is_refresh_stats_enabled = None + self._parallel_degree = None + self._recompile = None + self._pre_masking_script = None + self._post_masking_script = None + self._column_source = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateMaskingPolicyDetails. + The display name of the masking policy. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateMaskingPolicyDetails. + The display name of the masking policy. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateMaskingPolicyDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateMaskingPolicyDetails. + The OCID of the compartment where the masking policy should be created. + + + :return: The compartment_id of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateMaskingPolicyDetails. + The OCID of the compartment where the masking policy should be created. + + + :param compartment_id: The compartment_id of this CreateMaskingPolicyDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def description(self): + """ + Gets the description of this CreateMaskingPolicyDetails. + The description of the masking policy. + + + :return: The description of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateMaskingPolicyDetails. + The description of the masking policy. + + + :param description: The description of this CreateMaskingPolicyDetails. + :type: str + """ + self._description = description + + @property + def is_drop_temp_tables_enabled(self): + """ + Gets the is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails. + Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. + Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want + to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + must be dropped before the database is available for unprivileged users. + + + :return: The is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails. + :rtype: bool + """ + return self._is_drop_temp_tables_enabled + + @is_drop_temp_tables_enabled.setter + def is_drop_temp_tables_enabled(self, is_drop_temp_tables_enabled): + """ + Sets the is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails. + Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. + Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want + to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + must be dropped before the database is available for unprivileged users. + + + :param is_drop_temp_tables_enabled: The is_drop_temp_tables_enabled of this CreateMaskingPolicyDetails. + :type: bool + """ + self._is_drop_temp_tables_enabled = is_drop_temp_tables_enabled + + @property + def is_redo_logging_enabled(self): + """ + Gets the is_redo_logging_enabled of this CreateMaskingPolicyDetails. + Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to + enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked + data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + + + :return: The is_redo_logging_enabled of this CreateMaskingPolicyDetails. + :rtype: bool + """ + return self._is_redo_logging_enabled + + @is_redo_logging_enabled.setter + def is_redo_logging_enabled(self, is_redo_logging_enabled): + """ + Sets the is_redo_logging_enabled of this CreateMaskingPolicyDetails. + Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to + enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked + data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + + + :param is_redo_logging_enabled: The is_redo_logging_enabled of this CreateMaskingPolicyDetails. + :type: bool + """ + self._is_redo_logging_enabled = is_redo_logging_enabled + + @property + def is_refresh_stats_enabled(self): + """ + Gets the is_refresh_stats_enabled of this CreateMaskingPolicyDetails. + Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics + gathering. The masking process gathers statistics on masked database tables after masking completes. + + + :return: The is_refresh_stats_enabled of this CreateMaskingPolicyDetails. + :rtype: bool + """ + return self._is_refresh_stats_enabled + + @is_refresh_stats_enabled.setter + def is_refresh_stats_enabled(self, is_refresh_stats_enabled): + """ + Sets the is_refresh_stats_enabled of this CreateMaskingPolicyDetails. + Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics + gathering. The masking process gathers statistics on masked database tables after masking completes. + + + :param is_refresh_stats_enabled: The is_refresh_stats_enabled of this CreateMaskingPolicyDetails. + :type: bool + """ + self._is_refresh_stats_enabled = is_refresh_stats_enabled + + @property + def parallel_degree(self): + """ + Gets the parallel_degree of this CreateMaskingPolicyDetails. + Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + + + :return: The parallel_degree of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._parallel_degree + + @parallel_degree.setter + def parallel_degree(self, parallel_degree): + """ + Sets the parallel_degree of this CreateMaskingPolicyDetails. + Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + + + :param parallel_degree: The parallel_degree of this CreateMaskingPolicyDetails. + :type: str + """ + self._parallel_degree = parallel_degree + + @property + def recompile(self): + """ + Gets the recompile of this CreateMaskingPolicyDetails. + Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + attribute is used. + + + :return: The recompile of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._recompile + + @recompile.setter + def recompile(self, recompile): + """ + Sets the recompile of this CreateMaskingPolicyDetails. + Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + attribute is used. + + + :param recompile: The recompile of this CreateMaskingPolicyDetails. + :type: str + """ + self._recompile = recompile + + @property + def pre_masking_script(self): + """ + Gets the pre_masking_script of this CreateMaskingPolicyDetails. + A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before + the core masking script generated using the masking policy. It's usually used to perform + any preparation or prerequisite work before masking data. + + + :return: The pre_masking_script of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._pre_masking_script + + @pre_masking_script.setter + def pre_masking_script(self, pre_masking_script): + """ + Sets the pre_masking_script of this CreateMaskingPolicyDetails. + A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before + the core masking script generated using the masking policy. It's usually used to perform + any preparation or prerequisite work before masking data. + + + :param pre_masking_script: The pre_masking_script of this CreateMaskingPolicyDetails. + :type: str + """ + self._pre_masking_script = pre_masking_script + + @property + def post_masking_script(self): + """ + Gets the post_masking_script of this CreateMaskingPolicyDetails. + A post-masking script, which can contain SQL and PL/SQL statements. It's executed after + the core masking script generated using the masking policy. It's usually used to perform + additional transformation or cleanup work after masking. + + + :return: The post_masking_script of this CreateMaskingPolicyDetails. + :rtype: str + """ + return self._post_masking_script + + @post_masking_script.setter + def post_masking_script(self, post_masking_script): + """ + Sets the post_masking_script of this CreateMaskingPolicyDetails. + A post-masking script, which can contain SQL and PL/SQL statements. It's executed after + the core masking script generated using the masking policy. It's usually used to perform + additional transformation or cleanup work after masking. + + + :param post_masking_script: The post_masking_script of this CreateMaskingPolicyDetails. + :type: str + """ + self._post_masking_script = post_masking_script + + @property + def column_source(self): + """ + **[Required]** Gets the column_source of this CreateMaskingPolicyDetails. + + :return: The column_source of this CreateMaskingPolicyDetails. + :rtype: oci.data_safe.models.CreateColumnSourceDetails + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this CreateMaskingPolicyDetails. + + :param column_source: The column_source of this CreateMaskingPolicyDetails. + :type: oci.data_safe.models.CreateColumnSourceDetails + """ + self._column_source = column_source + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateMaskingPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateMaskingPolicyDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateMaskingPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateMaskingPolicyDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateMaskingPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateMaskingPolicyDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateMaskingPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateMaskingPolicyDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_report_definition_details.py b/src/oci/data_safe/models/create_report_definition_details.py new file mode 100644 index 0000000000..81eb33294a --- /dev/null +++ b/src/oci/data_safe/models/create_report_definition_details.py @@ -0,0 +1,365 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateReportDefinitionDetails(object): + """ + Description of a new report definition. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateReportDefinitionDetails 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 CreateReportDefinitionDetails. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this CreateReportDefinitionDetails. + :type display_name: str + + :param parent_id: + The value to assign to the parent_id property of this CreateReportDefinitionDetails. + :type parent_id: str + + :param description: + The value to assign to the description property of this CreateReportDefinitionDetails. + :type description: str + + :param column_info: + The value to assign to the column_info property of this CreateReportDefinitionDetails. + :type column_info: list[oci.data_safe.models.Column] + + :param column_filters: + The value to assign to the column_filters property of this CreateReportDefinitionDetails. + :type column_filters: list[oci.data_safe.models.ColumnFilter] + + :param column_sortings: + The value to assign to the column_sortings property of this CreateReportDefinitionDetails. + :type column_sortings: list[oci.data_safe.models.ColumnSorting] + + :param summary: + The value to assign to the summary property of this CreateReportDefinitionDetails. + :type summary: list[oci.data_safe.models.Summary] + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateReportDefinitionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateReportDefinitionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'display_name': 'str', + 'parent_id': 'str', + 'description': 'str', + 'column_info': 'list[Column]', + 'column_filters': 'list[ColumnFilter]', + 'column_sortings': 'list[ColumnSorting]', + 'summary': 'list[Summary]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'parent_id': 'parentId', + 'description': 'description', + 'column_info': 'columnInfo', + 'column_filters': 'columnFilters', + 'column_sortings': 'columnSortings', + 'summary': 'summary', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._compartment_id = None + self._display_name = None + self._parent_id = None + self._description = None + self._column_info = None + self._column_filters = None + self._column_sortings = None + self._summary = None + self._freeform_tags = None + self._defined_tags = None + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateReportDefinitionDetails. + The OCID of the compartment containing the report definition. + + + :return: The compartment_id of this CreateReportDefinitionDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateReportDefinitionDetails. + The OCID of the compartment containing the report definition. + + + :param compartment_id: The compartment_id of this CreateReportDefinitionDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this CreateReportDefinitionDetails. + Specifies the name of the report definition. + + + :return: The display_name of this CreateReportDefinitionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateReportDefinitionDetails. + Specifies the name of the report definition. + + + :param display_name: The display_name of this CreateReportDefinitionDetails. + :type: str + """ + self._display_name = display_name + + @property + def parent_id(self): + """ + **[Required]** Gets the parent_id of this CreateReportDefinitionDetails. + The OCID of the parent report definition. + + + :return: The parent_id of this CreateReportDefinitionDetails. + :rtype: str + """ + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + """ + Sets the parent_id of this CreateReportDefinitionDetails. + The OCID of the parent report definition. + + + :param parent_id: The parent_id of this CreateReportDefinitionDetails. + :type: str + """ + self._parent_id = parent_id + + @property + def description(self): + """ + Gets the description of this CreateReportDefinitionDetails. + A description of the report definition. + + + :return: The description of this CreateReportDefinitionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateReportDefinitionDetails. + A description of the report definition. + + + :param description: The description of this CreateReportDefinitionDetails. + :type: str + """ + self._description = description + + @property + def column_info(self): + """ + **[Required]** Gets the column_info of this CreateReportDefinitionDetails. + An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). + + + :return: The column_info of this CreateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.Column] + """ + return self._column_info + + @column_info.setter + def column_info(self, column_info): + """ + Sets the column_info of this CreateReportDefinitionDetails. + An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). + + + :param column_info: The column_info of this CreateReportDefinitionDetails. + :type: list[oci.data_safe.models.Column] + """ + self._column_info = column_info + + @property + def column_filters(self): + """ + **[Required]** Gets the column_filters of this CreateReportDefinitionDetails. + An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + + + :return: The column_filters of this CreateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.ColumnFilter] + """ + return self._column_filters + + @column_filters.setter + def column_filters(self, column_filters): + """ + Sets the column_filters of this CreateReportDefinitionDetails. + An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + + + :param column_filters: The column_filters of this CreateReportDefinitionDetails. + :type: list[oci.data_safe.models.ColumnFilter] + """ + self._column_filters = column_filters + + @property + def column_sortings(self): + """ + **[Required]** Gets the column_sortings of this CreateReportDefinitionDetails. + An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. + + + :return: The column_sortings of this CreateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.ColumnSorting] + """ + return self._column_sortings + + @column_sortings.setter + def column_sortings(self, column_sortings): + """ + Sets the column_sortings of this CreateReportDefinitionDetails. + An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. + + + :param column_sortings: The column_sortings of this CreateReportDefinitionDetails. + :type: list[oci.data_safe.models.ColumnSorting] + """ + self._column_sortings = column_sortings + + @property + def summary(self): + """ + **[Required]** Gets the summary of this CreateReportDefinitionDetails. + An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). + + + :return: The summary of this CreateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.Summary] + """ + return self._summary + + @summary.setter + def summary(self, summary): + """ + Sets the summary of this CreateReportDefinitionDetails. + An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). + + + :param summary: The summary of this CreateReportDefinitionDetails. + :type: list[oci.data_safe.models.Summary] + """ + self._summary = summary + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateReportDefinitionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateReportDefinitionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateReportDefinitionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateReportDefinitionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateReportDefinitionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateReportDefinitionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateReportDefinitionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateReportDefinitionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_sensitive_category_details.py b/src/oci/data_safe/models/create_sensitive_category_details.py new file mode 100644 index 0000000000..7c40f40684 --- /dev/null +++ b/src/oci/data_safe/models/create_sensitive_category_details.py @@ -0,0 +1,98 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_sensitive_type_details import CreateSensitiveTypeDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateSensitiveCategoryDetails(CreateSensitiveTypeDetails): + """ + Details to create a new sensitive category. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateSensitiveCategoryDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.CreateSensitiveCategoryDetails.entity_type` attribute + of this class is ``SENSITIVE_CATEGORY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this CreateSensitiveCategoryDetails. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this CreateSensitiveCategoryDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateSensitiveCategoryDetails. + :type compartment_id: str + + :param short_name: + The value to assign to the short_name property of this CreateSensitiveCategoryDetails. + :type short_name: str + + :param description: + The value to assign to the description property of this CreateSensitiveCategoryDetails. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this CreateSensitiveCategoryDetails. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateSensitiveCategoryDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateSensitiveCategoryDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'short_name': 'str', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'short_name': 'shortName', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_type = None + self._display_name = None + self._compartment_id = None + self._short_name = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._entity_type = 'SENSITIVE_CATEGORY' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_sensitive_column_details.py b/src/oci/data_safe/models/create_sensitive_column_details.py new file mode 100644 index 0000000000..d85611e5b8 --- /dev/null +++ b/src/oci/data_safe/models/create_sensitive_column_details.py @@ -0,0 +1,498 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateSensitiveColumnDetails(object): + """ + Details to create a new sensitive column in a sensitive data model. + """ + + #: A constant which can be used with the object_type property of a CreateSensitiveColumnDetails. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a CreateSensitiveColumnDetails. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + #: A constant which can be used with the status property of a CreateSensitiveColumnDetails. + #: This constant has a value of "VALID" + STATUS_VALID = "VALID" + + #: A constant which can be used with the status property of a CreateSensitiveColumnDetails. + #: This constant has a value of "INVALID" + STATUS_INVALID = "INVALID" + + #: A constant which can be used with the relation_type property of a CreateSensitiveColumnDetails. + #: This constant has a value of "NONE" + RELATION_TYPE_NONE = "NONE" + + #: A constant which can be used with the relation_type property of a CreateSensitiveColumnDetails. + #: This constant has a value of "APP_DEFINED" + RELATION_TYPE_APP_DEFINED = "APP_DEFINED" + + #: A constant which can be used with the relation_type property of a CreateSensitiveColumnDetails. + #: This constant has a value of "DB_DEFINED" + RELATION_TYPE_DB_DEFINED = "DB_DEFINED" + + def __init__(self, **kwargs): + """ + Initializes a new CreateSensitiveColumnDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param app_name: + The value to assign to the app_name property of this CreateSensitiveColumnDetails. + :type app_name: str + + :param schema_name: + The value to assign to the schema_name property of this CreateSensitiveColumnDetails. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this CreateSensitiveColumnDetails. + :type object_name: str + + :param column_name: + The value to assign to the column_name property of this CreateSensitiveColumnDetails. + :type column_name: str + + :param object_type: + The value to assign to the object_type property of this CreateSensitiveColumnDetails. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW" + :type object_type: str + + :param data_type: + The value to assign to the data_type property of this CreateSensitiveColumnDetails. + :type data_type: str + + :param status: + The value to assign to the status property of this CreateSensitiveColumnDetails. + Allowed values for this property are: "VALID", "INVALID" + :type status: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this CreateSensitiveColumnDetails. + :type sensitive_type_id: str + + :param parent_column_keys: + The value to assign to the parent_column_keys property of this CreateSensitiveColumnDetails. + :type parent_column_keys: list[str] + + :param relation_type: + The value to assign to the relation_type property of this CreateSensitiveColumnDetails. + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED" + :type relation_type: str + + :param app_defined_child_column_keys: + The value to assign to the app_defined_child_column_keys property of this CreateSensitiveColumnDetails. + :type app_defined_child_column_keys: list[str] + + :param db_defined_child_column_keys: + The value to assign to the db_defined_child_column_keys property of this CreateSensitiveColumnDetails. + :type db_defined_child_column_keys: list[str] + + """ + self.swagger_types = { + 'app_name': 'str', + 'schema_name': 'str', + 'object_name': 'str', + 'column_name': 'str', + 'object_type': 'str', + 'data_type': 'str', + 'status': 'str', + 'sensitive_type_id': 'str', + 'parent_column_keys': 'list[str]', + 'relation_type': 'str', + 'app_defined_child_column_keys': 'list[str]', + 'db_defined_child_column_keys': 'list[str]' + } + + self.attribute_map = { + 'app_name': 'appName', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'column_name': 'columnName', + 'object_type': 'objectType', + 'data_type': 'dataType', + 'status': 'status', + 'sensitive_type_id': 'sensitiveTypeId', + 'parent_column_keys': 'parentColumnKeys', + 'relation_type': 'relationType', + 'app_defined_child_column_keys': 'appDefinedChildColumnKeys', + 'db_defined_child_column_keys': 'dbDefinedChildColumnKeys' + } + + self._app_name = None + self._schema_name = None + self._object_name = None + self._column_name = None + self._object_type = None + self._data_type = None + self._status = None + self._sensitive_type_id = None + self._parent_column_keys = None + self._relation_type = None + self._app_defined_child_column_keys = None + self._db_defined_child_column_keys = None + + @property + def app_name(self): + """ + Gets the app_name of this CreateSensitiveColumnDetails. + The name of the application associated with the sensitive column. It's useful when the application name is + different from the schema name. Otherwise, it can be ignored. If this attribute is not provided, it's automatically + populated with the value provided for the schemaName attribute. + + + :return: The app_name of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._app_name + + @app_name.setter + def app_name(self, app_name): + """ + Sets the app_name of this CreateSensitiveColumnDetails. + The name of the application associated with the sensitive column. It's useful when the application name is + different from the schema name. Otherwise, it can be ignored. If this attribute is not provided, it's automatically + populated with the value provided for the schemaName attribute. + + + :param app_name: The app_name of this CreateSensitiveColumnDetails. + :type: str + """ + self._app_name = app_name + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this CreateSensitiveColumnDetails. + The database schema that contains the sensitive column. + + + :return: The schema_name of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this CreateSensitiveColumnDetails. + The database schema that contains the sensitive column. + + + :param schema_name: The schema_name of this CreateSensitiveColumnDetails. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this CreateSensitiveColumnDetails. + The database object that contains the sensitive column. + + + :return: The object_name of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this CreateSensitiveColumnDetails. + The database object that contains the sensitive column. + + + :param object_name: The object_name of this CreateSensitiveColumnDetails. + :type: str + """ + self._object_name = object_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this CreateSensitiveColumnDetails. + The name of the sensitive column. + + + :return: The column_name of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this CreateSensitiveColumnDetails. + The name of the sensitive column. + + + :param column_name: The column_name of this CreateSensitiveColumnDetails. + :type: str + """ + self._column_name = column_name + + @property + def object_type(self): + """ + Gets the object_type of this CreateSensitiveColumnDetails. + The type of the database object that contains the sensitive column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW" + + + :return: The object_type of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this CreateSensitiveColumnDetails. + The type of the database object that contains the sensitive column. + + + :param object_type: The object_type of this CreateSensitiveColumnDetails. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + raise ValueError( + "Invalid value for `object_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._object_type = object_type + + @property + def data_type(self): + """ + Gets the data_type of this CreateSensitiveColumnDetails. + The data type of the sensitive column. + + + :return: The data_type of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this CreateSensitiveColumnDetails. + The data type of the sensitive column. + + + :param data_type: The data_type of this CreateSensitiveColumnDetails. + :type: str + """ + self._data_type = data_type + + @property + def status(self): + """ + Gets the status of this CreateSensitiveColumnDetails. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an incremental + data discovery job does not identify these columns as sensitive. + + Allowed values for this property are: "VALID", "INVALID" + + + :return: The status of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this CreateSensitiveColumnDetails. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an incremental + data discovery job does not identify these columns as sensitive. + + + :param status: The status of this CreateSensitiveColumnDetails. + :type: str + """ + allowed_values = ["VALID", "INVALID"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + raise ValueError( + "Invalid value for `status`, must be None or one of {0}" + .format(allowed_values) + ) + self._status = status + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this CreateSensitiveColumnDetails. + The OCID of the sensitive type to be associated with the sensitive column. + + + :return: The sensitive_type_id of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this CreateSensitiveColumnDetails. + The OCID of the sensitive type to be associated with the sensitive column. + + + :param sensitive_type_id: The sensitive_type_id of this CreateSensitiveColumnDetails. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def parent_column_keys(self): + """ + Gets the parent_column_keys of this CreateSensitiveColumnDetails. + Unique keys identifying the columns that are parents of the sensitive column. At present, it accepts only one + parent column key. This attribute can be used to establish relationship between columns in a sensitive data model. + Note that the parent column must be added to the sensitive data model before its key can be specified here. + If this attribute is provided, the appDefinedChildColumnKeys or dbDefinedChildColumnKeys attribute of the parent + column is automatically updated to reflect the relationship. + + + :return: The parent_column_keys of this CreateSensitiveColumnDetails. + :rtype: list[str] + """ + return self._parent_column_keys + + @parent_column_keys.setter + def parent_column_keys(self, parent_column_keys): + """ + Sets the parent_column_keys of this CreateSensitiveColumnDetails. + Unique keys identifying the columns that are parents of the sensitive column. At present, it accepts only one + parent column key. This attribute can be used to establish relationship between columns in a sensitive data model. + Note that the parent column must be added to the sensitive data model before its key can be specified here. + If this attribute is provided, the appDefinedChildColumnKeys or dbDefinedChildColumnKeys attribute of the parent + column is automatically updated to reflect the relationship. + + + :param parent_column_keys: The parent_column_keys of this CreateSensitiveColumnDetails. + :type: list[str] + """ + self._parent_column_keys = parent_column_keys + + @property + def relation_type(self): + """ + Gets the relation_type of this CreateSensitiveColumnDetails. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED" + + + :return: The relation_type of this CreateSensitiveColumnDetails. + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """ + Sets the relation_type of this CreateSensitiveColumnDetails. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + + :param relation_type: The relation_type of this CreateSensitiveColumnDetails. + :type: str + """ + allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + if not value_allowed_none_or_none_sentinel(relation_type, allowed_values): + raise ValueError( + "Invalid value for `relation_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._relation_type = relation_type + + @property + def app_defined_child_column_keys(self): + """ + Gets the app_defined_child_column_keys of this CreateSensitiveColumnDetails. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :return: The app_defined_child_column_keys of this CreateSensitiveColumnDetails. + :rtype: list[str] + """ + return self._app_defined_child_column_keys + + @app_defined_child_column_keys.setter + def app_defined_child_column_keys(self, app_defined_child_column_keys): + """ + Sets the app_defined_child_column_keys of this CreateSensitiveColumnDetails. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :param app_defined_child_column_keys: The app_defined_child_column_keys of this CreateSensitiveColumnDetails. + :type: list[str] + """ + self._app_defined_child_column_keys = app_defined_child_column_keys + + @property + def db_defined_child_column_keys(self): + """ + Gets the db_defined_child_column_keys of this CreateSensitiveColumnDetails. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :return: The db_defined_child_column_keys of this CreateSensitiveColumnDetails. + :rtype: list[str] + """ + return self._db_defined_child_column_keys + + @db_defined_child_column_keys.setter + def db_defined_child_column_keys(self, db_defined_child_column_keys): + """ + Sets the db_defined_child_column_keys of this CreateSensitiveColumnDetails. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :param db_defined_child_column_keys: The db_defined_child_column_keys of this CreateSensitiveColumnDetails. + :type: list[str] + """ + self._db_defined_child_column_keys = db_defined_child_column_keys + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_sensitive_data_model_details.py b/src/oci/data_safe/models/create_sensitive_data_model_details.py new file mode 100644 index 0000000000..f28f06b070 --- /dev/null +++ b/src/oci/data_safe/models/create_sensitive_data_model_details.py @@ -0,0 +1,488 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateSensitiveDataModelDetails(object): + """ + Details to create a new sensitive data model. If schemas and sensitive types are provided, it automatically runs + data discovery and adds the discovered columns to the sensitive data model. Otherwise, it creates an empty sensitive + data model that can be updated later. + To specify some schemas and sensitive types for data discovery, use schemasForDiscovery and sensitiveTypeIdsForDiscovery + attributes. But if you want to include all schemas and sensitive types, you can set isIncludeAllSchemas and + isIncludeAllSensitiveTypes attributes to true. In the latter case, you do not need to list all schemas and + sensitive types. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateSensitiveDataModelDetails 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 CreateSensitiveDataModelDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateSensitiveDataModelDetails. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this CreateSensitiveDataModelDetails. + :type target_id: str + + :param app_suite_name: + The value to assign to the app_suite_name property of this CreateSensitiveDataModelDetails. + :type app_suite_name: str + + :param description: + The value to assign to the description property of this CreateSensitiveDataModelDetails. + :type description: str + + :param schemas_for_discovery: + The value to assign to the schemas_for_discovery property of this CreateSensitiveDataModelDetails. + :type schemas_for_discovery: list[str] + + :param sensitive_type_ids_for_discovery: + The value to assign to the sensitive_type_ids_for_discovery property of this CreateSensitiveDataModelDetails. + :type sensitive_type_ids_for_discovery: list[str] + + :param is_sample_data_collection_enabled: + The value to assign to the is_sample_data_collection_enabled property of this CreateSensitiveDataModelDetails. + :type is_sample_data_collection_enabled: bool + + :param is_app_defined_relation_discovery_enabled: + The value to assign to the is_app_defined_relation_discovery_enabled property of this CreateSensitiveDataModelDetails. + :type is_app_defined_relation_discovery_enabled: bool + + :param is_include_all_schemas: + The value to assign to the is_include_all_schemas property of this CreateSensitiveDataModelDetails. + :type is_include_all_schemas: bool + + :param is_include_all_sensitive_types: + The value to assign to the is_include_all_sensitive_types property of this CreateSensitiveDataModelDetails. + :type is_include_all_sensitive_types: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateSensitiveDataModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateSensitiveDataModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'app_suite_name': 'str', + 'description': 'str', + 'schemas_for_discovery': 'list[str]', + 'sensitive_type_ids_for_discovery': 'list[str]', + 'is_sample_data_collection_enabled': 'bool', + 'is_app_defined_relation_discovery_enabled': 'bool', + 'is_include_all_schemas': 'bool', + 'is_include_all_sensitive_types': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'app_suite_name': 'appSuiteName', + 'description': 'description', + 'schemas_for_discovery': 'schemasForDiscovery', + 'sensitive_type_ids_for_discovery': 'sensitiveTypeIdsForDiscovery', + 'is_sample_data_collection_enabled': 'isSampleDataCollectionEnabled', + 'is_app_defined_relation_discovery_enabled': 'isAppDefinedRelationDiscoveryEnabled', + 'is_include_all_schemas': 'isIncludeAllSchemas', + 'is_include_all_sensitive_types': 'isIncludeAllSensitiveTypes', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._compartment_id = None + self._target_id = None + self._app_suite_name = None + self._description = None + self._schemas_for_discovery = None + self._sensitive_type_ids_for_discovery = None + self._is_sample_data_collection_enabled = None + self._is_app_defined_relation_discovery_enabled = None + self._is_include_all_schemas = None + self._is_include_all_sensitive_types = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this CreateSensitiveDataModelDetails. + The display name of the sensitive data model. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateSensitiveDataModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateSensitiveDataModelDetails. + The display name of the sensitive data model. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateSensitiveDataModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateSensitiveDataModelDetails. + The OCID of the compartment where the sensitive data model should be created. + + + :return: The compartment_id of this CreateSensitiveDataModelDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateSensitiveDataModelDetails. + The OCID of the compartment where the sensitive data model should be created. + + + :param compartment_id: The compartment_id of this CreateSensitiveDataModelDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this CreateSensitiveDataModelDetails. + The OCID of the reference target database to be associated with the sensitive data model. All operations such + as performing data discovery and adding columns manually are done in the context of the associated target database. + + + :return: The target_id of this CreateSensitiveDataModelDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this CreateSensitiveDataModelDetails. + The OCID of the reference target database to be associated with the sensitive data model. All operations such + as performing data discovery and adding columns manually are done in the context of the associated target database. + + + :param target_id: The target_id of this CreateSensitiveDataModelDetails. + :type: str + """ + self._target_id = target_id + + @property + def app_suite_name(self): + """ + Gets the app_suite_name of this CreateSensitiveDataModelDetails. + The application suite name identifying a collection of applications. It's useful only if maintaining a sensitive data model for a suite of applications. + + + :return: The app_suite_name of this CreateSensitiveDataModelDetails. + :rtype: str + """ + return self._app_suite_name + + @app_suite_name.setter + def app_suite_name(self, app_suite_name): + """ + Sets the app_suite_name of this CreateSensitiveDataModelDetails. + The application suite name identifying a collection of applications. It's useful only if maintaining a sensitive data model for a suite of applications. + + + :param app_suite_name: The app_suite_name of this CreateSensitiveDataModelDetails. + :type: str + """ + self._app_suite_name = app_suite_name + + @property + def description(self): + """ + Gets the description of this CreateSensitiveDataModelDetails. + The description of the sensitive data model. + + + :return: The description of this CreateSensitiveDataModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateSensitiveDataModelDetails. + The description of the sensitive data model. + + + :param description: The description of this CreateSensitiveDataModelDetails. + :type: str + """ + self._description = description + + @property + def schemas_for_discovery(self): + """ + Gets the schemas_for_discovery of this CreateSensitiveDataModelDetails. + The schemas to be scanned by data discovery jobs. + + + :return: The schemas_for_discovery of this CreateSensitiveDataModelDetails. + :rtype: list[str] + """ + return self._schemas_for_discovery + + @schemas_for_discovery.setter + def schemas_for_discovery(self, schemas_for_discovery): + """ + Sets the schemas_for_discovery of this CreateSensitiveDataModelDetails. + The schemas to be scanned by data discovery jobs. + + + :param schemas_for_discovery: The schemas_for_discovery of this CreateSensitiveDataModelDetails. + :type: list[str] + """ + self._schemas_for_discovery = schemas_for_discovery + + @property + def sensitive_type_ids_for_discovery(self): + """ + Gets the sensitive_type_ids_for_discovery of this CreateSensitiveDataModelDetails. + The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, + all its child sensitive types are used for data discovery. + + + :return: The sensitive_type_ids_for_discovery of this CreateSensitiveDataModelDetails. + :rtype: list[str] + """ + return self._sensitive_type_ids_for_discovery + + @sensitive_type_ids_for_discovery.setter + def sensitive_type_ids_for_discovery(self, sensitive_type_ids_for_discovery): + """ + Sets the sensitive_type_ids_for_discovery of this CreateSensitiveDataModelDetails. + The OCIDs of the sensitive types to be used by data discovery jobs. If OCID of a sensitive category is provided, + all its child sensitive types are used for data discovery. + + + :param sensitive_type_ids_for_discovery: The sensitive_type_ids_for_discovery of this CreateSensitiveDataModelDetails. + :type: list[str] + """ + self._sensitive_type_ids_for_discovery = sensitive_type_ids_for_discovery + + @property + def is_sample_data_collection_enabled(self): + """ + Gets the is_sample_data_collection_enabled of this CreateSensitiveDataModelDetails. + Indicates if data discovery jobs should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only + if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values + are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :return: The is_sample_data_collection_enabled of this CreateSensitiveDataModelDetails. + :rtype: bool + """ + return self._is_sample_data_collection_enabled + + @is_sample_data_collection_enabled.setter + def is_sample_data_collection_enabled(self, is_sample_data_collection_enabled): + """ + Sets the is_sample_data_collection_enabled of this CreateSensitiveDataModelDetails. + Indicates if data discovery jobs should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only + if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values + are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :param is_sample_data_collection_enabled: The is_sample_data_collection_enabled of this CreateSensitiveDataModelDetails. + :type: bool + """ + self._is_sample_data_collection_enabled = is_sample_data_collection_enabled + + @property + def is_app_defined_relation_discovery_enabled(self): + """ + Gets the is_app_defined_relation_discovery_enabled of this CreateSensitiveDataModelDetails. + Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential relationships + between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) relationships. + This option helps identify application-level relationships that are not defined in the database dictionary, which in turn, + helps identify additional sensitive columns and preserve referential integrity during data masking. It's disabled by default + and should be used only if there is a need to identify application-level relationships. + + + :return: The is_app_defined_relation_discovery_enabled of this CreateSensitiveDataModelDetails. + :rtype: bool + """ + return self._is_app_defined_relation_discovery_enabled + + @is_app_defined_relation_discovery_enabled.setter + def is_app_defined_relation_discovery_enabled(self, is_app_defined_relation_discovery_enabled): + """ + Sets the is_app_defined_relation_discovery_enabled of this CreateSensitiveDataModelDetails. + Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential relationships + between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) relationships. + This option helps identify application-level relationships that are not defined in the database dictionary, which in turn, + helps identify additional sensitive columns and preserve referential integrity during data masking. It's disabled by default + and should be used only if there is a need to identify application-level relationships. + + + :param is_app_defined_relation_discovery_enabled: The is_app_defined_relation_discovery_enabled of this CreateSensitiveDataModelDetails. + :type: bool + """ + self._is_app_defined_relation_discovery_enabled = is_app_defined_relation_discovery_enabled + + @property + def is_include_all_schemas(self): + """ + Gets the is_include_all_schemas of this CreateSensitiveDataModelDetails. + Indicates if all the schemas in the associated target database should be scanned by data discovery jobs. + If it's set to true, the schemasForDiscovery attribute is ignored and all schemas are used for data discovery. + + + :return: The is_include_all_schemas of this CreateSensitiveDataModelDetails. + :rtype: bool + """ + return self._is_include_all_schemas + + @is_include_all_schemas.setter + def is_include_all_schemas(self, is_include_all_schemas): + """ + Sets the is_include_all_schemas of this CreateSensitiveDataModelDetails. + Indicates if all the schemas in the associated target database should be scanned by data discovery jobs. + If it's set to true, the schemasForDiscovery attribute is ignored and all schemas are used for data discovery. + + + :param is_include_all_schemas: The is_include_all_schemas of this CreateSensitiveDataModelDetails. + :type: bool + """ + self._is_include_all_schemas = is_include_all_schemas + + @property + def is_include_all_sensitive_types(self): + """ + Gets the is_include_all_sensitive_types of this CreateSensitiveDataModelDetails. + Indicates if all the existing sensitive types should be used by data discovery jobs. If it's set to true, + the sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. + + + :return: The is_include_all_sensitive_types of this CreateSensitiveDataModelDetails. + :rtype: bool + """ + return self._is_include_all_sensitive_types + + @is_include_all_sensitive_types.setter + def is_include_all_sensitive_types(self, is_include_all_sensitive_types): + """ + Sets the is_include_all_sensitive_types of this CreateSensitiveDataModelDetails. + Indicates if all the existing sensitive types should be used by data discovery jobs. If it's set to true, + the sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. + + + :param is_include_all_sensitive_types: The is_include_all_sensitive_types of this CreateSensitiveDataModelDetails. + :type: bool + """ + self._is_include_all_sensitive_types = is_include_all_sensitive_types + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateSensitiveDataModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateSensitiveDataModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateSensitiveDataModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateSensitiveDataModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateSensitiveDataModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateSensitiveDataModelDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateSensitiveDataModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateSensitiveDataModelDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_sensitive_type_details.py b/src/oci/data_safe/models/create_sensitive_type_details.py new file mode 100644 index 0000000000..be74b65570 --- /dev/null +++ b/src/oci/data_safe/models/create_sensitive_type_details.py @@ -0,0 +1,343 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateSensitiveTypeDetails(object): + """ + Details to create a new sensitive type. + """ + + #: A constant which can be used with the entity_type property of a CreateSensitiveTypeDetails. + #: This constant has a value of "SENSITIVE_TYPE" + ENTITY_TYPE_SENSITIVE_TYPE = "SENSITIVE_TYPE" + + #: A constant which can be used with the entity_type property of a CreateSensitiveTypeDetails. + #: This constant has a value of "SENSITIVE_CATEGORY" + ENTITY_TYPE_SENSITIVE_CATEGORY = "SENSITIVE_CATEGORY" + + def __init__(self, **kwargs): + """ + Initializes a new CreateSensitiveTypeDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.CreateSensitiveCategoryDetails` + * :class:`~oci.data_safe.models.CreateSensitiveTypePatternDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this CreateSensitiveTypeDetails. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this CreateSensitiveTypeDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateSensitiveTypeDetails. + :type compartment_id: str + + :param short_name: + The value to assign to the short_name property of this CreateSensitiveTypeDetails. + :type short_name: str + + :param description: + The value to assign to the description property of this CreateSensitiveTypeDetails. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this CreateSensitiveTypeDetails. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateSensitiveTypeDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateSensitiveTypeDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'short_name': 'str', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'short_name': 'shortName', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_type = None + self._display_name = None + self._compartment_id = None + self._short_name = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entityType'] + + if type == 'SENSITIVE_CATEGORY': + return 'CreateSensitiveCategoryDetails' + + if type == 'SENSITIVE_TYPE': + return 'CreateSensitiveTypePatternDetails' + else: + return 'CreateSensitiveTypeDetails' + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this CreateSensitiveTypeDetails. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + + + :return: The entity_type of this CreateSensitiveTypeDetails. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this CreateSensitiveTypeDetails. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + + :param entity_type: The entity_type of this CreateSensitiveTypeDetails. + :type: str + """ + allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + raise ValueError( + "Invalid value for `entity_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_type = entity_type + + @property + def display_name(self): + """ + Gets the display_name of this CreateSensitiveTypeDetails. + The display name of the sensitive type. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this CreateSensitiveTypeDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateSensitiveTypeDetails. + The display name of the sensitive type. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this CreateSensitiveTypeDetails. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateSensitiveTypeDetails. + The OCID of the compartment where the sensitive type should be created. + + + :return: The compartment_id of this CreateSensitiveTypeDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateSensitiveTypeDetails. + The OCID of the compartment where the sensitive type should be created. + + + :param compartment_id: The compartment_id of this CreateSensitiveTypeDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def short_name(self): + """ + Gets the short_name of this CreateSensitiveTypeDetails. + The short name of the sensitive type. + + + :return: The short_name of this CreateSensitiveTypeDetails. + :rtype: str + """ + return self._short_name + + @short_name.setter + def short_name(self, short_name): + """ + Sets the short_name of this CreateSensitiveTypeDetails. + The short name of the sensitive type. + + + :param short_name: The short_name of this CreateSensitiveTypeDetails. + :type: str + """ + self._short_name = short_name + + @property + def description(self): + """ + Gets the description of this CreateSensitiveTypeDetails. + The description of the sensitive type. + + + :return: The description of this CreateSensitiveTypeDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateSensitiveTypeDetails. + The description of the sensitive type. + + + :param description: The description of this CreateSensitiveTypeDetails. + :type: str + """ + self._description = description + + @property + def parent_category_id(self): + """ + Gets the parent_category_id of this CreateSensitiveTypeDetails. + The OCID of the parent sensitive category. + + + :return: The parent_category_id of this CreateSensitiveTypeDetails. + :rtype: str + """ + return self._parent_category_id + + @parent_category_id.setter + def parent_category_id(self, parent_category_id): + """ + Sets the parent_category_id of this CreateSensitiveTypeDetails. + The OCID of the parent sensitive category. + + + :param parent_category_id: The parent_category_id of this CreateSensitiveTypeDetails. + :type: str + """ + self._parent_category_id = parent_category_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateSensitiveTypeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateSensitiveTypeDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateSensitiveTypeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateSensitiveTypeDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateSensitiveTypeDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateSensitiveTypeDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateSensitiveTypeDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateSensitiveTypeDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_sensitive_type_pattern_details.py b/src/oci/data_safe/models/create_sensitive_type_pattern_details.py new file mode 100644 index 0000000000..5fd536ef8b --- /dev/null +++ b/src/oci/data_safe/models/create_sensitive_type_pattern_details.py @@ -0,0 +1,259 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .create_sensitive_type_details import CreateSensitiveTypeDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateSensitiveTypePatternDetails(CreateSensitiveTypeDetails): + """ + Details to create a new sensitive type with regular expressions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateSensitiveTypePatternDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.CreateSensitiveTypePatternDetails.entity_type` attribute + of this class is ``SENSITIVE_TYPE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this CreateSensitiveTypePatternDetails. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this CreateSensitiveTypePatternDetails. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateSensitiveTypePatternDetails. + :type compartment_id: str + + :param short_name: + The value to assign to the short_name property of this CreateSensitiveTypePatternDetails. + :type short_name: str + + :param description: + The value to assign to the description property of this CreateSensitiveTypePatternDetails. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this CreateSensitiveTypePatternDetails. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateSensitiveTypePatternDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateSensitiveTypePatternDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param name_pattern: + The value to assign to the name_pattern property of this CreateSensitiveTypePatternDetails. + :type name_pattern: str + + :param comment_pattern: + The value to assign to the comment_pattern property of this CreateSensitiveTypePatternDetails. + :type comment_pattern: str + + :param data_pattern: + The value to assign to the data_pattern property of this CreateSensitiveTypePatternDetails. + :type data_pattern: str + + :param search_type: + The value to assign to the search_type property of this CreateSensitiveTypePatternDetails. + :type search_type: str + + :param default_masking_format_id: + The value to assign to the default_masking_format_id property of this CreateSensitiveTypePatternDetails. + :type default_masking_format_id: str + + """ + self.swagger_types = { + 'entity_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'short_name': 'str', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'name_pattern': 'str', + 'comment_pattern': 'str', + 'data_pattern': 'str', + 'search_type': 'str', + 'default_masking_format_id': 'str' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'short_name': 'shortName', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'name_pattern': 'namePattern', + 'comment_pattern': 'commentPattern', + 'data_pattern': 'dataPattern', + 'search_type': 'searchType', + 'default_masking_format_id': 'defaultMaskingFormatId' + } + + self._entity_type = None + self._display_name = None + self._compartment_id = None + self._short_name = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._name_pattern = None + self._comment_pattern = None + self._data_pattern = None + self._search_type = None + self._default_masking_format_id = None + self._entity_type = 'SENSITIVE_TYPE' + + @property + def name_pattern(self): + """ + Gets the name_pattern of this CreateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column names. + + + :return: The name_pattern of this CreateSensitiveTypePatternDetails. + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """ + Sets the name_pattern of this CreateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column names. + + + :param name_pattern: The name_pattern of this CreateSensitiveTypePatternDetails. + :type: str + """ + self._name_pattern = name_pattern + + @property + def comment_pattern(self): + """ + Gets the comment_pattern of this CreateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column comments. + + + :return: The comment_pattern of this CreateSensitiveTypePatternDetails. + :rtype: str + """ + return self._comment_pattern + + @comment_pattern.setter + def comment_pattern(self, comment_pattern): + """ + Sets the comment_pattern of this CreateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column comments. + + + :param comment_pattern: The comment_pattern of this CreateSensitiveTypePatternDetails. + :type: str + """ + self._comment_pattern = comment_pattern + + @property + def data_pattern(self): + """ + Gets the data_pattern of this CreateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column data values. + + + :return: The data_pattern of this CreateSensitiveTypePatternDetails. + :rtype: str + """ + return self._data_pattern + + @data_pattern.setter + def data_pattern(self, data_pattern): + """ + Sets the data_pattern of this CreateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column data values. + + + :param data_pattern: The data_pattern of this CreateSensitiveTypePatternDetails. + :type: str + """ + self._data_pattern = data_pattern + + @property + def search_type(self): + """ + Gets the search_type of this CreateSensitiveTypePatternDetails. + The search type indicating how the column name, comment and data patterns should be used by data discovery. + `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC + + + :return: The search_type of this CreateSensitiveTypePatternDetails. + :rtype: str + """ + return self._search_type + + @search_type.setter + def search_type(self, search_type): + """ + Sets the search_type of this CreateSensitiveTypePatternDetails. + The search type indicating how the column name, comment and data patterns should be used by data discovery. + `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC + + + :param search_type: The search_type of this CreateSensitiveTypePatternDetails. + :type: str + """ + self._search_type = search_type + + @property + def default_masking_format_id(self): + """ + Gets the default_masking_format_id of this CreateSensitiveTypePatternDetails. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :return: The default_masking_format_id of this CreateSensitiveTypePatternDetails. + :rtype: str + """ + return self._default_masking_format_id + + @default_masking_format_id.setter + def default_masking_format_id(self, default_masking_format_id): + """ + Sets the default_masking_format_id of this CreateSensitiveTypePatternDetails. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :param default_masking_format_id: The default_masking_format_id of this CreateSensitiveTypePatternDetails. + :type: str + """ + self._default_masking_format_id = default_masking_format_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/create_target_alert_policy_association_details.py b/src/oci/data_safe/models/create_target_alert_policy_association_details.py new file mode 100644 index 0000000000..aa2ad10f41 --- /dev/null +++ b/src/oci/data_safe/models/create_target_alert_policy_association_details.py @@ -0,0 +1,303 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class CreateTargetAlertPolicyAssociationDetails(object): + """ + The details used to create a new target-alert policy association. + """ + + def __init__(self, **kwargs): + """ + Initializes a new CreateTargetAlertPolicyAssociationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param policy_id: + The value to assign to the policy_id property of this CreateTargetAlertPolicyAssociationDetails. + :type policy_id: str + + :param target_id: + The value to assign to the target_id property of this CreateTargetAlertPolicyAssociationDetails. + :type target_id: str + + :param display_name: + The value to assign to the display_name property of this CreateTargetAlertPolicyAssociationDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this CreateTargetAlertPolicyAssociationDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this CreateTargetAlertPolicyAssociationDetails. + :type compartment_id: str + + :param is_enabled: + The value to assign to the is_enabled property of this CreateTargetAlertPolicyAssociationDetails. + :type is_enabled: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this CreateTargetAlertPolicyAssociationDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this CreateTargetAlertPolicyAssociationDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'policy_id': 'str', + 'target_id': 'str', + 'display_name': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'is_enabled': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'policy_id': 'policyId', + 'target_id': 'targetId', + 'display_name': 'displayName', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'is_enabled': 'isEnabled', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._policy_id = None + self._target_id = None + self._display_name = None + self._description = None + self._compartment_id = None + self._is_enabled = None + self._freeform_tags = None + self._defined_tags = None + + @property + def policy_id(self): + """ + **[Required]** Gets the policy_id of this CreateTargetAlertPolicyAssociationDetails. + The OCID of the alert policy. + + + :return: The policy_id of this CreateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._policy_id + + @policy_id.setter + def policy_id(self, policy_id): + """ + Sets the policy_id of this CreateTargetAlertPolicyAssociationDetails. + The OCID of the alert policy. + + + :param policy_id: The policy_id of this CreateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._policy_id = policy_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this CreateTargetAlertPolicyAssociationDetails. + The OCID of the target. + + + :return: The target_id of this CreateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this CreateTargetAlertPolicyAssociationDetails. + The OCID of the target. + + + :param target_id: The target_id of this CreateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._target_id = target_id + + @property + def display_name(self): + """ + Gets the display_name of this CreateTargetAlertPolicyAssociationDetails. + The display name of the target-alert policy association. + + + :return: The display_name of this CreateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this CreateTargetAlertPolicyAssociationDetails. + The display name of the target-alert policy association. + + + :param display_name: The display_name of this CreateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this CreateTargetAlertPolicyAssociationDetails. + Describes the target-alert policy association. + + + :return: The description of this CreateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this CreateTargetAlertPolicyAssociationDetails. + Describes the target-alert policy association. + + + :param description: The description of this CreateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this CreateTargetAlertPolicyAssociationDetails. + The OCID of the compartment where the target-alert policy association is created. + + + :return: The compartment_id of this CreateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this CreateTargetAlertPolicyAssociationDetails. + The OCID of the compartment where the target-alert policy association is created. + + + :param compartment_id: The compartment_id of this CreateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def is_enabled(self): + """ + **[Required]** Gets the is_enabled of this CreateTargetAlertPolicyAssociationDetails. + Indicates if the target-alert policy association is enabled or disabled. + + + :return: The is_enabled of this CreateTargetAlertPolicyAssociationDetails. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this CreateTargetAlertPolicyAssociationDetails. + Indicates if the target-alert policy association is enabled or disabled. + + + :param is_enabled: The is_enabled of this CreateTargetAlertPolicyAssociationDetails. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this CreateTargetAlertPolicyAssociationDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this CreateTargetAlertPolicyAssociationDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this CreateTargetAlertPolicyAssociationDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this CreateTargetAlertPolicyAssociationDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this CreateTargetAlertPolicyAssociationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this CreateTargetAlertPolicyAssociationDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this CreateTargetAlertPolicyAssociationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this CreateTargetAlertPolicyAssociationDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/data_safe_configuration.py b/src/oci/data_safe/models/data_safe_configuration.py index 1eb78a278e..e449aab81c 100644 --- a/src/oci/data_safe/models/data_safe_configuration.py +++ b/src/oci/data_safe/models/data_safe_configuration.py @@ -68,6 +68,14 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type lifecycle_state: str + :param data_safe_nat_gateway_ip_address: + The value to assign to the data_safe_nat_gateway_ip_address property of this DataSafeConfiguration. + :type data_safe_nat_gateway_ip_address: str + + :param global_settings: + The value to assign to the global_settings property of this DataSafeConfiguration. + :type global_settings: oci.data_safe.models.GlobalSettings + :param freeform_tags: The value to assign to the freeform_tags property of this DataSafeConfiguration. :type freeform_tags: dict(str, str) @@ -83,6 +91,8 @@ def __init__(self, **kwargs): 'compartment_id': 'str', 'time_enabled': 'datetime', 'lifecycle_state': 'str', + 'data_safe_nat_gateway_ip_address': 'str', + 'global_settings': 'GlobalSettings', 'freeform_tags': 'dict(str, str)', 'defined_tags': 'dict(str, dict(str, object))' } @@ -93,6 +103,8 @@ def __init__(self, **kwargs): 'compartment_id': 'compartmentId', 'time_enabled': 'timeEnabled', 'lifecycle_state': 'lifecycleState', + 'data_safe_nat_gateway_ip_address': 'dataSafeNatGatewayIpAddress', + 'global_settings': 'globalSettings', 'freeform_tags': 'freeformTags', 'defined_tags': 'definedTags' } @@ -102,6 +114,8 @@ def __init__(self, **kwargs): self._compartment_id = None self._time_enabled = None self._lifecycle_state = None + self._data_safe_nat_gateway_ip_address = None + self._global_settings = None self._freeform_tags = None self._defined_tags = None @@ -235,6 +249,50 @@ def lifecycle_state(self, lifecycle_state): lifecycle_state = 'UNKNOWN_ENUM_VALUE' self._lifecycle_state = lifecycle_state + @property + def data_safe_nat_gateway_ip_address(self): + """ + Gets the data_safe_nat_gateway_ip_address of this DataSafeConfiguration. + The Oracle Data Safe's NAT Gateway IP Address. + + + :return: The data_safe_nat_gateway_ip_address of this DataSafeConfiguration. + :rtype: str + """ + return self._data_safe_nat_gateway_ip_address + + @data_safe_nat_gateway_ip_address.setter + def data_safe_nat_gateway_ip_address(self, data_safe_nat_gateway_ip_address): + """ + Sets the data_safe_nat_gateway_ip_address of this DataSafeConfiguration. + The Oracle Data Safe's NAT Gateway IP Address. + + + :param data_safe_nat_gateway_ip_address: The data_safe_nat_gateway_ip_address of this DataSafeConfiguration. + :type: str + """ + self._data_safe_nat_gateway_ip_address = data_safe_nat_gateway_ip_address + + @property + def global_settings(self): + """ + Gets the global_settings of this DataSafeConfiguration. + + :return: The global_settings of this DataSafeConfiguration. + :rtype: oci.data_safe.models.GlobalSettings + """ + return self._global_settings + + @global_settings.setter + def global_settings(self, global_settings): + """ + Sets the global_settings of this DataSafeConfiguration. + + :param global_settings: The global_settings of this DataSafeConfiguration. + :type: oci.data_safe.models.GlobalSettings + """ + self._global_settings = global_settings + @property def freeform_tags(self): """ diff --git a/src/oci/data_safe/models/delete_rows_format_entry.py b/src/oci/data_safe/models/delete_rows_format_entry.py new file mode 100644 index 0000000000..0700bfa37f --- /dev/null +++ b/src/oci/data_safe/models/delete_rows_format_entry.py @@ -0,0 +1,63 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DeleteRowsFormatEntry(FormatEntry): + """ + The Delete Rows masking format deletes the rows that meet a user-specified + condition. It is useful in conditional masking when you want to delete a + subset of values in a column and mask the remaining values using some other + masking formats. You should be careful while using this masking format. If + no condition is specified, all rows in a table are deleted. If a column is + being masked using Delete Rows, there must not be a foreign key constraint + or dependent column referring to the table. To learn more, check Delete Rows + in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeleteRowsFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.DeleteRowsFormatEntry.type` attribute + of this class is ``DELETE_ROWS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this DeleteRowsFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this DeleteRowsFormatEntry. + :type description: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description' + } + + self._type = None + self._description = None + self._type = 'DELETE_ROWS' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/deterministic_encryption_date_format_entry.py b/src/oci/data_safe/models/deterministic_encryption_date_format_entry.py new file mode 100644 index 0000000000..3a2722d2b1 --- /dev/null +++ b/src/oci/data_safe/models/deterministic_encryption_date_format_entry.py @@ -0,0 +1,138 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DeterministicEncryptionDateFormatEntry(FormatEntry): + """ + The Deterministic Encryption (Date) masking format encrypts column data using a cryptographic + key and Advanced Encryption Standard (AES 128). It can be used to encrypt date columns only. + It requires a range of dates as input defined by the startDate and endDate attributes. The + start date must be less than or equal to the end date. + + The original column values in all the rows must be within the specified date range. The + encrypted values are also within the specified range. Therefore, to ensure uniqueness, the + total number of dates in the range must be greater than or equal to the number of distinct + original values in the column. If an original value is not in the specified date range, it + might not produce a one-to-one mapping. All non-confirming values are mapped to a single + encrypted value, thereby producing a many-to-one mapping. + + Deterministic Encryption (Date) is a format-preserving, deterministic and reversible masking + format, which requires a seed value while submitting a masking work request. Passing the + same seed value when masking multiple times or masking different databases ensures that + the data is masked deterministically. To learn more, check Deterministic Encryption in the + Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeterministicEncryptionDateFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.DeterministicEncryptionDateFormatEntry.type` attribute + of this class is ``DETERMINISTIC_ENCRYPTION_DATE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this DeterministicEncryptionDateFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this DeterministicEncryptionDateFormatEntry. + :type description: str + + :param start_date: + The value to assign to the start_date property of this DeterministicEncryptionDateFormatEntry. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this DeterministicEncryptionDateFormatEntry. + :type end_date: datetime + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_date': 'startDate', + 'end_date': 'endDate' + } + + self._type = None + self._description = None + self._start_date = None + self._end_date = None + self._type = 'DETERMINISTIC_ENCRYPTION_DATE' + + @property + def start_date(self): + """ + **[Required]** Gets the start_date of this DeterministicEncryptionDateFormatEntry. + The lower bound of the range within which all the original column values fall. + The start date must be less than or equal to the end date. + + + :return: The start_date of this DeterministicEncryptionDateFormatEntry. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this DeterministicEncryptionDateFormatEntry. + The lower bound of the range within which all the original column values fall. + The start date must be less than or equal to the end date. + + + :param start_date: The start_date of this DeterministicEncryptionDateFormatEntry. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + **[Required]** Gets the end_date of this DeterministicEncryptionDateFormatEntry. + The upper bound of the range within which all the original column values fall. + The end date must be greater than or equal to the start date. + + + :return: The end_date of this DeterministicEncryptionDateFormatEntry. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this DeterministicEncryptionDateFormatEntry. + The upper bound of the range within which all the original column values fall. + The end date must be greater than or equal to the start date. + + + :param end_date: The end_date of this DeterministicEncryptionDateFormatEntry. + :type: datetime + """ + self._end_date = end_date + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/deterministic_encryption_format_entry.py b/src/oci/data_safe/models/deterministic_encryption_format_entry.py new file mode 100644 index 0000000000..3e90c333e2 --- /dev/null +++ b/src/oci/data_safe/models/deterministic_encryption_format_entry.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DeterministicEncryptionFormatEntry(FormatEntry): + """ + The Deterministic Encryption masking format encrypts column data using a cryptographic + key and Advanced Encryption Standard (AES 128). It can be used to encrypt character and + number columns. It can encrypt ASCII data without any input (except seed value), but it + needs a regular expression to encrypt non-ASCII data. + + Deterministic Encryption is a format-preserving, deterministic and reversible masking + format, which requires a seed value while submitting a masking work request. Passing + the same seed value when masking multiple times or masking different databases ensures + that the data is masked deterministically. To learn more, check Deterministic Encryption + in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeterministicEncryptionFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.DeterministicEncryptionFormatEntry.type` attribute + of this class is ``DETERMINISTIC_ENCRYPTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this DeterministicEncryptionFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this DeterministicEncryptionFormatEntry. + :type description: str + + :param regular_expression: + The value to assign to the regular_expression property of this DeterministicEncryptionFormatEntry. + :type regular_expression: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'regular_expression': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'regular_expression': 'regularExpression' + } + + self._type = None + self._description = None + self._regular_expression = None + self._type = 'DETERMINISTIC_ENCRYPTION' + + @property + def regular_expression(self): + """ + Gets the regular_expression of this DeterministicEncryptionFormatEntry. + The regular expression to be used for masking. For data with characters in the + ASCII character set, providing a regular expression is optional. However, it + is required if the data contains multi-byte characters. If not provided, an + error is returned when a multi-byte character is found. + + In the case of ASCII characters, if a regular expression is not provided, + Deterministic Encryption can encrypt variable-length column values while + preserving their original format. + + If a regular expression is provided, the column values in all the rows must match + the regular expression. Deterministic Encryption supports a subset of the regular + expression language. It supports encryption of fixed-length strings, and does not + support * or + syntax of regular expressions. The encrypted values also match the + regular expression, which helps to ensure that the original format is preserved. + If an original value does not match the regular expression, Deterministic Encryption + might not produce a one-to-one mapping. All non-confirming values are mapped to a + single encrypted value, thereby producing a many-to-one mapping. + + + :return: The regular_expression of this DeterministicEncryptionFormatEntry. + :rtype: str + """ + return self._regular_expression + + @regular_expression.setter + def regular_expression(self, regular_expression): + """ + Sets the regular_expression of this DeterministicEncryptionFormatEntry. + The regular expression to be used for masking. For data with characters in the + ASCII character set, providing a regular expression is optional. However, it + is required if the data contains multi-byte characters. If not provided, an + error is returned when a multi-byte character is found. + + In the case of ASCII characters, if a regular expression is not provided, + Deterministic Encryption can encrypt variable-length column values while + preserving their original format. + + If a regular expression is provided, the column values in all the rows must match + the regular expression. Deterministic Encryption supports a subset of the regular + expression language. It supports encryption of fixed-length strings, and does not + support * or + syntax of regular expressions. The encrypted values also match the + regular expression, which helps to ensure that the original format is preserved. + If an original value does not match the regular expression, Deterministic Encryption + might not produce a one-to-one mapping. All non-confirming values are mapped to a + single encrypted value, thereby producing a many-to-one mapping. + + + :param regular_expression: The regular_expression of this DeterministicEncryptionFormatEntry. + :type: str + """ + self._regular_expression = regular_expression + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/deterministic_substitution_format_entry.py b/src/oci/data_safe/models/deterministic_substitution_format_entry.py new file mode 100644 index 0000000000..bdf7aadf99 --- /dev/null +++ b/src/oci/data_safe/models/deterministic_substitution_format_entry.py @@ -0,0 +1,159 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DeterministicSubstitutionFormatEntry(FormatEntry): + """ + The Deterministic Substitution masking format uses the specified substitution column + as the source of masked values. It performs hash-based substitution to replace the + original data in a column with values from the substitution column. As a masking + operation renames tables temporarily, the substitution column must be in a table + that has no masking column. Also, you may want to ensure that the substitution column + has sufficient values to uniquely mask the target column. + + Deterministic Substitution requires a seed value while submitting a masking work + request. Passing the same seed value when masking multiple times or masking different + databases ensures that the data is masked deterministically. To learn more, check + Deterministic Substitution in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DeterministicSubstitutionFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.DeterministicSubstitutionFormatEntry.type` attribute + of this class is ``DETERMINISTIC_SUBSTITUTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this DeterministicSubstitutionFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this DeterministicSubstitutionFormatEntry. + :type description: str + + :param schema_name: + The value to assign to the schema_name property of this DeterministicSubstitutionFormatEntry. + :type schema_name: str + + :param table_name: + The value to assign to the table_name property of this DeterministicSubstitutionFormatEntry. + :type table_name: str + + :param column_name: + The value to assign to the column_name property of this DeterministicSubstitutionFormatEntry. + :type column_name: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'schema_name': 'str', + 'table_name': 'str', + 'column_name': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'schema_name': 'schemaName', + 'table_name': 'tableName', + 'column_name': 'columnName' + } + + self._type = None + self._description = None + self._schema_name = None + self._table_name = None + self._column_name = None + self._type = 'DETERMINISTIC_SUBSTITUTION' + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this DeterministicSubstitutionFormatEntry. + The name of the schema that contains the substitution column. + + + :return: The schema_name of this DeterministicSubstitutionFormatEntry. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this DeterministicSubstitutionFormatEntry. + The name of the schema that contains the substitution column. + + + :param schema_name: The schema_name of this DeterministicSubstitutionFormatEntry. + :type: str + """ + self._schema_name = schema_name + + @property + def table_name(self): + """ + **[Required]** Gets the table_name of this DeterministicSubstitutionFormatEntry. + The name of the table that contains the substitution column. + + + :return: The table_name of this DeterministicSubstitutionFormatEntry. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this DeterministicSubstitutionFormatEntry. + The name of the table that contains the substitution column. + + + :param table_name: The table_name of this DeterministicSubstitutionFormatEntry. + :type: str + """ + self._table_name = table_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this DeterministicSubstitutionFormatEntry. + The name of the substitution column. + + + :return: The column_name of this DeterministicSubstitutionFormatEntry. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DeterministicSubstitutionFormatEntry. + The name of the substitution column. + + + :param column_name: The column_name of this DeterministicSubstitutionFormatEntry. + :type: str + """ + self._column_name = column_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/data_safe/models/dimensions.py b/src/oci/data_safe/models/dimensions.py new file mode 100644 index 0000000000..388fad36d6 --- /dev/null +++ b/src/oci/data_safe/models/dimensions.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Dimensions(object): + """ + The scope of analytics data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Dimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_id: + The value to assign to the target_id property of this Dimensions. + :type target_id: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this Dimensions. + :type sensitive_data_model_id: str + + """ + self.swagger_types = { + 'target_id': 'str', + 'sensitive_data_model_id': 'str' + } + + self.attribute_map = { + 'target_id': 'targetId', + 'sensitive_data_model_id': 'sensitiveDataModelId' + } + + self._target_id = None + self._sensitive_data_model_id = None + + @property + def target_id(self): + """ + Gets the target_id of this Dimensions. + The OCID of the target database. + + + :return: The target_id of this Dimensions. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this Dimensions. + The OCID of the target database. + + + :param target_id: The target_id of this Dimensions. + :type: str + """ + self._target_id = target_id + + @property + def sensitive_data_model_id(self): + """ + Gets the sensitive_data_model_id of this Dimensions. + The OCID of the sensitive data model. + + + :return: The sensitive_data_model_id of this Dimensions. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this Dimensions. + The OCID of the sensitive data model. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this Dimensions. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_analytics_collection.py b/src/oci/data_safe/models/discovery_analytics_collection.py new file mode 100644 index 0000000000..366b616eb6 --- /dev/null +++ b/src/oci/data_safe/models/discovery_analytics_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryAnalyticsCollection(object): + """ + A collection of discovery analytics summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryAnalyticsCollection 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 DiscoveryAnalyticsCollection. + :type items: list[oci.data_safe.models.DiscoveryAnalyticsSummary] + + """ + self.swagger_types = { + 'items': 'list[DiscoveryAnalyticsSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DiscoveryAnalyticsCollection. + An array of discovery analytics summary objects. + + + :return: The items of this DiscoveryAnalyticsCollection. + :rtype: list[oci.data_safe.models.DiscoveryAnalyticsSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DiscoveryAnalyticsCollection. + An array of discovery analytics summary objects. + + + :param items: The items of this DiscoveryAnalyticsCollection. + :type: list[oci.data_safe.models.DiscoveryAnalyticsSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_analytics_summary.py b/src/oci/data_safe/models/discovery_analytics_summary.py new file mode 100644 index 0000000000..3d7e297e8e --- /dev/null +++ b/src/oci/data_safe/models/discovery_analytics_summary.py @@ -0,0 +1,160 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryAnalyticsSummary(object): + """ + Summary of discovery analytics data. + """ + + #: A constant which can be used with the metric_name property of a DiscoveryAnalyticsSummary. + #: This constant has a value of "SENSITIVE_DATA_MODEL" + METRIC_NAME_SENSITIVE_DATA_MODEL = "SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the metric_name property of a DiscoveryAnalyticsSummary. + #: This constant has a value of "SENSITIVE_TYPE" + METRIC_NAME_SENSITIVE_TYPE = "SENSITIVE_TYPE" + + #: A constant which can be used with the metric_name property of a DiscoveryAnalyticsSummary. + #: This constant has a value of "SENSITIVE_SCHEMA" + METRIC_NAME_SENSITIVE_SCHEMA = "SENSITIVE_SCHEMA" + + #: A constant which can be used with the metric_name property of a DiscoveryAnalyticsSummary. + #: This constant has a value of "SENSITIVE_TABLE" + METRIC_NAME_SENSITIVE_TABLE = "SENSITIVE_TABLE" + + #: A constant which can be used with the metric_name property of a DiscoveryAnalyticsSummary. + #: This constant has a value of "SENSITIVE_COLUMN" + METRIC_NAME_SENSITIVE_COLUMN = "SENSITIVE_COLUMN" + + #: A constant which can be used with the metric_name property of a DiscoveryAnalyticsSummary. + #: This constant has a value of "SENSITIVE_DATA_VALUE" + METRIC_NAME_SENSITIVE_DATA_VALUE = "SENSITIVE_DATA_VALUE" + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryAnalyticsSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_name: + The value to assign to the metric_name property of this DiscoveryAnalyticsSummary. + Allowed values for this property are: "SENSITIVE_DATA_MODEL", "SENSITIVE_TYPE", "SENSITIVE_SCHEMA", "SENSITIVE_TABLE", "SENSITIVE_COLUMN", "SENSITIVE_DATA_VALUE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_name: str + + :param dimensions: + The value to assign to the dimensions property of this DiscoveryAnalyticsSummary. + :type dimensions: oci.data_safe.models.Dimensions + + :param count: + The value to assign to the count property of this DiscoveryAnalyticsSummary. + :type count: int + + """ + self.swagger_types = { + 'metric_name': 'str', + 'dimensions': 'Dimensions', + 'count': 'int' + } + + self.attribute_map = { + 'metric_name': 'metricName', + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._metric_name = None + self._dimensions = None + self._count = None + + @property + def metric_name(self): + """ + **[Required]** Gets the metric_name of this DiscoveryAnalyticsSummary. + The name of the aggregation metric. + + Allowed values for this property are: "SENSITIVE_DATA_MODEL", "SENSITIVE_TYPE", "SENSITIVE_SCHEMA", "SENSITIVE_TABLE", "SENSITIVE_COLUMN", "SENSITIVE_DATA_VALUE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_name of this DiscoveryAnalyticsSummary. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this DiscoveryAnalyticsSummary. + The name of the aggregation metric. + + + :param metric_name: The metric_name of this DiscoveryAnalyticsSummary. + :type: str + """ + allowed_values = ["SENSITIVE_DATA_MODEL", "SENSITIVE_TYPE", "SENSITIVE_SCHEMA", "SENSITIVE_TABLE", "SENSITIVE_COLUMN", "SENSITIVE_DATA_VALUE"] + if not value_allowed_none_or_none_sentinel(metric_name, allowed_values): + metric_name = 'UNKNOWN_ENUM_VALUE' + self._metric_name = metric_name + + @property + def dimensions(self): + """ + Gets the dimensions of this DiscoveryAnalyticsSummary. + + :return: The dimensions of this DiscoveryAnalyticsSummary. + :rtype: oci.data_safe.models.Dimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this DiscoveryAnalyticsSummary. + + :param dimensions: The dimensions of this DiscoveryAnalyticsSummary. + :type: oci.data_safe.models.Dimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + **[Required]** Gets the count of this DiscoveryAnalyticsSummary. + The total count for the aggregation metric. + + + :return: The count of this DiscoveryAnalyticsSummary. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this DiscoveryAnalyticsSummary. + The total count for the aggregation metric. + + + :param count: The count of this DiscoveryAnalyticsSummary. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_job.py b/src/oci/data_safe/models/discovery_job.py new file mode 100644 index 0000000000..c1038d050a --- /dev/null +++ b/src/oci/data_safe/models/discovery_job.py @@ -0,0 +1,893 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryJob(object): + """ + A data discovery job. It helps track job's metadata as well as result statistics. + """ + + #: A constant which can be used with the discovery_type property of a DiscoveryJob. + #: This constant has a value of "ALL" + DISCOVERY_TYPE_ALL = "ALL" + + #: A constant which can be used with the discovery_type property of a DiscoveryJob. + #: This constant has a value of "NEW" + DISCOVERY_TYPE_NEW = "NEW" + + #: A constant which can be used with the discovery_type property of a DiscoveryJob. + #: This constant has a value of "MODIFIED" + DISCOVERY_TYPE_MODIFIED = "MODIFIED" + + #: A constant which can be used with the discovery_type property of a DiscoveryJob. + #: This constant has a value of "DELETED" + DISCOVERY_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJob. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJob. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJob. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJob. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJob. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJob. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryJob 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 DiscoveryJob. + :type id: str + + :param discovery_type: + The value to assign to the discovery_type property of this DiscoveryJob. + Allowed values for this property are: "ALL", "NEW", "MODIFIED", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type discovery_type: str + + :param display_name: + The value to assign to the display_name property of this DiscoveryJob. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this DiscoveryJob. + :type compartment_id: str + + :param time_started: + The value to assign to the time_started property of this DiscoveryJob. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this DiscoveryJob. + :type time_finished: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DiscoveryJob. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this DiscoveryJob. + :type sensitive_data_model_id: str + + :param target_id: + The value to assign to the target_id property of this DiscoveryJob. + :type target_id: str + + :param schemas_for_discovery: + The value to assign to the schemas_for_discovery property of this DiscoveryJob. + :type schemas_for_discovery: list[str] + + :param sensitive_type_ids_for_discovery: + The value to assign to the sensitive_type_ids_for_discovery property of this DiscoveryJob. + :type sensitive_type_ids_for_discovery: list[str] + + :param is_sample_data_collection_enabled: + The value to assign to the is_sample_data_collection_enabled property of this DiscoveryJob. + :type is_sample_data_collection_enabled: bool + + :param is_app_defined_relation_discovery_enabled: + The value to assign to the is_app_defined_relation_discovery_enabled property of this DiscoveryJob. + :type is_app_defined_relation_discovery_enabled: bool + + :param is_include_all_schemas: + The value to assign to the is_include_all_schemas property of this DiscoveryJob. + :type is_include_all_schemas: bool + + :param is_include_all_sensitive_types: + The value to assign to the is_include_all_sensitive_types property of this DiscoveryJob. + :type is_include_all_sensitive_types: bool + + :param total_schemas_scanned: + The value to assign to the total_schemas_scanned property of this DiscoveryJob. + :type total_schemas_scanned: int + + :param total_objects_scanned: + The value to assign to the total_objects_scanned property of this DiscoveryJob. + :type total_objects_scanned: int + + :param total_columns_scanned: + The value to assign to the total_columns_scanned property of this DiscoveryJob. + :type total_columns_scanned: int + + :param total_new_sensitive_columns: + The value to assign to the total_new_sensitive_columns property of this DiscoveryJob. + :type total_new_sensitive_columns: int + + :param total_modified_sensitive_columns: + The value to assign to the total_modified_sensitive_columns property of this DiscoveryJob. + :type total_modified_sensitive_columns: int + + :param total_deleted_sensitive_columns: + The value to assign to the total_deleted_sensitive_columns property of this DiscoveryJob. + :type total_deleted_sensitive_columns: int + + :param freeform_tags: + The value to assign to the freeform_tags property of this DiscoveryJob. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DiscoveryJob. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this DiscoveryJob. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'discovery_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'lifecycle_state': 'str', + 'sensitive_data_model_id': 'str', + 'target_id': 'str', + 'schemas_for_discovery': 'list[str]', + 'sensitive_type_ids_for_discovery': 'list[str]', + 'is_sample_data_collection_enabled': 'bool', + 'is_app_defined_relation_discovery_enabled': 'bool', + 'is_include_all_schemas': 'bool', + 'is_include_all_sensitive_types': 'bool', + 'total_schemas_scanned': 'int', + 'total_objects_scanned': 'int', + 'total_columns_scanned': 'int', + 'total_new_sensitive_columns': 'int', + 'total_modified_sensitive_columns': 'int', + 'total_deleted_sensitive_columns': 'int', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'discovery_type': 'discoveryType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'lifecycle_state': 'lifecycleState', + 'sensitive_data_model_id': 'sensitiveDataModelId', + 'target_id': 'targetId', + 'schemas_for_discovery': 'schemasForDiscovery', + 'sensitive_type_ids_for_discovery': 'sensitiveTypeIdsForDiscovery', + 'is_sample_data_collection_enabled': 'isSampleDataCollectionEnabled', + 'is_app_defined_relation_discovery_enabled': 'isAppDefinedRelationDiscoveryEnabled', + 'is_include_all_schemas': 'isIncludeAllSchemas', + 'is_include_all_sensitive_types': 'isIncludeAllSensitiveTypes', + 'total_schemas_scanned': 'totalSchemasScanned', + 'total_objects_scanned': 'totalObjectsScanned', + 'total_columns_scanned': 'totalColumnsScanned', + 'total_new_sensitive_columns': 'totalNewSensitiveColumns', + 'total_modified_sensitive_columns': 'totalModifiedSensitiveColumns', + 'total_deleted_sensitive_columns': 'totalDeletedSensitiveColumns', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._discovery_type = None + self._display_name = None + self._compartment_id = None + self._time_started = None + self._time_finished = None + self._lifecycle_state = None + self._sensitive_data_model_id = None + self._target_id = None + self._schemas_for_discovery = None + self._sensitive_type_ids_for_discovery = None + self._is_sample_data_collection_enabled = None + self._is_app_defined_relation_discovery_enabled = None + self._is_include_all_schemas = None + self._is_include_all_sensitive_types = None + self._total_schemas_scanned = None + self._total_objects_scanned = None + self._total_columns_scanned = None + self._total_new_sensitive_columns = None + self._total_modified_sensitive_columns = None + self._total_deleted_sensitive_columns = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this DiscoveryJob. + The OCID of the discovery job. + + + :return: The id of this DiscoveryJob. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this DiscoveryJob. + The OCID of the discovery job. + + + :param id: The id of this DiscoveryJob. + :type: str + """ + self._id = id + + @property + def discovery_type(self): + """ + **[Required]** Gets the discovery_type of this DiscoveryJob. + The type of the discovery job. It defines the job's scope. + NEW identifies new sensitive columns in the target database that are not in the sensitive data model. + DELETED identifies columns that are present in the sensitive data model but have been deleted from the target database. + MODIFIED identifies columns that are present in the target database as well as the sensitive data model but some of their attributes have been modified. + ALL covers all the above three scenarios and reports new, deleted and modified columns. + + Allowed values for this property are: "ALL", "NEW", "MODIFIED", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The discovery_type of this DiscoveryJob. + :rtype: str + """ + return self._discovery_type + + @discovery_type.setter + def discovery_type(self, discovery_type): + """ + Sets the discovery_type of this DiscoveryJob. + The type of the discovery job. It defines the job's scope. + NEW identifies new sensitive columns in the target database that are not in the sensitive data model. + DELETED identifies columns that are present in the sensitive data model but have been deleted from the target database. + MODIFIED identifies columns that are present in the target database as well as the sensitive data model but some of their attributes have been modified. + ALL covers all the above three scenarios and reports new, deleted and modified columns. + + + :param discovery_type: The discovery_type of this DiscoveryJob. + :type: str + """ + allowed_values = ["ALL", "NEW", "MODIFIED", "DELETED"] + if not value_allowed_none_or_none_sentinel(discovery_type, allowed_values): + discovery_type = 'UNKNOWN_ENUM_VALUE' + self._discovery_type = discovery_type + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this DiscoveryJob. + The display name of the discovery job. + + + :return: The display_name of this DiscoveryJob. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this DiscoveryJob. + The display name of the discovery job. + + + :param display_name: The display_name of this DiscoveryJob. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this DiscoveryJob. + The OCID of the compartment that contains the discovery job. + + + :return: The compartment_id of this DiscoveryJob. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this DiscoveryJob. + The OCID of the compartment that contains the discovery job. + + + :param compartment_id: The compartment_id of this DiscoveryJob. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_started(self): + """ + **[Required]** Gets the time_started of this DiscoveryJob. + The date and time the discovery job started, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_started of this DiscoveryJob. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this DiscoveryJob. + The date and time the discovery job started, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_started: The time_started of this DiscoveryJob. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + **[Required]** Gets the time_finished of this DiscoveryJob. + The date and time the discovery job finished, in the format defined by `RFC3339`__.. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_finished of this DiscoveryJob. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this DiscoveryJob. + The date and time the discovery job finished, in the format defined by `RFC3339`__.. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_finished: The time_finished of this DiscoveryJob. + :type: datetime + """ + self._time_finished = time_finished + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this DiscoveryJob. + The current state of the discovery job. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this DiscoveryJob. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this DiscoveryJob. + The current state of the discovery job. + + + :param lifecycle_state: The lifecycle_state of this DiscoveryJob. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this DiscoveryJob. + The OCID of the sensitive data model associated with the discovery job. + + + :return: The sensitive_data_model_id of this DiscoveryJob. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this DiscoveryJob. + The OCID of the sensitive data model associated with the discovery job. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this DiscoveryJob. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this DiscoveryJob. + The OCID of the target database associated with the discovery job. + + + :return: The target_id of this DiscoveryJob. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DiscoveryJob. + The OCID of the target database associated with the discovery job. + + + :param target_id: The target_id of this DiscoveryJob. + :type: str + """ + self._target_id = target_id + + @property + def schemas_for_discovery(self): + """ + Gets the schemas_for_discovery of this DiscoveryJob. + The schemas used for data discovery. + + + :return: The schemas_for_discovery of this DiscoveryJob. + :rtype: list[str] + """ + return self._schemas_for_discovery + + @schemas_for_discovery.setter + def schemas_for_discovery(self, schemas_for_discovery): + """ + Sets the schemas_for_discovery of this DiscoveryJob. + The schemas used for data discovery. + + + :param schemas_for_discovery: The schemas_for_discovery of this DiscoveryJob. + :type: list[str] + """ + self._schemas_for_discovery = schemas_for_discovery + + @property + def sensitive_type_ids_for_discovery(self): + """ + Gets the sensitive_type_ids_for_discovery of this DiscoveryJob. + The OCIDs of the sensitive types used for data discovery. + + + :return: The sensitive_type_ids_for_discovery of this DiscoveryJob. + :rtype: list[str] + """ + return self._sensitive_type_ids_for_discovery + + @sensitive_type_ids_for_discovery.setter + def sensitive_type_ids_for_discovery(self, sensitive_type_ids_for_discovery): + """ + Sets the sensitive_type_ids_for_discovery of this DiscoveryJob. + The OCIDs of the sensitive types used for data discovery. + + + :param sensitive_type_ids_for_discovery: The sensitive_type_ids_for_discovery of this DiscoveryJob. + :type: list[str] + """ + self._sensitive_type_ids_for_discovery = sensitive_type_ids_for_discovery + + @property + def is_sample_data_collection_enabled(self): + """ + **[Required]** Gets the is_sample_data_collection_enabled of this DiscoveryJob. + Indicates if the discovery job should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only + if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data + values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :return: The is_sample_data_collection_enabled of this DiscoveryJob. + :rtype: bool + """ + return self._is_sample_data_collection_enabled + + @is_sample_data_collection_enabled.setter + def is_sample_data_collection_enabled(self, is_sample_data_collection_enabled): + """ + Sets the is_sample_data_collection_enabled of this DiscoveryJob. + Indicates if the discovery job should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only + if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data + values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :param is_sample_data_collection_enabled: The is_sample_data_collection_enabled of this DiscoveryJob. + :type: bool + """ + self._is_sample_data_collection_enabled = is_sample_data_collection_enabled + + @property + def is_app_defined_relation_discovery_enabled(self): + """ + **[Required]** Gets the is_app_defined_relation_discovery_enabled of this DiscoveryJob. + Indicates if the discovery job should identify potential application-level (non-dictionary) referential + relationships between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) + relationships. This option helps identify application-level relationships that are not defined in the database dictionary, + which in turn, helps identify additional sensitive columns and preserve referential integrity during data masking. + It's disabled by default and should be used only if there is a need to identify application-level relationships. + + + :return: The is_app_defined_relation_discovery_enabled of this DiscoveryJob. + :rtype: bool + """ + return self._is_app_defined_relation_discovery_enabled + + @is_app_defined_relation_discovery_enabled.setter + def is_app_defined_relation_discovery_enabled(self, is_app_defined_relation_discovery_enabled): + """ + Sets the is_app_defined_relation_discovery_enabled of this DiscoveryJob. + Indicates if the discovery job should identify potential application-level (non-dictionary) referential + relationships between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) + relationships. This option helps identify application-level relationships that are not defined in the database dictionary, + which in turn, helps identify additional sensitive columns and preserve referential integrity during data masking. + It's disabled by default and should be used only if there is a need to identify application-level relationships. + + + :param is_app_defined_relation_discovery_enabled: The is_app_defined_relation_discovery_enabled of this DiscoveryJob. + :type: bool + """ + self._is_app_defined_relation_discovery_enabled = is_app_defined_relation_discovery_enabled + + @property + def is_include_all_schemas(self): + """ + **[Required]** Gets the is_include_all_schemas of this DiscoveryJob. + Indicates if all the schemas in the associated target database are used for data discovery. + If it's set to true, the schemasForDiscovery attribute is ignored and all schemas are used. + + + :return: The is_include_all_schemas of this DiscoveryJob. + :rtype: bool + """ + return self._is_include_all_schemas + + @is_include_all_schemas.setter + def is_include_all_schemas(self, is_include_all_schemas): + """ + Sets the is_include_all_schemas of this DiscoveryJob. + Indicates if all the schemas in the associated target database are used for data discovery. + If it's set to true, the schemasForDiscovery attribute is ignored and all schemas are used. + + + :param is_include_all_schemas: The is_include_all_schemas of this DiscoveryJob. + :type: bool + """ + self._is_include_all_schemas = is_include_all_schemas + + @property + def is_include_all_sensitive_types(self): + """ + **[Required]** Gets the is_include_all_sensitive_types of this DiscoveryJob. + Indicates if all the existing sensitive types are used for data discovery. If it's set to true, the + sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used. + + + :return: The is_include_all_sensitive_types of this DiscoveryJob. + :rtype: bool + """ + return self._is_include_all_sensitive_types + + @is_include_all_sensitive_types.setter + def is_include_all_sensitive_types(self, is_include_all_sensitive_types): + """ + Sets the is_include_all_sensitive_types of this DiscoveryJob. + Indicates if all the existing sensitive types are used for data discovery. If it's set to true, the + sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used. + + + :param is_include_all_sensitive_types: The is_include_all_sensitive_types of this DiscoveryJob. + :type: bool + """ + self._is_include_all_sensitive_types = is_include_all_sensitive_types + + @property + def total_schemas_scanned(self): + """ + **[Required]** Gets the total_schemas_scanned of this DiscoveryJob. + The total number of schemas scanned by the discovery job. + + + :return: The total_schemas_scanned of this DiscoveryJob. + :rtype: int + """ + return self._total_schemas_scanned + + @total_schemas_scanned.setter + def total_schemas_scanned(self, total_schemas_scanned): + """ + Sets the total_schemas_scanned of this DiscoveryJob. + The total number of schemas scanned by the discovery job. + + + :param total_schemas_scanned: The total_schemas_scanned of this DiscoveryJob. + :type: int + """ + self._total_schemas_scanned = total_schemas_scanned + + @property + def total_objects_scanned(self): + """ + **[Required]** Gets the total_objects_scanned of this DiscoveryJob. + The total number of objects (tables and editioning views) scanned by the discovery job. + + + :return: The total_objects_scanned of this DiscoveryJob. + :rtype: int + """ + return self._total_objects_scanned + + @total_objects_scanned.setter + def total_objects_scanned(self, total_objects_scanned): + """ + Sets the total_objects_scanned of this DiscoveryJob. + The total number of objects (tables and editioning views) scanned by the discovery job. + + + :param total_objects_scanned: The total_objects_scanned of this DiscoveryJob. + :type: int + """ + self._total_objects_scanned = total_objects_scanned + + @property + def total_columns_scanned(self): + """ + **[Required]** Gets the total_columns_scanned of this DiscoveryJob. + The total number of columns scanned by the discovery job. + + + :return: The total_columns_scanned of this DiscoveryJob. + :rtype: int + """ + return self._total_columns_scanned + + @total_columns_scanned.setter + def total_columns_scanned(self, total_columns_scanned): + """ + Sets the total_columns_scanned of this DiscoveryJob. + The total number of columns scanned by the discovery job. + + + :param total_columns_scanned: The total_columns_scanned of this DiscoveryJob. + :type: int + """ + self._total_columns_scanned = total_columns_scanned + + @property + def total_new_sensitive_columns(self): + """ + **[Required]** Gets the total_new_sensitive_columns of this DiscoveryJob. + The total number of new sensitive columns identified by the discovery job. + + + :return: The total_new_sensitive_columns of this DiscoveryJob. + :rtype: int + """ + return self._total_new_sensitive_columns + + @total_new_sensitive_columns.setter + def total_new_sensitive_columns(self, total_new_sensitive_columns): + """ + Sets the total_new_sensitive_columns of this DiscoveryJob. + The total number of new sensitive columns identified by the discovery job. + + + :param total_new_sensitive_columns: The total_new_sensitive_columns of this DiscoveryJob. + :type: int + """ + self._total_new_sensitive_columns = total_new_sensitive_columns + + @property + def total_modified_sensitive_columns(self): + """ + **[Required]** Gets the total_modified_sensitive_columns of this DiscoveryJob. + The total number of modified sensitive columns identified by the discovery job. + + + :return: The total_modified_sensitive_columns of this DiscoveryJob. + :rtype: int + """ + return self._total_modified_sensitive_columns + + @total_modified_sensitive_columns.setter + def total_modified_sensitive_columns(self, total_modified_sensitive_columns): + """ + Sets the total_modified_sensitive_columns of this DiscoveryJob. + The total number of modified sensitive columns identified by the discovery job. + + + :param total_modified_sensitive_columns: The total_modified_sensitive_columns of this DiscoveryJob. + :type: int + """ + self._total_modified_sensitive_columns = total_modified_sensitive_columns + + @property + def total_deleted_sensitive_columns(self): + """ + **[Required]** Gets the total_deleted_sensitive_columns of this DiscoveryJob. + The total number of deleted sensitive columns identified by the discovery job. + + + :return: The total_deleted_sensitive_columns of this DiscoveryJob. + :rtype: int + """ + return self._total_deleted_sensitive_columns + + @total_deleted_sensitive_columns.setter + def total_deleted_sensitive_columns(self, total_deleted_sensitive_columns): + """ + Sets the total_deleted_sensitive_columns of this DiscoveryJob. + The total number of deleted sensitive columns identified by the discovery job. + + + :param total_deleted_sensitive_columns: The total_deleted_sensitive_columns of this DiscoveryJob. + :type: int + """ + self._total_deleted_sensitive_columns = total_deleted_sensitive_columns + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this DiscoveryJob. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this DiscoveryJob. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this DiscoveryJob. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this DiscoveryJob. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this DiscoveryJob. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this DiscoveryJob. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this DiscoveryJob. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this DiscoveryJob. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this DiscoveryJob. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this DiscoveryJob. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this DiscoveryJob. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this DiscoveryJob. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_job_collection.py b/src/oci/data_safe/models/discovery_job_collection.py new file mode 100644 index 0000000000..83e9a63bee --- /dev/null +++ b/src/oci/data_safe/models/discovery_job_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryJobCollection(object): + """ + A collection of discovery job summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryJobCollection 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 DiscoveryJobCollection. + :type items: list[oci.data_safe.models.DiscoveryJobSummary] + + """ + self.swagger_types = { + 'items': 'list[DiscoveryJobSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DiscoveryJobCollection. + An array of discovery job summary objects. + + + :return: The items of this DiscoveryJobCollection. + :rtype: list[oci.data_safe.models.DiscoveryJobSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DiscoveryJobCollection. + An array of discovery job summary objects. + + + :param items: The items of this DiscoveryJobCollection. + :type: list[oci.data_safe.models.DiscoveryJobSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_job_result.py b/src/oci/data_safe/models/discovery_job_result.py new file mode 100644 index 0000000000..77b576ae28 --- /dev/null +++ b/src/oci/data_safe/models/discovery_job_result.py @@ -0,0 +1,733 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryJobResult(object): + """ + A discovery job result representing a sensitive column. It can be one of the following three types: + NEW: A new sensitive column in the target database that is not in the sensitive data model. + DELETED: A column that is present in the sensitive data model but has been deleted from the target database. + MODIFIED: A column that is present in the target database as well as the sensitive data model but some of its attributes have been modified. + """ + + #: A constant which can be used with the discovery_type property of a DiscoveryJobResult. + #: This constant has a value of "NEW" + DISCOVERY_TYPE_NEW = "NEW" + + #: A constant which can be used with the discovery_type property of a DiscoveryJobResult. + #: This constant has a value of "MODIFIED" + DISCOVERY_TYPE_MODIFIED = "MODIFIED" + + #: A constant which can be used with the discovery_type property of a DiscoveryJobResult. + #: This constant has a value of "DELETED" + DISCOVERY_TYPE_DELETED = "DELETED" + + #: A constant which can be used with the object_type property of a DiscoveryJobResult. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a DiscoveryJobResult. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + #: A constant which can be used with the relation_type property of a DiscoveryJobResult. + #: This constant has a value of "NONE" + RELATION_TYPE_NONE = "NONE" + + #: A constant which can be used with the relation_type property of a DiscoveryJobResult. + #: This constant has a value of "APP_DEFINED" + RELATION_TYPE_APP_DEFINED = "APP_DEFINED" + + #: A constant which can be used with the relation_type property of a DiscoveryJobResult. + #: This constant has a value of "DB_DEFINED" + RELATION_TYPE_DB_DEFINED = "DB_DEFINED" + + #: A constant which can be used with the planned_action property of a DiscoveryJobResult. + #: This constant has a value of "NONE" + PLANNED_ACTION_NONE = "NONE" + + #: A constant which can be used with the planned_action property of a DiscoveryJobResult. + #: This constant has a value of "ACCEPT" + PLANNED_ACTION_ACCEPT = "ACCEPT" + + #: A constant which can be used with the planned_action property of a DiscoveryJobResult. + #: This constant has a value of "INVALIDATE" + PLANNED_ACTION_INVALIDATE = "INVALIDATE" + + #: A constant which can be used with the planned_action property of a DiscoveryJobResult. + #: This constant has a value of "REJECT" + PLANNED_ACTION_REJECT = "REJECT" + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryJobResult object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this DiscoveryJobResult. + :type key: str + + :param discovery_type: + The value to assign to the discovery_type property of this DiscoveryJobResult. + Allowed values for this property are: "NEW", "MODIFIED", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type discovery_type: str + + :param sensitive_columnkey: + The value to assign to the sensitive_columnkey property of this DiscoveryJobResult. + :type sensitive_columnkey: str + + :param app_name: + The value to assign to the app_name property of this DiscoveryJobResult. + :type app_name: str + + :param schema_name: + The value to assign to the schema_name property of this DiscoveryJobResult. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this DiscoveryJobResult. + :type object_name: str + + :param column_name: + The value to assign to the column_name property of this DiscoveryJobResult. + :type column_name: str + + :param object_type: + The value to assign to the object_type property of this DiscoveryJobResult. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param data_type: + The value to assign to the data_type property of this DiscoveryJobResult. + :type data_type: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this DiscoveryJobResult. + :type sensitive_type_id: str + + :param parent_column_keys: + The value to assign to the parent_column_keys property of this DiscoveryJobResult. + :type parent_column_keys: list[str] + + :param relation_type: + The value to assign to the relation_type property of this DiscoveryJobResult. + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type relation_type: str + + :param estimated_data_value_count: + The value to assign to the estimated_data_value_count property of this DiscoveryJobResult. + :type estimated_data_value_count: int + + :param sample_data_values: + The value to assign to the sample_data_values property of this DiscoveryJobResult. + :type sample_data_values: list[str] + + :param app_defined_child_column_keys: + The value to assign to the app_defined_child_column_keys property of this DiscoveryJobResult. + :type app_defined_child_column_keys: list[str] + + :param db_defined_child_column_keys: + The value to assign to the db_defined_child_column_keys property of this DiscoveryJobResult. + :type db_defined_child_column_keys: list[str] + + :param planned_action: + The value to assign to the planned_action property of this DiscoveryJobResult. + Allowed values for this property are: "NONE", "ACCEPT", "INVALIDATE", "REJECT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type planned_action: str + + :param is_result_applied: + The value to assign to the is_result_applied property of this DiscoveryJobResult. + :type is_result_applied: bool + + :param modified_attributes: + The value to assign to the modified_attributes property of this DiscoveryJobResult. + :type modified_attributes: oci.data_safe.models.ModifiedAttributes + + """ + self.swagger_types = { + 'key': 'str', + 'discovery_type': 'str', + 'sensitive_columnkey': 'str', + 'app_name': 'str', + 'schema_name': 'str', + 'object_name': 'str', + 'column_name': 'str', + 'object_type': 'str', + 'data_type': 'str', + 'sensitive_type_id': 'str', + 'parent_column_keys': 'list[str]', + 'relation_type': 'str', + 'estimated_data_value_count': 'int', + 'sample_data_values': 'list[str]', + 'app_defined_child_column_keys': 'list[str]', + 'db_defined_child_column_keys': 'list[str]', + 'planned_action': 'str', + 'is_result_applied': 'bool', + 'modified_attributes': 'ModifiedAttributes' + } + + self.attribute_map = { + 'key': 'key', + 'discovery_type': 'discoveryType', + 'sensitive_columnkey': 'sensitiveColumnkey', + 'app_name': 'appName', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'column_name': 'columnName', + 'object_type': 'objectType', + 'data_type': 'dataType', + 'sensitive_type_id': 'sensitiveTypeId', + 'parent_column_keys': 'parentColumnKeys', + 'relation_type': 'relationType', + 'estimated_data_value_count': 'estimatedDataValueCount', + 'sample_data_values': 'sampleDataValues', + 'app_defined_child_column_keys': 'appDefinedChildColumnKeys', + 'db_defined_child_column_keys': 'dbDefinedChildColumnKeys', + 'planned_action': 'plannedAction', + 'is_result_applied': 'isResultApplied', + 'modified_attributes': 'modifiedAttributes' + } + + self._key = None + self._discovery_type = None + self._sensitive_columnkey = None + self._app_name = None + self._schema_name = None + self._object_name = None + self._column_name = None + self._object_type = None + self._data_type = None + self._sensitive_type_id = None + self._parent_column_keys = None + self._relation_type = None + self._estimated_data_value_count = None + self._sample_data_values = None + self._app_defined_child_column_keys = None + self._db_defined_child_column_keys = None + self._planned_action = None + self._is_result_applied = None + self._modified_attributes = None + + @property + def key(self): + """ + **[Required]** Gets the key of this DiscoveryJobResult. + The unique key that identifies the discovery result. + + + :return: The key of this DiscoveryJobResult. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DiscoveryJobResult. + The unique key that identifies the discovery result. + + + :param key: The key of this DiscoveryJobResult. + :type: str + """ + self._key = key + + @property + def discovery_type(self): + """ + **[Required]** Gets the discovery_type of this DiscoveryJobResult. + The type of the discovery result. It can be one of the following three types: + NEW: A new sensitive column in the target database that is not in the sensitive data model. + DELETED: A column that is present in the sensitive data model but has been deleted from the target database. + MODIFIED: A column that is present in the target database as well as the sensitive data model but some of its attributes have been modified. + + Allowed values for this property are: "NEW", "MODIFIED", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The discovery_type of this DiscoveryJobResult. + :rtype: str + """ + return self._discovery_type + + @discovery_type.setter + def discovery_type(self, discovery_type): + """ + Sets the discovery_type of this DiscoveryJobResult. + The type of the discovery result. It can be one of the following three types: + NEW: A new sensitive column in the target database that is not in the sensitive data model. + DELETED: A column that is present in the sensitive data model but has been deleted from the target database. + MODIFIED: A column that is present in the target database as well as the sensitive data model but some of its attributes have been modified. + + + :param discovery_type: The discovery_type of this DiscoveryJobResult. + :type: str + """ + allowed_values = ["NEW", "MODIFIED", "DELETED"] + if not value_allowed_none_or_none_sentinel(discovery_type, allowed_values): + discovery_type = 'UNKNOWN_ENUM_VALUE' + self._discovery_type = discovery_type + + @property + def sensitive_columnkey(self): + """ + Gets the sensitive_columnkey of this DiscoveryJobResult. + The unique key that identifies the sensitive column represented by the discovery result. + + + :return: The sensitive_columnkey of this DiscoveryJobResult. + :rtype: str + """ + return self._sensitive_columnkey + + @sensitive_columnkey.setter + def sensitive_columnkey(self, sensitive_columnkey): + """ + Sets the sensitive_columnkey of this DiscoveryJobResult. + The unique key that identifies the sensitive column represented by the discovery result. + + + :param sensitive_columnkey: The sensitive_columnkey of this DiscoveryJobResult. + :type: str + """ + self._sensitive_columnkey = sensitive_columnkey + + @property + def app_name(self): + """ + Gets the app_name of this DiscoveryJobResult. + The name of the application. An application is an entity that is identified by a schema and stores sensitive information for that schema. Its value will be same as schemaName, if no value is passed. + + + :return: The app_name of this DiscoveryJobResult. + :rtype: str + """ + return self._app_name + + @app_name.setter + def app_name(self, app_name): + """ + Sets the app_name of this DiscoveryJobResult. + The name of the application. An application is an entity that is identified by a schema and stores sensitive information for that schema. Its value will be same as schemaName, if no value is passed. + + + :param app_name: The app_name of this DiscoveryJobResult. + :type: str + """ + self._app_name = app_name + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this DiscoveryJobResult. + The database schema that contains the sensitive column. + + + :return: The schema_name of this DiscoveryJobResult. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this DiscoveryJobResult. + The database schema that contains the sensitive column. + + + :param schema_name: The schema_name of this DiscoveryJobResult. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this DiscoveryJobResult. + The database object that contains the sensitive column. + + + :return: The object_name of this DiscoveryJobResult. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this DiscoveryJobResult. + The database object that contains the sensitive column. + + + :param object_name: The object_name of this DiscoveryJobResult. + :type: str + """ + self._object_name = object_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this DiscoveryJobResult. + The name of the sensitive column. + + + :return: The column_name of this DiscoveryJobResult. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DiscoveryJobResult. + The name of the sensitive column. + + + :param column_name: The column_name of this DiscoveryJobResult. + :type: str + """ + self._column_name = column_name + + @property + def object_type(self): + """ + **[Required]** Gets the object_type of this DiscoveryJobResult. + The type of the database object that contains the sensitive column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this DiscoveryJobResult. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this DiscoveryJobResult. + The type of the database object that contains the sensitive column. + + + :param object_type: The object_type of this DiscoveryJobResult. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def data_type(self): + """ + **[Required]** Gets the data_type of this DiscoveryJobResult. + The data type of the sensitive column. + + + :return: The data_type of this DiscoveryJobResult. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this DiscoveryJobResult. + The data type of the sensitive column. + + + :param data_type: The data_type of this DiscoveryJobResult. + :type: str + """ + self._data_type = data_type + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this DiscoveryJobResult. + The OCID of the sensitive type associated with the sensitive column. + + + :return: The sensitive_type_id of this DiscoveryJobResult. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this DiscoveryJobResult. + The OCID of the sensitive type associated with the sensitive column. + + + :param sensitive_type_id: The sensitive_type_id of this DiscoveryJobResult. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def parent_column_keys(self): + """ + Gets the parent_column_keys of this DiscoveryJobResult. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :return: The parent_column_keys of this DiscoveryJobResult. + :rtype: list[str] + """ + return self._parent_column_keys + + @parent_column_keys.setter + def parent_column_keys(self, parent_column_keys): + """ + Sets the parent_column_keys of this DiscoveryJobResult. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :param parent_column_keys: The parent_column_keys of this DiscoveryJobResult. + :type: list[str] + """ + self._parent_column_keys = parent_column_keys + + @property + def relation_type(self): + """ + **[Required]** Gets the relation_type of this DiscoveryJobResult. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The relation_type of this DiscoveryJobResult. + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """ + Sets the relation_type of this DiscoveryJobResult. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + + :param relation_type: The relation_type of this DiscoveryJobResult. + :type: str + """ + allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + if not value_allowed_none_or_none_sentinel(relation_type, allowed_values): + relation_type = 'UNKNOWN_ENUM_VALUE' + self._relation_type = relation_type + + @property + def estimated_data_value_count(self): + """ + **[Required]** Gets the estimated_data_value_count of this DiscoveryJobResult. + The estimated number of data values the column has in the associated database. + + + :return: The estimated_data_value_count of this DiscoveryJobResult. + :rtype: int + """ + return self._estimated_data_value_count + + @estimated_data_value_count.setter + def estimated_data_value_count(self, estimated_data_value_count): + """ + Sets the estimated_data_value_count of this DiscoveryJobResult. + The estimated number of data values the column has in the associated database. + + + :param estimated_data_value_count: The estimated_data_value_count of this DiscoveryJobResult. + :type: int + """ + self._estimated_data_value_count = estimated_data_value_count + + @property + def sample_data_values(self): + """ + Gets the sample_data_values of this DiscoveryJobResult. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :return: The sample_data_values of this DiscoveryJobResult. + :rtype: list[str] + """ + return self._sample_data_values + + @sample_data_values.setter + def sample_data_values(self, sample_data_values): + """ + Sets the sample_data_values of this DiscoveryJobResult. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :param sample_data_values: The sample_data_values of this DiscoveryJobResult. + :type: list[str] + """ + self._sample_data_values = sample_data_values + + @property + def app_defined_child_column_keys(self): + """ + Gets the app_defined_child_column_keys of this DiscoveryJobResult. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + + + :return: The app_defined_child_column_keys of this DiscoveryJobResult. + :rtype: list[str] + """ + return self._app_defined_child_column_keys + + @app_defined_child_column_keys.setter + def app_defined_child_column_keys(self, app_defined_child_column_keys): + """ + Sets the app_defined_child_column_keys of this DiscoveryJobResult. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + + + :param app_defined_child_column_keys: The app_defined_child_column_keys of this DiscoveryJobResult. + :type: list[str] + """ + self._app_defined_child_column_keys = app_defined_child_column_keys + + @property + def db_defined_child_column_keys(self): + """ + Gets the db_defined_child_column_keys of this DiscoveryJobResult. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + + + :return: The db_defined_child_column_keys of this DiscoveryJobResult. + :rtype: list[str] + """ + return self._db_defined_child_column_keys + + @db_defined_child_column_keys.setter + def db_defined_child_column_keys(self, db_defined_child_column_keys): + """ + Sets the db_defined_child_column_keys of this DiscoveryJobResult. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + + + :param db_defined_child_column_keys: The db_defined_child_column_keys of this DiscoveryJobResult. + :type: list[str] + """ + self._db_defined_child_column_keys = db_defined_child_column_keys + + @property + def planned_action(self): + """ + **[Required]** Gets the planned_action of this DiscoveryJobResult. + Specifies how to process the discovery result. It's set to NONE by default. Use the PatchDiscoveryJobResults operation to update this attribute. You can choose one of the following options: + ACCEPT: To accept the discovery result and update the sensitive data model to reflect the changes. + REJECT: To reject the discovery result so that it doesn't change the sensitive data model. + INVALIDATE: To invalidate a newly discovered column. It adds the column to the sensitive data model but marks it as invalid. It helps track false positives and ensure that they aren't reported by future discovery jobs. + After specifying the planned action, you can use the ApplyDiscoveryJobResults operation to automatically process the discovery results. + + Allowed values for this property are: "NONE", "ACCEPT", "INVALIDATE", "REJECT", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The planned_action of this DiscoveryJobResult. + :rtype: str + """ + return self._planned_action + + @planned_action.setter + def planned_action(self, planned_action): + """ + Sets the planned_action of this DiscoveryJobResult. + Specifies how to process the discovery result. It's set to NONE by default. Use the PatchDiscoveryJobResults operation to update this attribute. You can choose one of the following options: + ACCEPT: To accept the discovery result and update the sensitive data model to reflect the changes. + REJECT: To reject the discovery result so that it doesn't change the sensitive data model. + INVALIDATE: To invalidate a newly discovered column. It adds the column to the sensitive data model but marks it as invalid. It helps track false positives and ensure that they aren't reported by future discovery jobs. + After specifying the planned action, you can use the ApplyDiscoveryJobResults operation to automatically process the discovery results. + + + :param planned_action: The planned_action of this DiscoveryJobResult. + :type: str + """ + allowed_values = ["NONE", "ACCEPT", "INVALIDATE", "REJECT"] + if not value_allowed_none_or_none_sentinel(planned_action, allowed_values): + planned_action = 'UNKNOWN_ENUM_VALUE' + self._planned_action = planned_action + + @property + def is_result_applied(self): + """ + **[Required]** Gets the is_result_applied of this DiscoveryJobResult. + Indicates if the discovery result has been processed. You can update this attribute using the PatchDiscoveryJobResults + operation to track whether the discovery result has already been processed and applied to the sensitive data model. + + + :return: The is_result_applied of this DiscoveryJobResult. + :rtype: bool + """ + return self._is_result_applied + + @is_result_applied.setter + def is_result_applied(self, is_result_applied): + """ + Sets the is_result_applied of this DiscoveryJobResult. + Indicates if the discovery result has been processed. You can update this attribute using the PatchDiscoveryJobResults + operation to track whether the discovery result has already been processed and applied to the sensitive data model. + + + :param is_result_applied: The is_result_applied of this DiscoveryJobResult. + :type: bool + """ + self._is_result_applied = is_result_applied + + @property + def modified_attributes(self): + """ + Gets the modified_attributes of this DiscoveryJobResult. + + :return: The modified_attributes of this DiscoveryJobResult. + :rtype: oci.data_safe.models.ModifiedAttributes + """ + return self._modified_attributes + + @modified_attributes.setter + def modified_attributes(self, modified_attributes): + """ + Sets the modified_attributes of this DiscoveryJobResult. + + :param modified_attributes: The modified_attributes of this DiscoveryJobResult. + :type: oci.data_safe.models.ModifiedAttributes + """ + self._modified_attributes = modified_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/data_safe/models/discovery_job_result_collection.py b/src/oci/data_safe/models/discovery_job_result_collection.py new file mode 100644 index 0000000000..ba1592e542 --- /dev/null +++ b/src/oci/data_safe/models/discovery_job_result_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryJobResultCollection(object): + """ + A collection of discovery job result summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryJobResultCollection 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 DiscoveryJobResultCollection. + :type items: list[oci.data_safe.models.DiscoveryJobResultSummary] + + """ + self.swagger_types = { + 'items': 'list[DiscoveryJobResultSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this DiscoveryJobResultCollection. + An array of discovery job result summary objects. + + + :return: The items of this DiscoveryJobResultCollection. + :rtype: list[oci.data_safe.models.DiscoveryJobResultSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this DiscoveryJobResultCollection. + An array of discovery job result summary objects. + + + :param items: The items of this DiscoveryJobResultCollection. + :type: list[oci.data_safe.models.DiscoveryJobResultSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_job_result_summary.py b/src/oci/data_safe/models/discovery_job_result_summary.py new file mode 100644 index 0000000000..26773c57b1 --- /dev/null +++ b/src/oci/data_safe/models/discovery_job_result_summary.py @@ -0,0 +1,566 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryJobResultSummary(object): + """ + Summary of a discovery job result. + """ + + #: A constant which can be used with the object_type property of a DiscoveryJobResultSummary. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a DiscoveryJobResultSummary. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + #: A constant which can be used with the relation_type property of a DiscoveryJobResultSummary. + #: This constant has a value of "NONE" + RELATION_TYPE_NONE = "NONE" + + #: A constant which can be used with the relation_type property of a DiscoveryJobResultSummary. + #: This constant has a value of "APP_DEFINED" + RELATION_TYPE_APP_DEFINED = "APP_DEFINED" + + #: A constant which can be used with the relation_type property of a DiscoveryJobResultSummary. + #: This constant has a value of "DB_DEFINED" + RELATION_TYPE_DB_DEFINED = "DB_DEFINED" + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryJobResultSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this DiscoveryJobResultSummary. + :type key: str + + :param discovery_type: + The value to assign to the discovery_type property of this DiscoveryJobResultSummary. + :type discovery_type: str + + :param sensitive_columnkey: + The value to assign to the sensitive_columnkey property of this DiscoveryJobResultSummary. + :type sensitive_columnkey: str + + :param schema_name: + The value to assign to the schema_name property of this DiscoveryJobResultSummary. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this DiscoveryJobResultSummary. + :type object_name: str + + :param column_name: + The value to assign to the column_name property of this DiscoveryJobResultSummary. + :type column_name: str + + :param object_type: + The value to assign to the object_type property of this DiscoveryJobResultSummary. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param data_type: + The value to assign to the data_type property of this DiscoveryJobResultSummary. + :type data_type: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this DiscoveryJobResultSummary. + :type sensitive_type_id: str + + :param parent_column_keys: + The value to assign to the parent_column_keys property of this DiscoveryJobResultSummary. + :type parent_column_keys: list[str] + + :param relation_type: + The value to assign to the relation_type property of this DiscoveryJobResultSummary. + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type relation_type: str + + :param estimated_data_value_count: + The value to assign to the estimated_data_value_count property of this DiscoveryJobResultSummary. + :type estimated_data_value_count: int + + :param sample_data_values: + The value to assign to the sample_data_values property of this DiscoveryJobResultSummary. + :type sample_data_values: list[str] + + :param planned_action: + The value to assign to the planned_action property of this DiscoveryJobResultSummary. + :type planned_action: str + + :param is_result_applied: + The value to assign to the is_result_applied property of this DiscoveryJobResultSummary. + :type is_result_applied: bool + + """ + self.swagger_types = { + 'key': 'str', + 'discovery_type': 'str', + 'sensitive_columnkey': 'str', + 'schema_name': 'str', + 'object_name': 'str', + 'column_name': 'str', + 'object_type': 'str', + 'data_type': 'str', + 'sensitive_type_id': 'str', + 'parent_column_keys': 'list[str]', + 'relation_type': 'str', + 'estimated_data_value_count': 'int', + 'sample_data_values': 'list[str]', + 'planned_action': 'str', + 'is_result_applied': 'bool' + } + + self.attribute_map = { + 'key': 'key', + 'discovery_type': 'discoveryType', + 'sensitive_columnkey': 'sensitiveColumnkey', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'column_name': 'columnName', + 'object_type': 'objectType', + 'data_type': 'dataType', + 'sensitive_type_id': 'sensitiveTypeId', + 'parent_column_keys': 'parentColumnKeys', + 'relation_type': 'relationType', + 'estimated_data_value_count': 'estimatedDataValueCount', + 'sample_data_values': 'sampleDataValues', + 'planned_action': 'plannedAction', + 'is_result_applied': 'isResultApplied' + } + + self._key = None + self._discovery_type = None + self._sensitive_columnkey = None + self._schema_name = None + self._object_name = None + self._column_name = None + self._object_type = None + self._data_type = None + self._sensitive_type_id = None + self._parent_column_keys = None + self._relation_type = None + self._estimated_data_value_count = None + self._sample_data_values = None + self._planned_action = None + self._is_result_applied = None + + @property + def key(self): + """ + **[Required]** Gets the key of this DiscoveryJobResultSummary. + The unique key that identifies the discovery result. + + + :return: The key of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this DiscoveryJobResultSummary. + The unique key that identifies the discovery result. + + + :param key: The key of this DiscoveryJobResultSummary. + :type: str + """ + self._key = key + + @property + def discovery_type(self): + """ + **[Required]** Gets the discovery_type of this DiscoveryJobResultSummary. + The type of the discovery result. It can be one of the following three types: + NEW: A new sensitive column in the target database that is not in the sensitive data model. + DELETED: A column that is present in the sensitive data model but has been deleted from the target database. + MODIFIED: A column that is present in the target database as well as the sensitive data model but some of its attributes have been modified. + + + :return: The discovery_type of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._discovery_type + + @discovery_type.setter + def discovery_type(self, discovery_type): + """ + Sets the discovery_type of this DiscoveryJobResultSummary. + The type of the discovery result. It can be one of the following three types: + NEW: A new sensitive column in the target database that is not in the sensitive data model. + DELETED: A column that is present in the sensitive data model but has been deleted from the target database. + MODIFIED: A column that is present in the target database as well as the sensitive data model but some of its attributes have been modified. + + + :param discovery_type: The discovery_type of this DiscoveryJobResultSummary. + :type: str + """ + self._discovery_type = discovery_type + + @property + def sensitive_columnkey(self): + """ + Gets the sensitive_columnkey of this DiscoveryJobResultSummary. + The unique key that identifies the sensitive column represented by the discovery result. + + + :return: The sensitive_columnkey of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._sensitive_columnkey + + @sensitive_columnkey.setter + def sensitive_columnkey(self, sensitive_columnkey): + """ + Sets the sensitive_columnkey of this DiscoveryJobResultSummary. + The unique key that identifies the sensitive column represented by the discovery result. + + + :param sensitive_columnkey: The sensitive_columnkey of this DiscoveryJobResultSummary. + :type: str + """ + self._sensitive_columnkey = sensitive_columnkey + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this DiscoveryJobResultSummary. + The database schema that contains the sensitive column. + + + :return: The schema_name of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this DiscoveryJobResultSummary. + The database schema that contains the sensitive column. + + + :param schema_name: The schema_name of this DiscoveryJobResultSummary. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this DiscoveryJobResultSummary. + The database object that contains the sensitive column. + + + :return: The object_name of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this DiscoveryJobResultSummary. + The database object that contains the sensitive column. + + + :param object_name: The object_name of this DiscoveryJobResultSummary. + :type: str + """ + self._object_name = object_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this DiscoveryJobResultSummary. + The name of the sensitive column. + + + :return: The column_name of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this DiscoveryJobResultSummary. + The name of the sensitive column. + + + :param column_name: The column_name of this DiscoveryJobResultSummary. + :type: str + """ + self._column_name = column_name + + @property + def object_type(self): + """ + **[Required]** Gets the object_type of this DiscoveryJobResultSummary. + The type of the database object that contains the sensitive column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this DiscoveryJobResultSummary. + The type of the database object that contains the sensitive column. + + + :param object_type: The object_type of this DiscoveryJobResultSummary. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def data_type(self): + """ + **[Required]** Gets the data_type of this DiscoveryJobResultSummary. + The data type of the sensitive column. + + + :return: The data_type of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this DiscoveryJobResultSummary. + The data type of the sensitive column. + + + :param data_type: The data_type of this DiscoveryJobResultSummary. + :type: str + """ + self._data_type = data_type + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this DiscoveryJobResultSummary. + The OCID of the sensitive type associated with the sensitive column. + + + :return: The sensitive_type_id of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this DiscoveryJobResultSummary. + The OCID of the sensitive type associated with the sensitive column. + + + :param sensitive_type_id: The sensitive_type_id of this DiscoveryJobResultSummary. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def parent_column_keys(self): + """ + Gets the parent_column_keys of this DiscoveryJobResultSummary. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :return: The parent_column_keys of this DiscoveryJobResultSummary. + :rtype: list[str] + """ + return self._parent_column_keys + + @parent_column_keys.setter + def parent_column_keys(self, parent_column_keys): + """ + Sets the parent_column_keys of this DiscoveryJobResultSummary. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :param parent_column_keys: The parent_column_keys of this DiscoveryJobResultSummary. + :type: list[str] + """ + self._parent_column_keys = parent_column_keys + + @property + def relation_type(self): + """ + **[Required]** Gets the relation_type of this DiscoveryJobResultSummary. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The relation_type of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """ + Sets the relation_type of this DiscoveryJobResultSummary. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + + :param relation_type: The relation_type of this DiscoveryJobResultSummary. + :type: str + """ + allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + if not value_allowed_none_or_none_sentinel(relation_type, allowed_values): + relation_type = 'UNKNOWN_ENUM_VALUE' + self._relation_type = relation_type + + @property + def estimated_data_value_count(self): + """ + **[Required]** Gets the estimated_data_value_count of this DiscoveryJobResultSummary. + The estimated number of data values the column has in the associated database. + + + :return: The estimated_data_value_count of this DiscoveryJobResultSummary. + :rtype: int + """ + return self._estimated_data_value_count + + @estimated_data_value_count.setter + def estimated_data_value_count(self, estimated_data_value_count): + """ + Sets the estimated_data_value_count of this DiscoveryJobResultSummary. + The estimated number of data values the column has in the associated database. + + + :param estimated_data_value_count: The estimated_data_value_count of this DiscoveryJobResultSummary. + :type: int + """ + self._estimated_data_value_count = estimated_data_value_count + + @property + def sample_data_values(self): + """ + Gets the sample_data_values of this DiscoveryJobResultSummary. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :return: The sample_data_values of this DiscoveryJobResultSummary. + :rtype: list[str] + """ + return self._sample_data_values + + @sample_data_values.setter + def sample_data_values(self, sample_data_values): + """ + Sets the sample_data_values of this DiscoveryJobResultSummary. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :param sample_data_values: The sample_data_values of this DiscoveryJobResultSummary. + :type: list[str] + """ + self._sample_data_values = sample_data_values + + @property + def planned_action(self): + """ + **[Required]** Gets the planned_action of this DiscoveryJobResultSummary. + Specifies how to process the discovery result. It's set to NONE by default. Use the PatchDiscoveryJobResults operation to update this attribute. You can choose one of the following options: + ACCEPT: To accept the discovery result and update the sensitive data model to reflect the changes. + REJECT: To reject the discovery result so that it doesn't change the sensitive data model. + INVALIDATE: To invalidate a newly discovered column. It adds the column to the sensitive data model but marks it as invalid. It helps track false positives and ensure that they aren't reported by future discovery jobs. + After specifying the planned action, you can use the ApplyDiscoveryJobResults operation to automatically process the discovery results. + + + :return: The planned_action of this DiscoveryJobResultSummary. + :rtype: str + """ + return self._planned_action + + @planned_action.setter + def planned_action(self, planned_action): + """ + Sets the planned_action of this DiscoveryJobResultSummary. + Specifies how to process the discovery result. It's set to NONE by default. Use the PatchDiscoveryJobResults operation to update this attribute. You can choose one of the following options: + ACCEPT: To accept the discovery result and update the sensitive data model to reflect the changes. + REJECT: To reject the discovery result so that it doesn't change the sensitive data model. + INVALIDATE: To invalidate a newly discovered column. It adds the column to the sensitive data model but marks it as invalid. It helps track false positives and ensure that they aren't reported by future discovery jobs. + After specifying the planned action, you can use the ApplyDiscoveryJobResults operation to automatically process the discovery results. + + + :param planned_action: The planned_action of this DiscoveryJobResultSummary. + :type: str + """ + self._planned_action = planned_action + + @property + def is_result_applied(self): + """ + **[Required]** Gets the is_result_applied of this DiscoveryJobResultSummary. + Indicates if the discovery result has been processed. You can update this attribute using the PatchDiscoveryJobResults + operation to track whether the discovery result has already been processed and applied to the sensitive data model. + + + :return: The is_result_applied of this DiscoveryJobResultSummary. + :rtype: bool + """ + return self._is_result_applied + + @is_result_applied.setter + def is_result_applied(self, is_result_applied): + """ + Sets the is_result_applied of this DiscoveryJobResultSummary. + Indicates if the discovery result has been processed. You can update this attribute using the PatchDiscoveryJobResults + operation to track whether the discovery result has already been processed and applied to the sensitive data model. + + + :param is_result_applied: The is_result_applied of this DiscoveryJobResultSummary. + :type: bool + """ + self._is_result_applied = is_result_applied + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/discovery_job_summary.py b/src/oci/data_safe/models/discovery_job_summary.py new file mode 100644 index 0000000000..16cbba6c69 --- /dev/null +++ b/src/oci/data_safe/models/discovery_job_summary.py @@ -0,0 +1,436 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DiscoveryJobSummary(object): + """ + Summary of a discovery job. + """ + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJobSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJobSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJobSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJobSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJobSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a DiscoveryJobSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new DiscoveryJobSummary 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 DiscoveryJobSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this DiscoveryJobSummary. + :type display_name: str + + :param time_started: + The value to assign to the time_started property of this DiscoveryJobSummary. + :type time_started: datetime + + :param time_finished: + The value to assign to the time_finished property of this DiscoveryJobSummary. + :type time_finished: datetime + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this DiscoveryJobSummary. + :type sensitive_data_model_id: str + + :param target_id: + The value to assign to the target_id property of this DiscoveryJobSummary. + :type target_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this DiscoveryJobSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param discovery_type: + The value to assign to the discovery_type property of this DiscoveryJobSummary. + :type discovery_type: str + + :param compartment_id: + The value to assign to the compartment_id property of this DiscoveryJobSummary. + :type compartment_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this DiscoveryJobSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this DiscoveryJobSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'time_started': 'datetime', + 'time_finished': 'datetime', + 'sensitive_data_model_id': 'str', + 'target_id': 'str', + 'lifecycle_state': 'str', + 'discovery_type': 'str', + 'compartment_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'time_started': 'timeStarted', + 'time_finished': 'timeFinished', + 'sensitive_data_model_id': 'sensitiveDataModelId', + 'target_id': 'targetId', + 'lifecycle_state': 'lifecycleState', + 'discovery_type': 'discoveryType', + 'compartment_id': 'compartmentId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._time_started = None + self._time_finished = None + self._sensitive_data_model_id = None + self._target_id = None + self._lifecycle_state = None + self._discovery_type = None + self._compartment_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this DiscoveryJobSummary. + The OCID of the discovery job. + + + :return: The id of this DiscoveryJobSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this DiscoveryJobSummary. + The OCID of the discovery job. + + + :param id: The id of this DiscoveryJobSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this DiscoveryJobSummary. + The display name of the discovery job. + + + :return: The display_name of this DiscoveryJobSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this DiscoveryJobSummary. + The display name of the discovery job. + + + :param display_name: The display_name of this DiscoveryJobSummary. + :type: str + """ + self._display_name = display_name + + @property + def time_started(self): + """ + **[Required]** Gets the time_started of this DiscoveryJobSummary. + The date and time the discovery job started, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_started of this DiscoveryJobSummary. + :rtype: datetime + """ + return self._time_started + + @time_started.setter + def time_started(self, time_started): + """ + Sets the time_started of this DiscoveryJobSummary. + The date and time the discovery job started, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_started: The time_started of this DiscoveryJobSummary. + :type: datetime + """ + self._time_started = time_started + + @property + def time_finished(self): + """ + **[Required]** Gets the time_finished of this DiscoveryJobSummary. + The date and time the discovery job finished, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_finished of this DiscoveryJobSummary. + :rtype: datetime + """ + return self._time_finished + + @time_finished.setter + def time_finished(self, time_finished): + """ + Sets the time_finished of this DiscoveryJobSummary. + The date and time the discovery job finished, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_finished: The time_finished of this DiscoveryJobSummary. + :type: datetime + """ + self._time_finished = time_finished + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this DiscoveryJobSummary. + The OCID of the sensitive data model associated with the discovery job. + + + :return: The sensitive_data_model_id of this DiscoveryJobSummary. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this DiscoveryJobSummary. + The OCID of the sensitive data model associated with the discovery job. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this DiscoveryJobSummary. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this DiscoveryJobSummary. + The OCID of the target database associated with the discovery job. + + + :return: The target_id of this DiscoveryJobSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DiscoveryJobSummary. + The OCID of the target database associated with the discovery job. + + + :param target_id: The target_id of this DiscoveryJobSummary. + :type: str + """ + self._target_id = target_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this DiscoveryJobSummary. + The current state of the discovery job. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this DiscoveryJobSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this DiscoveryJobSummary. + The current state of the discovery job. + + + :param lifecycle_state: The lifecycle_state of this DiscoveryJobSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def discovery_type(self): + """ + **[Required]** Gets the discovery_type of this DiscoveryJobSummary. + The type of discovery. + + + :return: The discovery_type of this DiscoveryJobSummary. + :rtype: str + """ + return self._discovery_type + + @discovery_type.setter + def discovery_type(self, discovery_type): + """ + Sets the discovery_type of this DiscoveryJobSummary. + The type of discovery. + + + :param discovery_type: The discovery_type of this DiscoveryJobSummary. + :type: str + """ + self._discovery_type = discovery_type + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this DiscoveryJobSummary. + The OCID of the compartment to contain the discovery job. + + + :return: The compartment_id of this DiscoveryJobSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this DiscoveryJobSummary. + The OCID of the compartment to contain the discovery job. + + + :param compartment_id: The compartment_id of this DiscoveryJobSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this DiscoveryJobSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this DiscoveryJobSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this DiscoveryJobSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this DiscoveryJobSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this DiscoveryJobSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this DiscoveryJobSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this DiscoveryJobSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this DiscoveryJobSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/download_discovery_report_details.py b/src/oci/data_safe/models/download_discovery_report_details.py new file mode 100644 index 0000000000..18d4c20a53 --- /dev/null +++ b/src/oci/data_safe/models/download_discovery_report_details.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DownloadDiscoveryReportDetails(object): + """ + Details to download a discovery report. + """ + + #: A constant which can be used with the report_format property of a DownloadDiscoveryReportDetails. + #: This constant has a value of "PDF" + REPORT_FORMAT_PDF = "PDF" + + #: A constant which can be used with the report_format property of a DownloadDiscoveryReportDetails. + #: This constant has a value of "XLS" + REPORT_FORMAT_XLS = "XLS" + + def __init__(self, **kwargs): + """ + Initializes a new DownloadDiscoveryReportDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param discovery_job_id: + The value to assign to the discovery_job_id property of this DownloadDiscoveryReportDetails. + :type discovery_job_id: str + + :param report_format: + The value to assign to the report_format property of this DownloadDiscoveryReportDetails. + Allowed values for this property are: "PDF", "XLS" + :type report_format: str + + """ + self.swagger_types = { + 'discovery_job_id': 'str', + 'report_format': 'str' + } + + self.attribute_map = { + 'discovery_job_id': 'discoveryJobId', + 'report_format': 'reportFormat' + } + + self._discovery_job_id = None + self._report_format = None + + @property + def discovery_job_id(self): + """ + Gets the discovery_job_id of this DownloadDiscoveryReportDetails. + The OCID of the discovery job. + + + :return: The discovery_job_id of this DownloadDiscoveryReportDetails. + :rtype: str + """ + return self._discovery_job_id + + @discovery_job_id.setter + def discovery_job_id(self, discovery_job_id): + """ + Sets the discovery_job_id of this DownloadDiscoveryReportDetails. + The OCID of the discovery job. + + + :param discovery_job_id: The discovery_job_id of this DownloadDiscoveryReportDetails. + :type: str + """ + self._discovery_job_id = discovery_job_id + + @property + def report_format(self): + """ + Gets the report_format of this DownloadDiscoveryReportDetails. + Format of the report. + + Allowed values for this property are: "PDF", "XLS" + + + :return: The report_format of this DownloadDiscoveryReportDetails. + :rtype: str + """ + return self._report_format + + @report_format.setter + def report_format(self, report_format): + """ + Sets the report_format of this DownloadDiscoveryReportDetails. + Format of the report. + + + :param report_format: The report_format of this DownloadDiscoveryReportDetails. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(report_format, allowed_values): + raise ValueError( + "Invalid value for `report_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._report_format = report_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/download_masking_log_details.py b/src/oci/data_safe/models/download_masking_log_details.py new file mode 100644 index 0000000000..43132cf5be --- /dev/null +++ b/src/oci/data_safe/models/download_masking_log_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DownloadMaskingLogDetails(object): + """ + Details to download masking log. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DownloadMaskingLogDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_id: + The value to assign to the target_id property of this DownloadMaskingLogDetails. + :type target_id: str + + """ + self.swagger_types = { + 'target_id': 'str' + } + + self.attribute_map = { + 'target_id': 'targetId' + } + + self._target_id = None + + @property + def target_id(self): + """ + Gets the target_id of this DownloadMaskingLogDetails. + The OCID of the target database for which the masking log is to be downloaded. + + + :return: The target_id of this DownloadMaskingLogDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this DownloadMaskingLogDetails. + The OCID of the target database for which the masking log is to be downloaded. + + + :param target_id: The target_id of this DownloadMaskingLogDetails. + :type: str + """ + self._target_id = target_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/download_masking_policy_details.py b/src/oci/data_safe/models/download_masking_policy_details.py new file mode 100644 index 0000000000..ca610fa222 --- /dev/null +++ b/src/oci/data_safe/models/download_masking_policy_details.py @@ -0,0 +1,83 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DownloadMaskingPolicyDetails(object): + """ + Details to download a masking policy. + """ + + #: A constant which can be used with the policy_format property of a DownloadMaskingPolicyDetails. + #: This constant has a value of "XML" + POLICY_FORMAT_XML = "XML" + + def __init__(self, **kwargs): + """ + Initializes a new DownloadMaskingPolicyDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param policy_format: + The value to assign to the policy_format property of this DownloadMaskingPolicyDetails. + Allowed values for this property are: "XML" + :type policy_format: str + + """ + self.swagger_types = { + 'policy_format': 'str' + } + + self.attribute_map = { + 'policy_format': 'policyFormat' + } + + self._policy_format = None + + @property + def policy_format(self): + """ + Gets the policy_format of this DownloadMaskingPolicyDetails. + The format of the masking policy file. + + Allowed values for this property are: "XML" + + + :return: The policy_format of this DownloadMaskingPolicyDetails. + :rtype: str + """ + return self._policy_format + + @policy_format.setter + def policy_format(self, policy_format): + """ + Sets the policy_format of this DownloadMaskingPolicyDetails. + The format of the masking policy file. + + + :param policy_format: The policy_format of this DownloadMaskingPolicyDetails. + :type: str + """ + allowed_values = ["XML"] + if not value_allowed_none_or_none_sentinel(policy_format, allowed_values): + raise ValueError( + "Invalid value for `policy_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._policy_format = policy_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/download_masking_report_details.py b/src/oci/data_safe/models/download_masking_report_details.py new file mode 100644 index 0000000000..7466a33a2d --- /dev/null +++ b/src/oci/data_safe/models/download_masking_report_details.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DownloadMaskingReportDetails(object): + """ + Details to download a masking report. + """ + + #: A constant which can be used with the report_format property of a DownloadMaskingReportDetails. + #: This constant has a value of "PDF" + REPORT_FORMAT_PDF = "PDF" + + #: A constant which can be used with the report_format property of a DownloadMaskingReportDetails. + #: This constant has a value of "XLS" + REPORT_FORMAT_XLS = "XLS" + + def __init__(self, **kwargs): + """ + Initializes a new DownloadMaskingReportDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param report_id: + The value to assign to the report_id property of this DownloadMaskingReportDetails. + :type report_id: str + + :param report_format: + The value to assign to the report_format property of this DownloadMaskingReportDetails. + Allowed values for this property are: "PDF", "XLS" + :type report_format: str + + """ + self.swagger_types = { + 'report_id': 'str', + 'report_format': 'str' + } + + self.attribute_map = { + 'report_id': 'reportId', + 'report_format': 'reportFormat' + } + + self._report_id = None + self._report_format = None + + @property + def report_id(self): + """ + **[Required]** Gets the report_id of this DownloadMaskingReportDetails. + The OCID of the masking report to be downloaded. + + + :return: The report_id of this DownloadMaskingReportDetails. + :rtype: str + """ + return self._report_id + + @report_id.setter + def report_id(self, report_id): + """ + Sets the report_id of this DownloadMaskingReportDetails. + The OCID of the masking report to be downloaded. + + + :param report_id: The report_id of this DownloadMaskingReportDetails. + :type: str + """ + self._report_id = report_id + + @property + def report_format(self): + """ + **[Required]** Gets the report_format of this DownloadMaskingReportDetails. + Format of the report. + + Allowed values for this property are: "PDF", "XLS" + + + :return: The report_format of this DownloadMaskingReportDetails. + :rtype: str + """ + return self._report_format + + @report_format.setter + def report_format(self, report_format): + """ + Sets the report_format of this DownloadMaskingReportDetails. + Format of the report. + + + :param report_format: The report_format of this DownloadMaskingReportDetails. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(report_format, allowed_values): + raise ValueError( + "Invalid value for `report_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._report_format = report_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/download_sensitive_data_model_details.py b/src/oci/data_safe/models/download_sensitive_data_model_details.py new file mode 100644 index 0000000000..b02e936166 --- /dev/null +++ b/src/oci/data_safe/models/download_sensitive_data_model_details.py @@ -0,0 +1,83 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DownloadSensitiveDataModelDetails(object): + """ + Details to download a sensitive data model. + """ + + #: A constant which can be used with the data_model_format property of a DownloadSensitiveDataModelDetails. + #: This constant has a value of "XML" + DATA_MODEL_FORMAT_XML = "XML" + + def __init__(self, **kwargs): + """ + Initializes a new DownloadSensitiveDataModelDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param data_model_format: + The value to assign to the data_model_format property of this DownloadSensitiveDataModelDetails. + Allowed values for this property are: "XML" + :type data_model_format: str + + """ + self.swagger_types = { + 'data_model_format': 'str' + } + + self.attribute_map = { + 'data_model_format': 'dataModelFormat' + } + + self._data_model_format = None + + @property + def data_model_format(self): + """ + Gets the data_model_format of this DownloadSensitiveDataModelDetails. + The format of the sensitive data model file. + + Allowed values for this property are: "XML" + + + :return: The data_model_format of this DownloadSensitiveDataModelDetails. + :rtype: str + """ + return self._data_model_format + + @data_model_format.setter + def data_model_format(self, data_model_format): + """ + Sets the data_model_format of this DownloadSensitiveDataModelDetails. + The format of the sensitive data model file. + + + :param data_model_format: The data_model_format of this DownloadSensitiveDataModelDetails. + :type: str + """ + allowed_values = ["XML"] + if not value_allowed_none_or_none_sentinel(data_model_format, allowed_values): + raise ValueError( + "Invalid value for `data_model_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._data_model_format = data_model_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/enable_conditions.py b/src/oci/data_safe/models/enable_conditions.py new file mode 100644 index 0000000000..4767ccc5e7 --- /dev/null +++ b/src/oci/data_safe/models/enable_conditions.py @@ -0,0 +1,219 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class EnableConditions(object): + """ + The details of the audit policy provisioning conditions. + """ + + #: A constant which can be used with the entity_selection property of a EnableConditions. + #: This constant has a value of "INCLUDE" + ENTITY_SELECTION_INCLUDE = "INCLUDE" + + #: A constant which can be used with the entity_selection property of a EnableConditions. + #: This constant has a value of "EXCLUDE" + ENTITY_SELECTION_EXCLUDE = "EXCLUDE" + + #: A constant which can be used with the entity_type property of a EnableConditions. + #: This constant has a value of "USER" + ENTITY_TYPE_USER = "USER" + + #: A constant which can be used with the entity_type property of a EnableConditions. + #: This constant has a value of "ROLE" + ENTITY_TYPE_ROLE = "ROLE" + + #: A constant which can be used with the entity_type property of a EnableConditions. + #: This constant has a value of "ALL_USERS" + ENTITY_TYPE_ALL_USERS = "ALL_USERS" + + #: A constant which can be used with the operation_status property of a EnableConditions. + #: This constant has a value of "SUCCESS" + OPERATION_STATUS_SUCCESS = "SUCCESS" + + #: A constant which can be used with the operation_status property of a EnableConditions. + #: This constant has a value of "FAILURE" + OPERATION_STATUS_FAILURE = "FAILURE" + + #: A constant which can be used with the operation_status property of a EnableConditions. + #: This constant has a value of "BOTH" + OPERATION_STATUS_BOTH = "BOTH" + + def __init__(self, **kwargs): + """ + Initializes a new EnableConditions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_selection: + The value to assign to the entity_selection property of this EnableConditions. + Allowed values for this property are: "INCLUDE", "EXCLUDE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_selection: str + + :param entity_type: + The value to assign to the entity_type property of this EnableConditions. + Allowed values for this property are: "USER", "ROLE", "ALL_USERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param operation_status: + The value to assign to the operation_status property of this EnableConditions. + Allowed values for this property are: "SUCCESS", "FAILURE", "BOTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type operation_status: str + + :param entity_names: + The value to assign to the entity_names property of this EnableConditions. + :type entity_names: list[str] + + """ + self.swagger_types = { + 'entity_selection': 'str', + 'entity_type': 'str', + 'operation_status': 'str', + 'entity_names': 'list[str]' + } + + self.attribute_map = { + 'entity_selection': 'entitySelection', + 'entity_type': 'entityType', + 'operation_status': 'operationStatus', + 'entity_names': 'entityNames' + } + + self._entity_selection = None + self._entity_type = None + self._operation_status = None + self._entity_names = None + + @property + def entity_selection(self): + """ + **[Required]** Gets the entity_selection of this EnableConditions. + The entity include or exclude selection. + + Allowed values for this property are: "INCLUDE", "EXCLUDE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_selection of this EnableConditions. + :rtype: str + """ + return self._entity_selection + + @entity_selection.setter + def entity_selection(self, entity_selection): + """ + Sets the entity_selection of this EnableConditions. + The entity include or exclude selection. + + + :param entity_selection: The entity_selection of this EnableConditions. + :type: str + """ + allowed_values = ["INCLUDE", "EXCLUDE"] + if not value_allowed_none_or_none_sentinel(entity_selection, allowed_values): + entity_selection = 'UNKNOWN_ENUM_VALUE' + self._entity_selection = entity_selection + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this EnableConditions. + The entity type that the policy must be enabled for. + + Allowed values for this property are: "USER", "ROLE", "ALL_USERS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this EnableConditions. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this EnableConditions. + The entity type that the policy must be enabled for. + + + :param entity_type: The entity_type of this EnableConditions. + :type: str + """ + allowed_values = ["USER", "ROLE", "ALL_USERS"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + @property + def operation_status(self): + """ + **[Required]** Gets the operation_status of this EnableConditions. + The operation status that the policy must be enabled for. + + Allowed values for this property are: "SUCCESS", "FAILURE", "BOTH", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The operation_status of this EnableConditions. + :rtype: str + """ + return self._operation_status + + @operation_status.setter + def operation_status(self, operation_status): + """ + Sets the operation_status of this EnableConditions. + The operation status that the policy must be enabled for. + + + :param operation_status: The operation_status of this EnableConditions. + :type: str + """ + allowed_values = ["SUCCESS", "FAILURE", "BOTH"] + if not value_allowed_none_or_none_sentinel(operation_status, allowed_values): + operation_status = 'UNKNOWN_ENUM_VALUE' + self._operation_status = operation_status + + @property + def entity_names(self): + """ + Gets the entity_names of this EnableConditions. + List of users or roles that the policy must be enabled for. + + + :return: The entity_names of this EnableConditions. + :rtype: list[str] + """ + return self._entity_names + + @entity_names.setter + def entity_names(self, entity_names): + """ + Sets the entity_names of this EnableConditions. + List of users or roles that the policy must be enabled for. + + + :param entity_names: The entity_names of this EnableConditions. + :type: list[str] + """ + self._entity_names = entity_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/data_safe/models/fixed_number_format_entry.py b/src/oci/data_safe/models/fixed_number_format_entry.py new file mode 100644 index 0000000000..3500c19b1e --- /dev/null +++ b/src/oci/data_safe/models/fixed_number_format_entry.py @@ -0,0 +1,88 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FixedNumberFormatEntry(FormatEntry): + """ + The Fixed Number masking format uses a constant number for masking. To learn more, + check Fixed Number in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FixedNumberFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.FixedNumberFormatEntry.type` attribute + of this class is ``FIXED_NUMBER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this FixedNumberFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this FixedNumberFormatEntry. + :type description: str + + :param fixed_number: + The value to assign to the fixed_number property of this FixedNumberFormatEntry. + :type fixed_number: float + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'fixed_number': 'float' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'fixed_number': 'fixedNumber' + } + + self._type = None + self._description = None + self._fixed_number = None + self._type = 'FIXED_NUMBER' + + @property + def fixed_number(self): + """ + **[Required]** Gets the fixed_number of this FixedNumberFormatEntry. + The constant number to be used for masking. + + + :return: The fixed_number of this FixedNumberFormatEntry. + :rtype: float + """ + return self._fixed_number + + @fixed_number.setter + def fixed_number(self, fixed_number): + """ + Sets the fixed_number of this FixedNumberFormatEntry. + The constant number to be used for masking. + + + :param fixed_number: The fixed_number of this FixedNumberFormatEntry. + :type: float + """ + self._fixed_number = fixed_number + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/fixed_string_format_entry.py b/src/oci/data_safe/models/fixed_string_format_entry.py new file mode 100644 index 0000000000..13c0e3560b --- /dev/null +++ b/src/oci/data_safe/models/fixed_string_format_entry.py @@ -0,0 +1,88 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FixedStringFormatEntry(FormatEntry): + """ + The Fixed String masking format uses a constant string for masking. To learn + more, check Fixed String in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FixedStringFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.FixedStringFormatEntry.type` attribute + of this class is ``FIXED_STRING`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this FixedStringFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this FixedStringFormatEntry. + :type description: str + + :param fixed_string: + The value to assign to the fixed_string property of this FixedStringFormatEntry. + :type fixed_string: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'fixed_string': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'fixed_string': 'fixedString' + } + + self._type = None + self._description = None + self._fixed_string = None + self._type = 'FIXED_STRING' + + @property + def fixed_string(self): + """ + **[Required]** Gets the fixed_string of this FixedStringFormatEntry. + The constant string to be used for masking. + + + :return: The fixed_string of this FixedStringFormatEntry. + :rtype: str + """ + return self._fixed_string + + @fixed_string.setter + def fixed_string(self, fixed_string): + """ + Sets the fixed_string of this FixedStringFormatEntry. + The constant string to be used for masking. + + + :param fixed_string: The fixed_string of this FixedStringFormatEntry. + :type: str + """ + self._fixed_string = fixed_string + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/format_entry.py b/src/oci/data_safe/models/format_entry.py new file mode 100644 index 0000000000..66fb81da6f --- /dev/null +++ b/src/oci/data_safe/models/format_entry.py @@ -0,0 +1,309 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FormatEntry(object): + """ + A format entry is part of a masking format and defines the logic to mask data. A format + entry can be a basic masking format such as Random Number, or it can be a library masking + format. If a masking format has more than one format entries, the combined output of all + the format entries is used for masking. + """ + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "DELETE_ROWS" + TYPE_DELETE_ROWS = "DELETE_ROWS" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "DETERMINISTIC_SUBSTITUTION" + TYPE_DETERMINISTIC_SUBSTITUTION = "DETERMINISTIC_SUBSTITUTION" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "DETERMINISTIC_ENCRYPTION" + TYPE_DETERMINISTIC_ENCRYPTION = "DETERMINISTIC_ENCRYPTION" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "DETERMINISTIC_ENCRYPTION_DATE" + TYPE_DETERMINISTIC_ENCRYPTION_DATE = "DETERMINISTIC_ENCRYPTION_DATE" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "FIXED_NUMBER" + TYPE_FIXED_NUMBER = "FIXED_NUMBER" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "FIXED_STRING" + TYPE_FIXED_STRING = "FIXED_STRING" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "LIBRARY_MASKING_FORMAT" + TYPE_LIBRARY_MASKING_FORMAT = "LIBRARY_MASKING_FORMAT" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "NULL_VALUE" + TYPE_NULL_VALUE = "NULL_VALUE" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "POST_PROCESSING_FUNCTION" + TYPE_POST_PROCESSING_FUNCTION = "POST_PROCESSING_FUNCTION" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "PRESERVE_ORIGINAL_DATA" + TYPE_PRESERVE_ORIGINAL_DATA = "PRESERVE_ORIGINAL_DATA" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_DATE" + TYPE_RANDOM_DATE = "RANDOM_DATE" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_DECIMAL_NUMBER" + TYPE_RANDOM_DECIMAL_NUMBER = "RANDOM_DECIMAL_NUMBER" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_DIGITS" + TYPE_RANDOM_DIGITS = "RANDOM_DIGITS" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_LIST" + TYPE_RANDOM_LIST = "RANDOM_LIST" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_NUMBER" + TYPE_RANDOM_NUMBER = "RANDOM_NUMBER" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_STRING" + TYPE_RANDOM_STRING = "RANDOM_STRING" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "RANDOM_SUBSTITUTION" + TYPE_RANDOM_SUBSTITUTION = "RANDOM_SUBSTITUTION" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "REGULAR_EXPRESSION" + TYPE_REGULAR_EXPRESSION = "REGULAR_EXPRESSION" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "SHUFFLE" + TYPE_SHUFFLE = "SHUFFLE" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "SQL_EXPRESSION" + TYPE_SQL_EXPRESSION = "SQL_EXPRESSION" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "SUBSTRING" + TYPE_SUBSTRING = "SUBSTRING" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "TRUNCATE_TABLE" + TYPE_TRUNCATE_TABLE = "TRUNCATE_TABLE" + + #: A constant which can be used with the type property of a FormatEntry. + #: This constant has a value of "USER_DEFINED_FUNCTION" + TYPE_USER_DEFINED_FUNCTION = "USER_DEFINED_FUNCTION" + + def __init__(self, **kwargs): + """ + Initializes a new FormatEntry object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.RandomStringFormatEntry` + * :class:`~oci.data_safe.models.DeterministicSubstitutionFormatEntry` + * :class:`~oci.data_safe.models.DeterministicEncryptionFormatEntry` + * :class:`~oci.data_safe.models.RandomDecimalNumberFormatEntry` + * :class:`~oci.data_safe.models.RandomSubstitutionFormatEntry` + * :class:`~oci.data_safe.models.PPFFormatEntry` + * :class:`~oci.data_safe.models.NullValueFormatEntry` + * :class:`~oci.data_safe.models.FixedNumberFormatEntry` + * :class:`~oci.data_safe.models.RegularExpressionFormatEntry` + * :class:`~oci.data_safe.models.UDFFormatEntry` + * :class:`~oci.data_safe.models.ShuffleFormatEntry` + * :class:`~oci.data_safe.models.FixedStringFormatEntry` + * :class:`~oci.data_safe.models.TruncateTableFormatEntry` + * :class:`~oci.data_safe.models.LibraryMaskingFormatEntry` + * :class:`~oci.data_safe.models.SQLExpressionFormatEntry` + * :class:`~oci.data_safe.models.DeterministicEncryptionDateFormatEntry` + * :class:`~oci.data_safe.models.RandomDigitsFormatEntry` + * :class:`~oci.data_safe.models.DeleteRowsFormatEntry` + * :class:`~oci.data_safe.models.SubstringFormatEntry` + * :class:`~oci.data_safe.models.RandomNumberFormatEntry` + * :class:`~oci.data_safe.models.PreserveOriginalDataFormatEntry` + * :class:`~oci.data_safe.models.RandomDateFormatEntry` + * :class:`~oci.data_safe.models.RandomListFormatEntry` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this FormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param description: + The value to assign to the description property of this FormatEntry. + :type description: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description' + } + + self._type = None + self._description = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['type'] + + if type == 'RANDOM_STRING': + return 'RandomStringFormatEntry' + + if type == 'DETERMINISTIC_SUBSTITUTION': + return 'DeterministicSubstitutionFormatEntry' + + if type == 'DETERMINISTIC_ENCRYPTION': + return 'DeterministicEncryptionFormatEntry' + + if type == 'RANDOM_DECIMAL_NUMBER': + return 'RandomDecimalNumberFormatEntry' + + if type == 'RANDOM_SUBSTITUTION': + return 'RandomSubstitutionFormatEntry' + + if type == 'POST_PROCESSING_FUNCTION': + return 'PPFFormatEntry' + + if type == 'NULL_VALUE': + return 'NullValueFormatEntry' + + if type == 'FIXED_NUMBER': + return 'FixedNumberFormatEntry' + + if type == 'REGULAR_EXPRESSION': + return 'RegularExpressionFormatEntry' + + if type == 'USER_DEFINED_FUNCTION': + return 'UDFFormatEntry' + + if type == 'SHUFFLE': + return 'ShuffleFormatEntry' + + if type == 'FIXED_STRING': + return 'FixedStringFormatEntry' + + if type == 'TRUNCATE_TABLE': + return 'TruncateTableFormatEntry' + + if type == 'LIBRARY_MASKING_FORMAT': + return 'LibraryMaskingFormatEntry' + + if type == 'SQL_EXPRESSION': + return 'SQLExpressionFormatEntry' + + if type == 'DETERMINISTIC_ENCRYPTION_DATE': + return 'DeterministicEncryptionDateFormatEntry' + + if type == 'RANDOM_DIGITS': + return 'RandomDigitsFormatEntry' + + if type == 'DELETE_ROWS': + return 'DeleteRowsFormatEntry' + + if type == 'SUBSTRING': + return 'SubstringFormatEntry' + + if type == 'RANDOM_NUMBER': + return 'RandomNumberFormatEntry' + + if type == 'PRESERVE_ORIGINAL_DATA': + return 'PreserveOriginalDataFormatEntry' + + if type == 'RANDOM_DATE': + return 'RandomDateFormatEntry' + + if type == 'RANDOM_LIST': + return 'RandomListFormatEntry' + else: + return 'FormatEntry' + + @property + def type(self): + """ + **[Required]** Gets the type of this FormatEntry. + The type of the format entry. + + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this FormatEntry. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this FormatEntry. + The type of the format entry. + + + :param type: The type of this FormatEntry. + :type: str + """ + allowed_values = ["DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def description(self): + """ + Gets the description of this FormatEntry. + The description of the format entry. + + + :return: The description of this FormatEntry. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this FormatEntry. + The description of the format entry. + + + :param description: The description of this FormatEntry. + :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/data_safe/models/format_summary.py b/src/oci/data_safe/models/format_summary.py new file mode 100644 index 0000000000..2ef59353de --- /dev/null +++ b/src/oci/data_safe/models/format_summary.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FormatSummary(object): + """ + Summary of a masking format. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FormatSummary 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 FormatSummary. + :type id: str + + :param name: + The value to assign to the name property of this FormatSummary. + :type name: str + + :param description: + The value to assign to the description property of this FormatSummary. + :type description: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'description': 'description' + } + + self._id = None + self._name = None + self._description = None + + @property + def id(self): + """ + Gets the id of this FormatSummary. + The OCID of the masking format. + + + :return: The id of this FormatSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this FormatSummary. + The OCID of the masking format. + + + :param id: The id of this FormatSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this FormatSummary. + The name of the masking format. + + + :return: The name of this FormatSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this FormatSummary. + The name of the masking format. + + + :param name: The name of this FormatSummary. + :type: str + """ + self._name = name + + @property + def description(self): + """ + Gets the description of this FormatSummary. + The description of the masking format. + + + :return: The description of this FormatSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this FormatSummary. + The description of the masking format. + + + :param description: The description of this FormatSummary. + :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/data_safe/models/formats_for_data_type.py b/src/oci/data_safe/models/formats_for_data_type.py new file mode 100644 index 0000000000..1c6856a3ac --- /dev/null +++ b/src/oci/data_safe/models/formats_for_data_type.py @@ -0,0 +1,111 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FormatsForDataType(object): + """ + A list of basic masking formats compatible with a supported data type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FormatsForDataType object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param data_type: + The value to assign to the data_type property of this FormatsForDataType. + :type data_type: str + + :param masking_formats: + The value to assign to the masking_formats property of this FormatsForDataType. + :type masking_formats: list[oci.data_safe.models.FormatSummary] + + """ + self.swagger_types = { + 'data_type': 'str', + 'masking_formats': 'list[FormatSummary]' + } + + self.attribute_map = { + 'data_type': 'dataType', + 'masking_formats': 'maskingFormats' + } + + self._data_type = None + self._masking_formats = None + + @property + def data_type(self): + """ + **[Required]** Gets the data_type of this FormatsForDataType. + The data type category, which can be one of the following - + Character - Includes CHAR, NCHAR, VARCHAR2, and NVARCHAR2 + Numeric - Includes NUMBER, FLOAT, RAW, BINARY_FLOAT, and BINARY_DOUBLE + Date - Includes DATE and TIMESTAMP + LOB - Includes BLOB, CLOB, and NCLOB + All - Includes all the supported data types + + + :return: The data_type of this FormatsForDataType. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this FormatsForDataType. + The data type category, which can be one of the following - + Character - Includes CHAR, NCHAR, VARCHAR2, and NVARCHAR2 + Numeric - Includes NUMBER, FLOAT, RAW, BINARY_FLOAT, and BINARY_DOUBLE + Date - Includes DATE and TIMESTAMP + LOB - Includes BLOB, CLOB, and NCLOB + All - Includes all the supported data types + + + :param data_type: The data_type of this FormatsForDataType. + :type: str + """ + self._data_type = data_type + + @property + def masking_formats(self): + """ + Gets the masking_formats of this FormatsForDataType. + An array of the basic masking formats compatible with the data type category. + + + :return: The masking_formats of this FormatsForDataType. + :rtype: list[oci.data_safe.models.FormatSummary] + """ + return self._masking_formats + + @masking_formats.setter + def masking_formats(self, masking_formats): + """ + Sets the masking_formats of this FormatsForDataType. + An array of the basic masking formats compatible with the data type category. + + + :param masking_formats: The masking_formats of this FormatsForDataType. + :type: list[oci.data_safe.models.FormatSummary] + """ + self._masking_formats = masking_formats + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/formats_for_sensitive_type.py b/src/oci/data_safe/models/formats_for_sensitive_type.py new file mode 100644 index 0000000000..f11a18c818 --- /dev/null +++ b/src/oci/data_safe/models/formats_for_sensitive_type.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class FormatsForSensitiveType(object): + """ + A list of library masking formats compatible with an existing sensitive type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new FormatsForSensitiveType object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this FormatsForSensitiveType. + :type sensitive_type_id: str + + :param masking_formats: + The value to assign to the masking_formats property of this FormatsForSensitiveType. + :type masking_formats: list[oci.data_safe.models.FormatSummary] + + """ + self.swagger_types = { + 'sensitive_type_id': 'str', + 'masking_formats': 'list[FormatSummary]' + } + + self.attribute_map = { + 'sensitive_type_id': 'sensitiveTypeId', + 'masking_formats': 'maskingFormats' + } + + self._sensitive_type_id = None + self._masking_formats = None + + @property + def sensitive_type_id(self): + """ + **[Required]** Gets the sensitive_type_id of this FormatsForSensitiveType. + The OCID of the sensitive type. + + + :return: The sensitive_type_id of this FormatsForSensitiveType. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this FormatsForSensitiveType. + The OCID of the sensitive type. + + + :param sensitive_type_id: The sensitive_type_id of this FormatsForSensitiveType. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def masking_formats(self): + """ + Gets the masking_formats of this FormatsForSensitiveType. + An array of the library masking formats compatible with the sensitive type. + + + :return: The masking_formats of this FormatsForSensitiveType. + :rtype: list[oci.data_safe.models.FormatSummary] + """ + return self._masking_formats + + @masking_formats.setter + def masking_formats(self, masking_formats): + """ + Sets the masking_formats of this FormatsForSensitiveType. + An array of the library masking formats compatible with the sensitive type. + + + :param masking_formats: The masking_formats of this FormatsForSensitiveType. + :type: list[oci.data_safe.models.FormatSummary] + """ + self._masking_formats = masking_formats + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/generate_discovery_report_for_download_details.py b/src/oci/data_safe/models/generate_discovery_report_for_download_details.py new file mode 100644 index 0000000000..ae2b2046d4 --- /dev/null +++ b/src/oci/data_safe/models/generate_discovery_report_for_download_details.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GenerateDiscoveryReportForDownloadDetails(object): + """ + Details to generate a downloadable discovery report. + """ + + #: A constant which can be used with the report_format property of a GenerateDiscoveryReportForDownloadDetails. + #: This constant has a value of "PDF" + REPORT_FORMAT_PDF = "PDF" + + #: A constant which can be used with the report_format property of a GenerateDiscoveryReportForDownloadDetails. + #: This constant has a value of "XLS" + REPORT_FORMAT_XLS = "XLS" + + def __init__(self, **kwargs): + """ + Initializes a new GenerateDiscoveryReportForDownloadDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param discovery_job_id: + The value to assign to the discovery_job_id property of this GenerateDiscoveryReportForDownloadDetails. + :type discovery_job_id: str + + :param report_format: + The value to assign to the report_format property of this GenerateDiscoveryReportForDownloadDetails. + Allowed values for this property are: "PDF", "XLS" + :type report_format: str + + """ + self.swagger_types = { + 'discovery_job_id': 'str', + 'report_format': 'str' + } + + self.attribute_map = { + 'discovery_job_id': 'discoveryJobId', + 'report_format': 'reportFormat' + } + + self._discovery_job_id = None + self._report_format = None + + @property + def discovery_job_id(self): + """ + Gets the discovery_job_id of this GenerateDiscoveryReportForDownloadDetails. + The OCID of the discovery job. + + + :return: The discovery_job_id of this GenerateDiscoveryReportForDownloadDetails. + :rtype: str + """ + return self._discovery_job_id + + @discovery_job_id.setter + def discovery_job_id(self, discovery_job_id): + """ + Sets the discovery_job_id of this GenerateDiscoveryReportForDownloadDetails. + The OCID of the discovery job. + + + :param discovery_job_id: The discovery_job_id of this GenerateDiscoveryReportForDownloadDetails. + :type: str + """ + self._discovery_job_id = discovery_job_id + + @property + def report_format(self): + """ + **[Required]** Gets the report_format of this GenerateDiscoveryReportForDownloadDetails. + Format of the report. + + Allowed values for this property are: "PDF", "XLS" + + + :return: The report_format of this GenerateDiscoveryReportForDownloadDetails. + :rtype: str + """ + return self._report_format + + @report_format.setter + def report_format(self, report_format): + """ + Sets the report_format of this GenerateDiscoveryReportForDownloadDetails. + Format of the report. + + + :param report_format: The report_format of this GenerateDiscoveryReportForDownloadDetails. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(report_format, allowed_values): + raise ValueError( + "Invalid value for `report_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._report_format = report_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/generate_masking_policy_for_download_details.py b/src/oci/data_safe/models/generate_masking_policy_for_download_details.py new file mode 100644 index 0000000000..62853de20d --- /dev/null +++ b/src/oci/data_safe/models/generate_masking_policy_for_download_details.py @@ -0,0 +1,83 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GenerateMaskingPolicyForDownloadDetails(object): + """ + Details to generate a downloadable masking policy. + """ + + #: A constant which can be used with the policy_format property of a GenerateMaskingPolicyForDownloadDetails. + #: This constant has a value of "XML" + POLICY_FORMAT_XML = "XML" + + def __init__(self, **kwargs): + """ + Initializes a new GenerateMaskingPolicyForDownloadDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param policy_format: + The value to assign to the policy_format property of this GenerateMaskingPolicyForDownloadDetails. + Allowed values for this property are: "XML" + :type policy_format: str + + """ + self.swagger_types = { + 'policy_format': 'str' + } + + self.attribute_map = { + 'policy_format': 'policyFormat' + } + + self._policy_format = None + + @property + def policy_format(self): + """ + Gets the policy_format of this GenerateMaskingPolicyForDownloadDetails. + The format of the masking policy file. + + Allowed values for this property are: "XML" + + + :return: The policy_format of this GenerateMaskingPolicyForDownloadDetails. + :rtype: str + """ + return self._policy_format + + @policy_format.setter + def policy_format(self, policy_format): + """ + Sets the policy_format of this GenerateMaskingPolicyForDownloadDetails. + The format of the masking policy file. + + + :param policy_format: The policy_format of this GenerateMaskingPolicyForDownloadDetails. + :type: str + """ + allowed_values = ["XML"] + if not value_allowed_none_or_none_sentinel(policy_format, allowed_values): + raise ValueError( + "Invalid value for `policy_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._policy_format = policy_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/generate_masking_report_for_download_details.py b/src/oci/data_safe/models/generate_masking_report_for_download_details.py new file mode 100644 index 0000000000..1caba081be --- /dev/null +++ b/src/oci/data_safe/models/generate_masking_report_for_download_details.py @@ -0,0 +1,118 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GenerateMaskingReportForDownloadDetails(object): + """ + Details to generate a downloadable masking report. + """ + + #: A constant which can be used with the report_format property of a GenerateMaskingReportForDownloadDetails. + #: This constant has a value of "PDF" + REPORT_FORMAT_PDF = "PDF" + + #: A constant which can be used with the report_format property of a GenerateMaskingReportForDownloadDetails. + #: This constant has a value of "XLS" + REPORT_FORMAT_XLS = "XLS" + + def __init__(self, **kwargs): + """ + Initializes a new GenerateMaskingReportForDownloadDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param report_id: + The value to assign to the report_id property of this GenerateMaskingReportForDownloadDetails. + :type report_id: str + + :param report_format: + The value to assign to the report_format property of this GenerateMaskingReportForDownloadDetails. + Allowed values for this property are: "PDF", "XLS" + :type report_format: str + + """ + self.swagger_types = { + 'report_id': 'str', + 'report_format': 'str' + } + + self.attribute_map = { + 'report_id': 'reportId', + 'report_format': 'reportFormat' + } + + self._report_id = None + self._report_format = None + + @property + def report_id(self): + """ + **[Required]** Gets the report_id of this GenerateMaskingReportForDownloadDetails. + The OCID of the masking report for which a downloadable file is to be generated. + + + :return: The report_id of this GenerateMaskingReportForDownloadDetails. + :rtype: str + """ + return self._report_id + + @report_id.setter + def report_id(self, report_id): + """ + Sets the report_id of this GenerateMaskingReportForDownloadDetails. + The OCID of the masking report for which a downloadable file is to be generated. + + + :param report_id: The report_id of this GenerateMaskingReportForDownloadDetails. + :type: str + """ + self._report_id = report_id + + @property + def report_format(self): + """ + **[Required]** Gets the report_format of this GenerateMaskingReportForDownloadDetails. + Format of the report. + + Allowed values for this property are: "PDF", "XLS" + + + :return: The report_format of this GenerateMaskingReportForDownloadDetails. + :rtype: str + """ + return self._report_format + + @report_format.setter + def report_format(self, report_format): + """ + Sets the report_format of this GenerateMaskingReportForDownloadDetails. + Format of the report. + + + :param report_format: The report_format of this GenerateMaskingReportForDownloadDetails. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(report_format, allowed_values): + raise ValueError( + "Invalid value for `report_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._report_format = report_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/generate_report_details.py b/src/oci/data_safe/models/generate_report_details.py new file mode 100644 index 0000000000..ccc27cc22a --- /dev/null +++ b/src/oci/data_safe/models/generate_report_details.py @@ -0,0 +1,310 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GenerateReportDetails(object): + """ + Details for the report generation. + """ + + #: A constant which can be used with the mime_type property of a GenerateReportDetails. + #: This constant has a value of "PDF" + MIME_TYPE_PDF = "PDF" + + #: A constant which can be used with the mime_type property of a GenerateReportDetails. + #: This constant has a value of "XLS" + MIME_TYPE_XLS = "XLS" + + def __init__(self, **kwargs): + """ + Initializes a new GenerateReportDetails 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 GenerateReportDetails. + :type display_name: str + + :param target_ids: + The value to assign to the target_ids property of this GenerateReportDetails. + :type target_ids: list[str] + + :param description: + The value to assign to the description property of this GenerateReportDetails. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this GenerateReportDetails. + :type compartment_id: str + + :param mime_type: + The value to assign to the mime_type property of this GenerateReportDetails. + Allowed values for this property are: "PDF", "XLS" + :type mime_type: str + + :param time_less_than: + The value to assign to the time_less_than property of this GenerateReportDetails. + :type time_less_than: datetime + + :param time_greater_than: + The value to assign to the time_greater_than property of this GenerateReportDetails. + :type time_greater_than: datetime + + :param row_limit: + The value to assign to the row_limit property of this GenerateReportDetails. + :type row_limit: int + + """ + self.swagger_types = { + 'display_name': 'str', + 'target_ids': 'list[str]', + 'description': 'str', + 'compartment_id': 'str', + 'mime_type': 'str', + 'time_less_than': 'datetime', + 'time_greater_than': 'datetime', + 'row_limit': 'int' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'target_ids': 'targetIds', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'mime_type': 'mimeType', + 'time_less_than': 'timeLessThan', + 'time_greater_than': 'timeGreaterThan', + 'row_limit': 'rowLimit' + } + + self._display_name = None + self._target_ids = None + self._description = None + self._compartment_id = None + self._mime_type = None + self._time_less_than = None + self._time_greater_than = None + self._row_limit = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this GenerateReportDetails. + The name of the report to be generated + + + :return: The display_name of this GenerateReportDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this GenerateReportDetails. + The name of the report to be generated + + + :param display_name: The display_name of this GenerateReportDetails. + :type: str + """ + self._display_name = display_name + + @property + def target_ids(self): + """ + Gets the target_ids of this GenerateReportDetails. + Array of database target OCIDs. + + + :return: The target_ids of this GenerateReportDetails. + :rtype: list[str] + """ + return self._target_ids + + @target_ids.setter + def target_ids(self, target_ids): + """ + Sets the target_ids of this GenerateReportDetails. + Array of database target OCIDs. + + + :param target_ids: The target_ids of this GenerateReportDetails. + :type: list[str] + """ + self._target_ids = target_ids + + @property + def description(self): + """ + Gets the description of this GenerateReportDetails. + The description of the report to be generated + + + :return: The description of this GenerateReportDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this GenerateReportDetails. + The description of the report to be generated + + + :param description: The description of this GenerateReportDetails. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this GenerateReportDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :return: The compartment_id of this GenerateReportDetails. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this GenerateReportDetails. + The `OCID`__ of the compartment + into which the resource should be moved. + + __ https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm + + + :param compartment_id: The compartment_id of this GenerateReportDetails. + :type: str + """ + self._compartment_id = compartment_id + + @property + def mime_type(self): + """ + **[Required]** Gets the mime_type of this GenerateReportDetails. + Specifies the format of report to be excel or pdf + + Allowed values for this property are: "PDF", "XLS" + + + :return: The mime_type of this GenerateReportDetails. + :rtype: str + """ + return self._mime_type + + @mime_type.setter + def mime_type(self, mime_type): + """ + Sets the mime_type of this GenerateReportDetails. + Specifies the format of report to be excel or pdf + + + :param mime_type: The mime_type of this GenerateReportDetails. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(mime_type, allowed_values): + raise ValueError( + "Invalid value for `mime_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._mime_type = mime_type + + @property + def time_less_than(self): + """ + Gets the time_less_than of this GenerateReportDetails. + Specifies the time before which the data needs to be reported. + + + :return: The time_less_than of this GenerateReportDetails. + :rtype: datetime + """ + return self._time_less_than + + @time_less_than.setter + def time_less_than(self, time_less_than): + """ + Sets the time_less_than of this GenerateReportDetails. + Specifies the time before which the data needs to be reported. + + + :param time_less_than: The time_less_than of this GenerateReportDetails. + :type: datetime + """ + self._time_less_than = time_less_than + + @property + def time_greater_than(self): + """ + Gets the time_greater_than of this GenerateReportDetails. + Specifies the time after which the data needs to be reported. + + + :return: The time_greater_than of this GenerateReportDetails. + :rtype: datetime + """ + return self._time_greater_than + + @time_greater_than.setter + def time_greater_than(self, time_greater_than): + """ + Sets the time_greater_than of this GenerateReportDetails. + Specifies the time after which the data needs to be reported. + + + :param time_greater_than: The time_greater_than of this GenerateReportDetails. + :type: datetime + """ + self._time_greater_than = time_greater_than + + @property + def row_limit(self): + """ + Gets the row_limit of this GenerateReportDetails. + Specifies the limit on number of rows in report. + + + :return: The row_limit of this GenerateReportDetails. + :rtype: int + """ + return self._row_limit + + @row_limit.setter + def row_limit(self, row_limit): + """ + Sets the row_limit of this GenerateReportDetails. + Specifies the limit on number of rows in report. + + + :param row_limit: The row_limit of this GenerateReportDetails. + :type: int + """ + self._row_limit = row_limit + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/generate_sensitive_data_model_for_download_details.py b/src/oci/data_safe/models/generate_sensitive_data_model_for_download_details.py new file mode 100644 index 0000000000..a3a5c0ced8 --- /dev/null +++ b/src/oci/data_safe/models/generate_sensitive_data_model_for_download_details.py @@ -0,0 +1,83 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GenerateSensitiveDataModelForDownloadDetails(object): + """ + Details to generate a downloadable sensitive data model. + """ + + #: A constant which can be used with the data_model_format property of a GenerateSensitiveDataModelForDownloadDetails. + #: This constant has a value of "XML" + DATA_MODEL_FORMAT_XML = "XML" + + def __init__(self, **kwargs): + """ + Initializes a new GenerateSensitiveDataModelForDownloadDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param data_model_format: + The value to assign to the data_model_format property of this GenerateSensitiveDataModelForDownloadDetails. + Allowed values for this property are: "XML" + :type data_model_format: str + + """ + self.swagger_types = { + 'data_model_format': 'str' + } + + self.attribute_map = { + 'data_model_format': 'dataModelFormat' + } + + self._data_model_format = None + + @property + def data_model_format(self): + """ + Gets the data_model_format of this GenerateSensitiveDataModelForDownloadDetails. + The format of the sensitive data model file. + + Allowed values for this property are: "XML" + + + :return: The data_model_format of this GenerateSensitiveDataModelForDownloadDetails. + :rtype: str + """ + return self._data_model_format + + @data_model_format.setter + def data_model_format(self, data_model_format): + """ + Sets the data_model_format of this GenerateSensitiveDataModelForDownloadDetails. + The format of the sensitive data model file. + + + :param data_model_format: The data_model_format of this GenerateSensitiveDataModelForDownloadDetails. + :type: str + """ + allowed_values = ["XML"] + if not value_allowed_none_or_none_sentinel(data_model_format, allowed_values): + raise ValueError( + "Invalid value for `data_model_format`, must be None or one of {0}" + .format(allowed_values) + ) + self._data_model_format = data_model_format + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/global_settings.py b/src/oci/data_safe/models/global_settings.py new file mode 100644 index 0000000000..1b487a9c21 --- /dev/null +++ b/src/oci/data_safe/models/global_settings.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class GlobalSettings(object): + """ + Details of the tenancy level global settings in Data Safe. + """ + + def __init__(self, **kwargs): + """ + Initializes a new GlobalSettings object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_paid_usage: + The value to assign to the is_paid_usage property of this GlobalSettings. + :type is_paid_usage: bool + + :param online_retention_period: + The value to assign to the online_retention_period property of this GlobalSettings. + :type online_retention_period: int + + :param offline_retention_period: + The value to assign to the offline_retention_period property of this GlobalSettings. + :type offline_retention_period: int + + """ + self.swagger_types = { + 'is_paid_usage': 'bool', + 'online_retention_period': 'int', + 'offline_retention_period': 'int' + } + + self.attribute_map = { + 'is_paid_usage': 'isPaidUsage', + 'online_retention_period': 'onlineRetentionPeriod', + 'offline_retention_period': 'offlineRetentionPeriod' + } + + self._is_paid_usage = None + self._online_retention_period = None + self._offline_retention_period = None + + @property + def is_paid_usage(self): + """ + Gets the is_paid_usage of this GlobalSettings. + The paid usage option chosen by the customer admin. + + + :return: The is_paid_usage of this GlobalSettings. + :rtype: bool + """ + return self._is_paid_usage + + @is_paid_usage.setter + def is_paid_usage(self, is_paid_usage): + """ + Sets the is_paid_usage of this GlobalSettings. + The paid usage option chosen by the customer admin. + + + :param is_paid_usage: The is_paid_usage of this GlobalSettings. + :type: bool + """ + self._is_paid_usage = is_paid_usage + + @property + def online_retention_period(self): + """ + Gets the online_retention_period of this GlobalSettings. + The online retention period in months. + + + :return: The online_retention_period of this GlobalSettings. + :rtype: int + """ + return self._online_retention_period + + @online_retention_period.setter + def online_retention_period(self, online_retention_period): + """ + Sets the online_retention_period of this GlobalSettings. + The online retention period in months. + + + :param online_retention_period: The online_retention_period of this GlobalSettings. + :type: int + """ + self._online_retention_period = online_retention_period + + @property + def offline_retention_period(self): + """ + Gets the offline_retention_period of this GlobalSettings. + The offline retention period in months. + + + :return: The offline_retention_period of this GlobalSettings. + :rtype: int + """ + return self._offline_retention_period + + @offline_retention_period.setter + def offline_retention_period(self, offline_retention_period): + """ + Sets the offline_retention_period of this GlobalSettings. + The offline retention period in months. + + + :param offline_retention_period: The offline_retention_period of this GlobalSettings. + :type: int + """ + self._offline_retention_period = offline_retention_period + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/library_masking_format.py b/src/oci/data_safe/models/library_masking_format.py new file mode 100644 index 0000000000..f8afc07719 --- /dev/null +++ b/src/oci/data_safe/models/library_masking_format.py @@ -0,0 +1,494 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class LibraryMaskingFormat(object): + """ + A library masking format is a masking format stored in an Oracle Cloud Infrastructure compartment and can be used in + multiple masking policies. If you want to use the same masking logic for multiple masking columns or even in multiple + masking policies, you can create a library masking format and assign it to masking columns as needed. It helps you + avoid defining the same masking logic again and again. + + Oracle Data Safe provides a set of predefined library masking formats to mask common sensitive and personal data, + such as names, national identifiers, credit card numbers, and phone numbers. To meet your specific requirements, you + can easily create new library masking formats and use them in your masking policies. + """ + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormat. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the source property of a LibraryMaskingFormat. + #: This constant has a value of "ORACLE" + SOURCE_ORACLE = "ORACLE" + + #: A constant which can be used with the source property of a LibraryMaskingFormat. + #: This constant has a value of "USER" + SOURCE_USER = "USER" + + def __init__(self, **kwargs): + """ + Initializes a new LibraryMaskingFormat 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 LibraryMaskingFormat. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this LibraryMaskingFormat. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this LibraryMaskingFormat. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this LibraryMaskingFormat. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this LibraryMaskingFormat. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this LibraryMaskingFormat. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param description: + The value to assign to the description property of this LibraryMaskingFormat. + :type description: str + + :param sensitive_type_ids: + The value to assign to the sensitive_type_ids property of this LibraryMaskingFormat. + :type sensitive_type_ids: list[str] + + :param source: + The value to assign to the source property of this LibraryMaskingFormat. + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param format_entries: + The value to assign to the format_entries property of this LibraryMaskingFormat. + :type format_entries: list[oci.data_safe.models.FormatEntry] + + :param freeform_tags: + The value to assign to the freeform_tags property of this LibraryMaskingFormat. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this LibraryMaskingFormat. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'description': 'str', + 'sensitive_type_ids': 'list[str]', + 'source': 'str', + 'format_entries': 'list[FormatEntry]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'description': 'description', + 'sensitive_type_ids': 'sensitiveTypeIds', + 'source': 'source', + 'format_entries': 'formatEntries', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._description = None + self._sensitive_type_ids = None + self._source = None + self._format_entries = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this LibraryMaskingFormat. + The OCID of the library masking format. + + + :return: The id of this LibraryMaskingFormat. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this LibraryMaskingFormat. + The OCID of the library masking format. + + + :param id: The id of this LibraryMaskingFormat. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this LibraryMaskingFormat. + The OCID of the compartment that contains the library masking format. + + + :return: The compartment_id of this LibraryMaskingFormat. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this LibraryMaskingFormat. + The OCID of the compartment that contains the library masking format. + + + :param compartment_id: The compartment_id of this LibraryMaskingFormat. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this LibraryMaskingFormat. + The display name of the library masking format. + + + :return: The display_name of this LibraryMaskingFormat. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this LibraryMaskingFormat. + The display name of the library masking format. + + + :param display_name: The display_name of this LibraryMaskingFormat. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this LibraryMaskingFormat. + The date and time the library masking format was created, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this LibraryMaskingFormat. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this LibraryMaskingFormat. + The date and time the library masking format was created, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this LibraryMaskingFormat. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this LibraryMaskingFormat. + The date and time the library masking format was updated, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this LibraryMaskingFormat. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this LibraryMaskingFormat. + The date and time the library masking format was updated, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this LibraryMaskingFormat. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this LibraryMaskingFormat. + The current state of the library masking format. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this LibraryMaskingFormat. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this LibraryMaskingFormat. + The current state of the library masking format. + + + :param lifecycle_state: The lifecycle_state of this LibraryMaskingFormat. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def description(self): + """ + Gets the description of this LibraryMaskingFormat. + The description of the library masking format. + + + :return: The description of this LibraryMaskingFormat. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this LibraryMaskingFormat. + The description of the library masking format. + + + :param description: The description of this LibraryMaskingFormat. + :type: str + """ + self._description = description + + @property + def sensitive_type_ids(self): + """ + Gets the sensitive_type_ids of this LibraryMaskingFormat. + An array of OCIDs of the sensitive types compatible with the library masking format. + + + :return: The sensitive_type_ids of this LibraryMaskingFormat. + :rtype: list[str] + """ + return self._sensitive_type_ids + + @sensitive_type_ids.setter + def sensitive_type_ids(self, sensitive_type_ids): + """ + Sets the sensitive_type_ids of this LibraryMaskingFormat. + An array of OCIDs of the sensitive types compatible with the library masking format. + + + :param sensitive_type_ids: The sensitive_type_ids of this LibraryMaskingFormat. + :type: list[str] + """ + self._sensitive_type_ids = sensitive_type_ids + + @property + def source(self): + """ + **[Required]** Gets the source of this LibraryMaskingFormat. + Specifies whether the library masking format is user-defined or predefined. + + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source of this LibraryMaskingFormat. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this LibraryMaskingFormat. + Specifies whether the library masking format is user-defined or predefined. + + + :param source: The source of this LibraryMaskingFormat. + :type: str + """ + allowed_values = ["ORACLE", "USER"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + source = 'UNKNOWN_ENUM_VALUE' + self._source = source + + @property + def format_entries(self): + """ + Gets the format_entries of this LibraryMaskingFormat. + An array of format entries. The combined output of all the format entries is used for masking. + + + :return: The format_entries of this LibraryMaskingFormat. + :rtype: list[oci.data_safe.models.FormatEntry] + """ + return self._format_entries + + @format_entries.setter + def format_entries(self, format_entries): + """ + Sets the format_entries of this LibraryMaskingFormat. + An array of format entries. The combined output of all the format entries is used for masking. + + + :param format_entries: The format_entries of this LibraryMaskingFormat. + :type: list[oci.data_safe.models.FormatEntry] + """ + self._format_entries = format_entries + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this LibraryMaskingFormat. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this LibraryMaskingFormat. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this LibraryMaskingFormat. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this LibraryMaskingFormat. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this LibraryMaskingFormat. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this LibraryMaskingFormat. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this LibraryMaskingFormat. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this LibraryMaskingFormat. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/library_masking_format_collection.py b/src/oci/data_safe/models/library_masking_format_collection.py new file mode 100644 index 0000000000..92b829b628 --- /dev/null +++ b/src/oci/data_safe/models/library_masking_format_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class LibraryMaskingFormatCollection(object): + """ + A collection of library masking format summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new LibraryMaskingFormatCollection 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 LibraryMaskingFormatCollection. + :type items: list[oci.data_safe.models.LibraryMaskingFormatSummary] + + """ + self.swagger_types = { + 'items': 'list[LibraryMaskingFormatSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this LibraryMaskingFormatCollection. + An array of library masking format summary objects. + + + :return: The items of this LibraryMaskingFormatCollection. + :rtype: list[oci.data_safe.models.LibraryMaskingFormatSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this LibraryMaskingFormatCollection. + An array of library masking format summary objects. + + + :param items: The items of this LibraryMaskingFormatCollection. + :type: list[oci.data_safe.models.LibraryMaskingFormatSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/library_masking_format_entry.py b/src/oci/data_safe/models/library_masking_format_entry.py new file mode 100644 index 0000000000..2881e053f5 --- /dev/null +++ b/src/oci/data_safe/models/library_masking_format_entry.py @@ -0,0 +1,91 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class LibraryMaskingFormatEntry(FormatEntry): + """ + A library masking format to be used for masking. It can be either a + predefined or a user-defined library masking format. It enables reuse + of an existing library masking format and helps avoid defining the masking + logic again. Use the ListLibraryMaskingFormats operation to view the + existing library masking formats. + """ + + def __init__(self, **kwargs): + """ + Initializes a new LibraryMaskingFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.LibraryMaskingFormatEntry.type` attribute + of this class is ``LIBRARY_MASKING_FORMAT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this LibraryMaskingFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this LibraryMaskingFormatEntry. + :type description: str + + :param library_masking_format_id: + The value to assign to the library_masking_format_id property of this LibraryMaskingFormatEntry. + :type library_masking_format_id: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'library_masking_format_id': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'library_masking_format_id': 'libraryMaskingFormatId' + } + + self._type = None + self._description = None + self._library_masking_format_id = None + self._type = 'LIBRARY_MASKING_FORMAT' + + @property + def library_masking_format_id(self): + """ + **[Required]** Gets the library_masking_format_id of this LibraryMaskingFormatEntry. + The OCID of the library masking format. + + + :return: The library_masking_format_id of this LibraryMaskingFormatEntry. + :rtype: str + """ + return self._library_masking_format_id + + @library_masking_format_id.setter + def library_masking_format_id(self, library_masking_format_id): + """ + Sets the library_masking_format_id of this LibraryMaskingFormatEntry. + The OCID of the library masking format. + + + :param library_masking_format_id: The library_masking_format_id of this LibraryMaskingFormatEntry. + :type: str + """ + self._library_masking_format_id = library_masking_format_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/library_masking_format_summary.py b/src/oci/data_safe/models/library_masking_format_summary.py new file mode 100644 index 0000000000..5ff6febb16 --- /dev/null +++ b/src/oci/data_safe/models/library_masking_format_summary.py @@ -0,0 +1,456 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class LibraryMaskingFormatSummary(object): + """ + Summary of a library masking format. + """ + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a LibraryMaskingFormatSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the source property of a LibraryMaskingFormatSummary. + #: This constant has a value of "ORACLE" + SOURCE_ORACLE = "ORACLE" + + #: A constant which can be used with the source property of a LibraryMaskingFormatSummary. + #: This constant has a value of "USER" + SOURCE_USER = "USER" + + def __init__(self, **kwargs): + """ + Initializes a new LibraryMaskingFormatSummary 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 LibraryMaskingFormatSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this LibraryMaskingFormatSummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this LibraryMaskingFormatSummary. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this LibraryMaskingFormatSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this LibraryMaskingFormatSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this LibraryMaskingFormatSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param description: + The value to assign to the description property of this LibraryMaskingFormatSummary. + :type description: str + + :param sensitive_type_ids: + The value to assign to the sensitive_type_ids property of this LibraryMaskingFormatSummary. + :type sensitive_type_ids: list[str] + + :param source: + The value to assign to the source property of this LibraryMaskingFormatSummary. + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this LibraryMaskingFormatSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this LibraryMaskingFormatSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'description': 'str', + 'sensitive_type_ids': 'list[str]', + 'source': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'description': 'description', + 'sensitive_type_ids': 'sensitiveTypeIds', + 'source': 'source', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._description = None + self._sensitive_type_ids = None + self._source = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this LibraryMaskingFormatSummary. + The OCID of the library masking format. + + + :return: The id of this LibraryMaskingFormatSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this LibraryMaskingFormatSummary. + The OCID of the library masking format. + + + :param id: The id of this LibraryMaskingFormatSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this LibraryMaskingFormatSummary. + The OCID of the compartment that contains the library masking format. + + + :return: The compartment_id of this LibraryMaskingFormatSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this LibraryMaskingFormatSummary. + The OCID of the compartment that contains the library masking format. + + + :param compartment_id: The compartment_id of this LibraryMaskingFormatSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this LibraryMaskingFormatSummary. + The display name of the library masking format. + + + :return: The display_name of this LibraryMaskingFormatSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this LibraryMaskingFormatSummary. + The display name of the library masking format. + + + :param display_name: The display_name of this LibraryMaskingFormatSummary. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this LibraryMaskingFormatSummary. + The date and time the library masking format was created, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this LibraryMaskingFormatSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this LibraryMaskingFormatSummary. + The date and time the library masking format was created, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this LibraryMaskingFormatSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this LibraryMaskingFormatSummary. + The date and time the library masking format was updated, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this LibraryMaskingFormatSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this LibraryMaskingFormatSummary. + The date and time the library masking format was updated, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this LibraryMaskingFormatSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this LibraryMaskingFormatSummary. + The current state of the library masking format. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this LibraryMaskingFormatSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this LibraryMaskingFormatSummary. + The current state of the library masking format. + + + :param lifecycle_state: The lifecycle_state of this LibraryMaskingFormatSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def description(self): + """ + Gets the description of this LibraryMaskingFormatSummary. + The description of the library masking format. + + + :return: The description of this LibraryMaskingFormatSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this LibraryMaskingFormatSummary. + The description of the library masking format. + + + :param description: The description of this LibraryMaskingFormatSummary. + :type: str + """ + self._description = description + + @property + def sensitive_type_ids(self): + """ + Gets the sensitive_type_ids of this LibraryMaskingFormatSummary. + An array of OCIDs of the sensitive types compatible with the library masking format. + + + :return: The sensitive_type_ids of this LibraryMaskingFormatSummary. + :rtype: list[str] + """ + return self._sensitive_type_ids + + @sensitive_type_ids.setter + def sensitive_type_ids(self, sensitive_type_ids): + """ + Sets the sensitive_type_ids of this LibraryMaskingFormatSummary. + An array of OCIDs of the sensitive types compatible with the library masking format. + + + :param sensitive_type_ids: The sensitive_type_ids of this LibraryMaskingFormatSummary. + :type: list[str] + """ + self._sensitive_type_ids = sensitive_type_ids + + @property + def source(self): + """ + **[Required]** Gets the source of this LibraryMaskingFormatSummary. + Indicates whether the library masking format is user-defined or predefined. + + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source of this LibraryMaskingFormatSummary. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this LibraryMaskingFormatSummary. + Indicates whether the library masking format is user-defined or predefined. + + + :param source: The source of this LibraryMaskingFormatSummary. + :type: str + """ + allowed_values = ["ORACLE", "USER"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + source = 'UNKNOWN_ENUM_VALUE' + self._source = source + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this LibraryMaskingFormatSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this LibraryMaskingFormatSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this LibraryMaskingFormatSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this LibraryMaskingFormatSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this LibraryMaskingFormatSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this LibraryMaskingFormatSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this LibraryMaskingFormatSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this LibraryMaskingFormatSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/mask_data_details.py b/src/oci/data_safe/models/mask_data_details.py new file mode 100644 index 0000000000..45bd37e6bc --- /dev/null +++ b/src/oci/data_safe/models/mask_data_details.py @@ -0,0 +1,313 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskDataDetails(object): + """ + Details to mask data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskDataDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_id: + The value to assign to the target_id property of this MaskDataDetails. + :type target_id: str + + :param is_decrypt: + The value to assign to the is_decrypt property of this MaskDataDetails. + :type is_decrypt: bool + + :param is_rerun: + The value to assign to the is_rerun property of this MaskDataDetails. + :type is_rerun: bool + + :param tablespace: + The value to assign to the tablespace property of this MaskDataDetails. + :type tablespace: str + + :param is_ignore_errors_enabled: + The value to assign to the is_ignore_errors_enabled property of this MaskDataDetails. + :type is_ignore_errors_enabled: bool + + :param seed: + The value to assign to the seed property of this MaskDataDetails. + :type seed: str + + :param is_move_interim_tables_enabled: + The value to assign to the is_move_interim_tables_enabled property of this MaskDataDetails. + :type is_move_interim_tables_enabled: bool + + :param is_execute_saved_script_enabled: + The value to assign to the is_execute_saved_script_enabled property of this MaskDataDetails. + :type is_execute_saved_script_enabled: bool + + """ + self.swagger_types = { + 'target_id': 'str', + 'is_decrypt': 'bool', + 'is_rerun': 'bool', + 'tablespace': 'str', + 'is_ignore_errors_enabled': 'bool', + 'seed': 'str', + 'is_move_interim_tables_enabled': 'bool', + 'is_execute_saved_script_enabled': 'bool' + } + + self.attribute_map = { + 'target_id': 'targetId', + 'is_decrypt': 'isDecrypt', + 'is_rerun': 'isRerun', + 'tablespace': 'tablespace', + 'is_ignore_errors_enabled': 'isIgnoreErrorsEnabled', + 'seed': 'seed', + 'is_move_interim_tables_enabled': 'isMoveInterimTablesEnabled', + 'is_execute_saved_script_enabled': 'isExecuteSavedScriptEnabled' + } + + self._target_id = None + self._is_decrypt = None + self._is_rerun = None + self._tablespace = None + self._is_ignore_errors_enabled = None + self._seed = None + self._is_move_interim_tables_enabled = None + self._is_execute_saved_script_enabled = None + + @property + def target_id(self): + """ + Gets the target_id of this MaskDataDetails. + The OCID of the target database to be masked. If it's not provided, the value of the + targetId attribute in the MaskingPolicy resource is used. The OCID of the target + database to be masked. If it's not provided, the value of the targetId attribute in + the MaskingPolicy resource is used. + + + :return: The target_id of this MaskDataDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this MaskDataDetails. + The OCID of the target database to be masked. If it's not provided, the value of the + targetId attribute in the MaskingPolicy resource is used. The OCID of the target + database to be masked. If it's not provided, the value of the targetId attribute in + the MaskingPolicy resource is used. + + + :param target_id: The target_id of this MaskDataDetails. + :type: str + """ + self._target_id = target_id + + @property + def is_decrypt(self): + """ + Gets the is_decrypt of this MaskDataDetails. + Indicates if the masking request is to decrypt the data values previously encrypted using Deterministic Encryption. Note that, to + correctly decrypt the encrypted data values, it requires the same seed value that was provided to encrypt those data values. + + + :return: The is_decrypt of this MaskDataDetails. + :rtype: bool + """ + return self._is_decrypt + + @is_decrypt.setter + def is_decrypt(self, is_decrypt): + """ + Sets the is_decrypt of this MaskDataDetails. + Indicates if the masking request is to decrypt the data values previously encrypted using Deterministic Encryption. Note that, to + correctly decrypt the encrypted data values, it requires the same seed value that was provided to encrypt those data values. + + + :param is_decrypt: The is_decrypt of this MaskDataDetails. + :type: bool + """ + self._is_decrypt = is_decrypt + + @property + def is_rerun(self): + """ + Gets the is_rerun of this MaskDataDetails. + Indicates if the masking request is to rerun the previously failed masking steps. If a masking request is submitted with the + isIgnoreErrorsEnabled attribute set to true, the masking process tracks the failed masking steps. Another masking request can be + submitted with the isRun attribute set to true to rerun those failed masking steps. It helps save time by executing only the failed + masking steps and not doing the whole masking again. + + + :return: The is_rerun of this MaskDataDetails. + :rtype: bool + """ + return self._is_rerun + + @is_rerun.setter + def is_rerun(self, is_rerun): + """ + Sets the is_rerun of this MaskDataDetails. + Indicates if the masking request is to rerun the previously failed masking steps. If a masking request is submitted with the + isIgnoreErrorsEnabled attribute set to true, the masking process tracks the failed masking steps. Another masking request can be + submitted with the isRun attribute set to true to rerun those failed masking steps. It helps save time by executing only the failed + masking steps and not doing the whole masking again. + + + :param is_rerun: The is_rerun of this MaskDataDetails. + :type: bool + """ + self._is_rerun = is_rerun + + @property + def tablespace(self): + """ + Gets the tablespace of this MaskDataDetails. + The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking. + If no tablespace is provided, the DEFAULT tablespace is used. + + + :return: The tablespace of this MaskDataDetails. + :rtype: str + """ + return self._tablespace + + @tablespace.setter + def tablespace(self, tablespace): + """ + Sets the tablespace of this MaskDataDetails. + The tablespace that should be used to create the mapping tables, DMASK objects, and other temporary tables for data masking. + If no tablespace is provided, the DEFAULT tablespace is used. + + + :param tablespace: The tablespace of this MaskDataDetails. + :type: str + """ + self._tablespace = tablespace + + @property + def is_ignore_errors_enabled(self): + """ + Gets the is_ignore_errors_enabled of this MaskDataDetails. + Indicates if the masking process should continue on hitting an error. It provides fault tolerance support and is enabled by + default. In fault-tolerant mode, the masking process saves the failed step and continues. You can then submit another masking + request (with isRerun attribute set to true) to execute only the failed steps. + + + :return: The is_ignore_errors_enabled of this MaskDataDetails. + :rtype: bool + """ + return self._is_ignore_errors_enabled + + @is_ignore_errors_enabled.setter + def is_ignore_errors_enabled(self, is_ignore_errors_enabled): + """ + Sets the is_ignore_errors_enabled of this MaskDataDetails. + Indicates if the masking process should continue on hitting an error. It provides fault tolerance support and is enabled by + default. In fault-tolerant mode, the masking process saves the failed step and continues. You can then submit another masking + request (with isRerun attribute set to true) to execute only the failed steps. + + + :param is_ignore_errors_enabled: The is_ignore_errors_enabled of this MaskDataDetails. + :type: bool + """ + self._is_ignore_errors_enabled = is_ignore_errors_enabled + + @property + def seed(self): + """ + Gets the seed of this MaskDataDetails. + The seed value to be used in case of Deterministic Encryption and Deterministic Substitution masking formats. + + + :return: The seed of this MaskDataDetails. + :rtype: str + """ + return self._seed + + @seed.setter + def seed(self, seed): + """ + Sets the seed of this MaskDataDetails. + The seed value to be used in case of Deterministic Encryption and Deterministic Substitution masking formats. + + + :param seed: The seed of this MaskDataDetails. + :type: str + """ + self._seed = seed + + @property + def is_move_interim_tables_enabled(self): + """ + Gets the is_move_interim_tables_enabled of this MaskDataDetails. + Indicates if the interim DMASK tables should be moved to the user-specified tablespace. As interim tables can be large in size, + set it to false if moving them causes performance overhead during masking. + + + :return: The is_move_interim_tables_enabled of this MaskDataDetails. + :rtype: bool + """ + return self._is_move_interim_tables_enabled + + @is_move_interim_tables_enabled.setter + def is_move_interim_tables_enabled(self, is_move_interim_tables_enabled): + """ + Sets the is_move_interim_tables_enabled of this MaskDataDetails. + Indicates if the interim DMASK tables should be moved to the user-specified tablespace. As interim tables can be large in size, + set it to false if moving them causes performance overhead during masking. + + + :param is_move_interim_tables_enabled: The is_move_interim_tables_enabled of this MaskDataDetails. + :type: bool + """ + self._is_move_interim_tables_enabled = is_move_interim_tables_enabled + + @property + def is_execute_saved_script_enabled(self): + """ + Gets the is_execute_saved_script_enabled of this MaskDataDetails. + Indicates if data masking should be performed using a saved masking script. Setting this attribute to true skips masking script + generation and executes the masking script stored in the Data Safe repository. It helps save time if there are no changes in + the database tables and their dependencies. + + + :return: The is_execute_saved_script_enabled of this MaskDataDetails. + :rtype: bool + """ + return self._is_execute_saved_script_enabled + + @is_execute_saved_script_enabled.setter + def is_execute_saved_script_enabled(self, is_execute_saved_script_enabled): + """ + Sets the is_execute_saved_script_enabled of this MaskDataDetails. + Indicates if data masking should be performed using a saved masking script. Setting this attribute to true skips masking script + generation and executes the masking script stored in the Data Safe repository. It helps save time if there are no changes in + the database tables and their dependencies. + + + :param is_execute_saved_script_enabled: The is_execute_saved_script_enabled of this MaskDataDetails. + :type: bool + """ + self._is_execute_saved_script_enabled = is_execute_saved_script_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masked_column_collection.py b/src/oci/data_safe/models/masked_column_collection.py new file mode 100644 index 0000000000..bc7ac9be6e --- /dev/null +++ b/src/oci/data_safe/models/masked_column_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskedColumnCollection(object): + """ + A collection of masking column summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskedColumnCollection 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 MaskedColumnCollection. + :type items: list[oci.data_safe.models.MaskedColumnSummary] + + """ + self.swagger_types = { + 'items': 'list[MaskedColumnSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this MaskedColumnCollection. + An array of masking column summary objects. + + + :return: The items of this MaskedColumnCollection. + :rtype: list[oci.data_safe.models.MaskedColumnSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this MaskedColumnCollection. + An array of masking column summary objects. + + + :param items: The items of this MaskedColumnCollection. + :type: list[oci.data_safe.models.MaskedColumnSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masked_column_summary.py b/src/oci/data_safe/models/masked_column_summary.py new file mode 100644 index 0000000000..9cc721ff86 --- /dev/null +++ b/src/oci/data_safe/models/masked_column_summary.py @@ -0,0 +1,365 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskedColumnSummary(object): + """ + Summary of a masked column. A masked column is a database column masked by a data masking request. + """ + + #: A constant which can be used with the object_type property of a MaskedColumnSummary. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a MaskedColumnSummary. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + def __init__(self, **kwargs): + """ + Initializes a new MaskedColumnSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this MaskedColumnSummary. + :type key: str + + :param parent_column_key: + The value to assign to the parent_column_key property of this MaskedColumnSummary. + :type parent_column_key: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this MaskedColumnSummary. + :type sensitive_type_id: str + + :param schema_name: + The value to assign to the schema_name property of this MaskedColumnSummary. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this MaskedColumnSummary. + :type object_name: str + + :param object_type: + The value to assign to the object_type property of this MaskedColumnSummary. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param column_name: + The value to assign to the column_name property of this MaskedColumnSummary. + :type column_name: str + + :param masking_column_group: + The value to assign to the masking_column_group property of this MaskedColumnSummary. + :type masking_column_group: str + + :param masking_format_used: + The value to assign to the masking_format_used property of this MaskedColumnSummary. + :type masking_format_used: str + + :param total_masked_values: + The value to assign to the total_masked_values property of this MaskedColumnSummary. + :type total_masked_values: int + + """ + self.swagger_types = { + 'key': 'str', + 'parent_column_key': 'str', + 'sensitive_type_id': 'str', + 'schema_name': 'str', + 'object_name': 'str', + 'object_type': 'str', + 'column_name': 'str', + 'masking_column_group': 'str', + 'masking_format_used': 'str', + 'total_masked_values': 'int' + } + + self.attribute_map = { + 'key': 'key', + 'parent_column_key': 'parentColumnKey', + 'sensitive_type_id': 'sensitiveTypeId', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'object_type': 'objectType', + 'column_name': 'columnName', + 'masking_column_group': 'maskingColumnGroup', + 'masking_format_used': 'maskingFormatUsed', + 'total_masked_values': 'totalMaskedValues' + } + + self._key = None + self._parent_column_key = None + self._sensitive_type_id = None + self._schema_name = None + self._object_name = None + self._object_type = None + self._column_name = None + self._masking_column_group = None + self._masking_format_used = None + self._total_masked_values = None + + @property + def key(self): + """ + **[Required]** Gets the key of this MaskedColumnSummary. + The unique key that identifies the masked column. It's numeric and unique within a masking policy. + + + :return: The key of this MaskedColumnSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this MaskedColumnSummary. + The unique key that identifies the masked column. It's numeric and unique within a masking policy. + + + :param key: The key of this MaskedColumnSummary. + :type: str + """ + self._key = key + + @property + def parent_column_key(self): + """ + Gets the parent_column_key of this MaskedColumnSummary. + The unique key that identifies the parent column of the masked column. + + + :return: The parent_column_key of this MaskedColumnSummary. + :rtype: str + """ + return self._parent_column_key + + @parent_column_key.setter + def parent_column_key(self, parent_column_key): + """ + Sets the parent_column_key of this MaskedColumnSummary. + The unique key that identifies the parent column of the masked column. + + + :param parent_column_key: The parent_column_key of this MaskedColumnSummary. + :type: str + """ + self._parent_column_key = parent_column_key + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this MaskedColumnSummary. + The OCID of the sensitive type associated with the masked column. + + + :return: The sensitive_type_id of this MaskedColumnSummary. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this MaskedColumnSummary. + The OCID of the sensitive type associated with the masked column. + + + :param sensitive_type_id: The sensitive_type_id of this MaskedColumnSummary. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this MaskedColumnSummary. + The name of the schema that contains the masked column. + + + :return: The schema_name of this MaskedColumnSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this MaskedColumnSummary. + The name of the schema that contains the masked column. + + + :param schema_name: The schema_name of this MaskedColumnSummary. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this MaskedColumnSummary. + The name of the object (table or editioning view) that contains the masked column. + + + :return: The object_name of this MaskedColumnSummary. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this MaskedColumnSummary. + The name of the object (table or editioning view) that contains the masked column. + + + :param object_name: The object_name of this MaskedColumnSummary. + :type: str + """ + self._object_name = object_name + + @property + def object_type(self): + """ + **[Required]** Gets the object_type of this MaskedColumnSummary. + The type of the object (table or editioning view) that contains the masked column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this MaskedColumnSummary. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this MaskedColumnSummary. + The type of the object (table or editioning view) that contains the masked column. + + + :param object_type: The object_type of this MaskedColumnSummary. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this MaskedColumnSummary. + The name of the masked column. + + + :return: The column_name of this MaskedColumnSummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this MaskedColumnSummary. + The name of the masked column. + + + :param column_name: The column_name of this MaskedColumnSummary. + :type: str + """ + self._column_name = column_name + + @property + def masking_column_group(self): + """ + Gets the masking_column_group of this MaskedColumnSummary. + The masking group of the masked column. + + + :return: The masking_column_group of this MaskedColumnSummary. + :rtype: str + """ + return self._masking_column_group + + @masking_column_group.setter + def masking_column_group(self, masking_column_group): + """ + Sets the masking_column_group of this MaskedColumnSummary. + The masking group of the masked column. + + + :param masking_column_group: The masking_column_group of this MaskedColumnSummary. + :type: str + """ + self._masking_column_group = masking_column_group + + @property + def masking_format_used(self): + """ + **[Required]** Gets the masking_format_used of this MaskedColumnSummary. + The masking format used for masking the column. + + + :return: The masking_format_used of this MaskedColumnSummary. + :rtype: str + """ + return self._masking_format_used + + @masking_format_used.setter + def masking_format_used(self, masking_format_used): + """ + Sets the masking_format_used of this MaskedColumnSummary. + The masking format used for masking the column. + + + :param masking_format_used: The masking_format_used of this MaskedColumnSummary. + :type: str + """ + self._masking_format_used = masking_format_used + + @property + def total_masked_values(self): + """ + **[Required]** Gets the total_masked_values of this MaskedColumnSummary. + The total number of values masked in the column. + + + :return: The total_masked_values of this MaskedColumnSummary. + :rtype: int + """ + return self._total_masked_values + + @total_masked_values.setter + def total_masked_values(self, total_masked_values): + """ + Sets the total_masked_values of this MaskedColumnSummary. + The total number of values masked in the column. + + + :param total_masked_values: The total_masked_values of this MaskedColumnSummary. + :type: int + """ + self._total_masked_values = total_masked_values + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_analytics_collection.py b/src/oci/data_safe/models/masking_analytics_collection.py new file mode 100644 index 0000000000..a1c17950c5 --- /dev/null +++ b/src/oci/data_safe/models/masking_analytics_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingAnalyticsCollection(object): + """ + A collection of masking analytics summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingAnalyticsCollection 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 MaskingAnalyticsCollection. + :type items: list[oci.data_safe.models.MaskingAnalyticsSummary] + + """ + self.swagger_types = { + 'items': 'list[MaskingAnalyticsSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this MaskingAnalyticsCollection. + An array of masking analytics summary objects. + + + :return: The items of this MaskingAnalyticsCollection. + :rtype: list[oci.data_safe.models.MaskingAnalyticsSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this MaskingAnalyticsCollection. + An array of masking analytics summary objects. + + + :param items: The items of this MaskingAnalyticsCollection. + :type: list[oci.data_safe.models.MaskingAnalyticsSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_analytics_dimensions.py b/src/oci/data_safe/models/masking_analytics_dimensions.py new file mode 100644 index 0000000000..d9c01ce193 --- /dev/null +++ b/src/oci/data_safe/models/masking_analytics_dimensions.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingAnalyticsDimensions(object): + """ + The scope of analytics data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingAnalyticsDimensions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param target_id: + The value to assign to the target_id property of this MaskingAnalyticsDimensions. + :type target_id: str + + :param policy_id: + The value to assign to the policy_id property of this MaskingAnalyticsDimensions. + :type policy_id: str + + """ + self.swagger_types = { + 'target_id': 'str', + 'policy_id': 'str' + } + + self.attribute_map = { + 'target_id': 'targetId', + 'policy_id': 'policyId' + } + + self._target_id = None + self._policy_id = None + + @property + def target_id(self): + """ + Gets the target_id of this MaskingAnalyticsDimensions. + The OCID of the target database. + + + :return: The target_id of this MaskingAnalyticsDimensions. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this MaskingAnalyticsDimensions. + The OCID of the target database. + + + :param target_id: The target_id of this MaskingAnalyticsDimensions. + :type: str + """ + self._target_id = target_id + + @property + def policy_id(self): + """ + Gets the policy_id of this MaskingAnalyticsDimensions. + The OCID of the masking policy.. + + + :return: The policy_id of this MaskingAnalyticsDimensions. + :rtype: str + """ + return self._policy_id + + @policy_id.setter + def policy_id(self, policy_id): + """ + Sets the policy_id of this MaskingAnalyticsDimensions. + The OCID of the masking policy.. + + + :param policy_id: The policy_id of this MaskingAnalyticsDimensions. + :type: str + """ + self._policy_id = policy_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_analytics_summary.py b/src/oci/data_safe/models/masking_analytics_summary.py new file mode 100644 index 0000000000..fa4890aa14 --- /dev/null +++ b/src/oci/data_safe/models/masking_analytics_summary.py @@ -0,0 +1,168 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingAnalyticsSummary(object): + """ + Summary of masking analytics data. + """ + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKING_POLICY" + METRIC_NAME_MASKING_POLICY = "MASKING_POLICY" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKING_DATABASE" + METRIC_NAME_MASKING_DATABASE = "MASKING_DATABASE" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKING_WORK_REQUEST" + METRIC_NAME_MASKING_WORK_REQUEST = "MASKING_WORK_REQUEST" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKED_SENSITIVE_TYPE" + METRIC_NAME_MASKED_SENSITIVE_TYPE = "MASKED_SENSITIVE_TYPE" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKED_SCHEMA" + METRIC_NAME_MASKED_SCHEMA = "MASKED_SCHEMA" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKED_TABLE" + METRIC_NAME_MASKED_TABLE = "MASKED_TABLE" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKED_COLUMN" + METRIC_NAME_MASKED_COLUMN = "MASKED_COLUMN" + + #: A constant which can be used with the metric_name property of a MaskingAnalyticsSummary. + #: This constant has a value of "MASKED_DATA_VALUE" + METRIC_NAME_MASKED_DATA_VALUE = "MASKED_DATA_VALUE" + + def __init__(self, **kwargs): + """ + Initializes a new MaskingAnalyticsSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param metric_name: + The value to assign to the metric_name property of this MaskingAnalyticsSummary. + Allowed values for this property are: "MASKING_POLICY", "MASKING_DATABASE", "MASKING_WORK_REQUEST", "MASKED_SENSITIVE_TYPE", "MASKED_SCHEMA", "MASKED_TABLE", "MASKED_COLUMN", "MASKED_DATA_VALUE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type metric_name: str + + :param dimensions: + The value to assign to the dimensions property of this MaskingAnalyticsSummary. + :type dimensions: oci.data_safe.models.MaskingAnalyticsDimensions + + :param count: + The value to assign to the count property of this MaskingAnalyticsSummary. + :type count: int + + """ + self.swagger_types = { + 'metric_name': 'str', + 'dimensions': 'MaskingAnalyticsDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'metric_name': 'metricName', + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._metric_name = None + self._dimensions = None + self._count = None + + @property + def metric_name(self): + """ + **[Required]** Gets the metric_name of this MaskingAnalyticsSummary. + The name of the aggregation metric. + + Allowed values for this property are: "MASKING_POLICY", "MASKING_DATABASE", "MASKING_WORK_REQUEST", "MASKED_SENSITIVE_TYPE", "MASKED_SCHEMA", "MASKED_TABLE", "MASKED_COLUMN", "MASKED_DATA_VALUE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The metric_name of this MaskingAnalyticsSummary. + :rtype: str + """ + return self._metric_name + + @metric_name.setter + def metric_name(self, metric_name): + """ + Sets the metric_name of this MaskingAnalyticsSummary. + The name of the aggregation metric. + + + :param metric_name: The metric_name of this MaskingAnalyticsSummary. + :type: str + """ + allowed_values = ["MASKING_POLICY", "MASKING_DATABASE", "MASKING_WORK_REQUEST", "MASKED_SENSITIVE_TYPE", "MASKED_SCHEMA", "MASKED_TABLE", "MASKED_COLUMN", "MASKED_DATA_VALUE"] + if not value_allowed_none_or_none_sentinel(metric_name, allowed_values): + metric_name = 'UNKNOWN_ENUM_VALUE' + self._metric_name = metric_name + + @property + def dimensions(self): + """ + Gets the dimensions of this MaskingAnalyticsSummary. + + :return: The dimensions of this MaskingAnalyticsSummary. + :rtype: oci.data_safe.models.MaskingAnalyticsDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this MaskingAnalyticsSummary. + + :param dimensions: The dimensions of this MaskingAnalyticsSummary. + :type: oci.data_safe.models.MaskingAnalyticsDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + **[Required]** Gets the count of this MaskingAnalyticsSummary. + The total count for the aggregation metric. + + + :return: The count of this MaskingAnalyticsSummary. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this MaskingAnalyticsSummary. + The total count for the aggregation metric. + + + :param count: The count of this MaskingAnalyticsSummary. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_column.py b/src/oci/data_safe/models/masking_column.py new file mode 100644 index 0000000000..1f98a66f6c --- /dev/null +++ b/src/oci/data_safe/models/masking_column.py @@ -0,0 +1,600 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingColumn(object): + """ + A masking column is a resource corresponding to a database column that you want to + mask. It's a subresource of masking policy resource and is always associated with + a masking policy. Note that only parent columns are managed as masking columns. + The child columns are automatically managed using the childColumns attribute. + """ + + #: A constant which can be used with the lifecycle_state property of a MaskingColumn. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumn. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumn. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumn. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumn. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumn. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the object_type property of a MaskingColumn. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a MaskingColumn. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + def __init__(self, **kwargs): + """ + Initializes a new MaskingColumn object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this MaskingColumn. + :type key: str + + :param masking_policy_id: + The value to assign to the masking_policy_id property of this MaskingColumn. + :type masking_policy_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this MaskingColumn. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this MaskingColumn. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this MaskingColumn. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this MaskingColumn. + :type time_updated: datetime + + :param schema_name: + The value to assign to the schema_name property of this MaskingColumn. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this MaskingColumn. + :type object_name: str + + :param object_type: + The value to assign to the object_type property of this MaskingColumn. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param column_name: + The value to assign to the column_name property of this MaskingColumn. + :type column_name: str + + :param child_columns: + The value to assign to the child_columns property of this MaskingColumn. + :type child_columns: list[str] + + :param masking_column_group: + The value to assign to the masking_column_group property of this MaskingColumn. + :type masking_column_group: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this MaskingColumn. + :type sensitive_type_id: str + + :param is_masking_enabled: + The value to assign to the is_masking_enabled property of this MaskingColumn. + :type is_masking_enabled: bool + + :param data_type: + The value to assign to the data_type property of this MaskingColumn. + :type data_type: str + + :param masking_formats: + The value to assign to the masking_formats property of this MaskingColumn. + :type masking_formats: list[oci.data_safe.models.MaskingFormat] + + """ + self.swagger_types = { + 'key': 'str', + 'masking_policy_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'schema_name': 'str', + 'object_name': 'str', + 'object_type': 'str', + 'column_name': 'str', + 'child_columns': 'list[str]', + 'masking_column_group': 'str', + 'sensitive_type_id': 'str', + 'is_masking_enabled': 'bool', + 'data_type': 'str', + 'masking_formats': 'list[MaskingFormat]' + } + + self.attribute_map = { + 'key': 'key', + 'masking_policy_id': 'maskingPolicyId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'object_type': 'objectType', + 'column_name': 'columnName', + 'child_columns': 'childColumns', + 'masking_column_group': 'maskingColumnGroup', + 'sensitive_type_id': 'sensitiveTypeId', + 'is_masking_enabled': 'isMaskingEnabled', + 'data_type': 'dataType', + 'masking_formats': 'maskingFormats' + } + + self._key = None + self._masking_policy_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._schema_name = None + self._object_name = None + self._object_type = None + self._column_name = None + self._child_columns = None + self._masking_column_group = None + self._sensitive_type_id = None + self._is_masking_enabled = None + self._data_type = None + self._masking_formats = None + + @property + def key(self): + """ + **[Required]** Gets the key of this MaskingColumn. + The unique key that identifies the masking column. It's numeric and unique within a masking policy. + + + :return: The key of this MaskingColumn. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this MaskingColumn. + The unique key that identifies the masking column. It's numeric and unique within a masking policy. + + + :param key: The key of this MaskingColumn. + :type: str + """ + self._key = key + + @property + def masking_policy_id(self): + """ + **[Required]** Gets the masking_policy_id of this MaskingColumn. + The OCID of the masking policy that contains the masking column. + + + :return: The masking_policy_id of this MaskingColumn. + :rtype: str + """ + return self._masking_policy_id + + @masking_policy_id.setter + def masking_policy_id(self, masking_policy_id): + """ + Sets the masking_policy_id of this MaskingColumn. + The OCID of the masking policy that contains the masking column. + + + :param masking_policy_id: The masking_policy_id of this MaskingColumn. + :type: str + """ + self._masking_policy_id = masking_policy_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this MaskingColumn. + The current state of the masking column. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this MaskingColumn. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this MaskingColumn. + The current state of the masking column. + + + :param lifecycle_state: The lifecycle_state of this MaskingColumn. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this MaskingColumn. + Details about the current state of the masking column. + + + :return: The lifecycle_details of this MaskingColumn. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this MaskingColumn. + Details about the current state of the masking column. + + + :param lifecycle_details: The lifecycle_details of this MaskingColumn. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this MaskingColumn. + The date and time the masking column was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this MaskingColumn. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this MaskingColumn. + The date and time the masking column was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this MaskingColumn. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this MaskingColumn. + The date and time the masking column was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this MaskingColumn. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this MaskingColumn. + The date and time the masking column was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this MaskingColumn. + :type: datetime + """ + self._time_updated = time_updated + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this MaskingColumn. + The name of the schema that contains the database column. + + + :return: The schema_name of this MaskingColumn. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this MaskingColumn. + The name of the schema that contains the database column. + + + :param schema_name: The schema_name of this MaskingColumn. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this MaskingColumn. + The name of the object (table or editioning view) that contains the database column. + + + :return: The object_name of this MaskingColumn. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this MaskingColumn. + The name of the object (table or editioning view) that contains the database column. + + + :param object_name: The object_name of this MaskingColumn. + :type: str + """ + self._object_name = object_name + + @property + def object_type(self): + """ + Gets the object_type of this MaskingColumn. + The type of the object that contains the database column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this MaskingColumn. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this MaskingColumn. + The type of the object that contains the database column. + + + :param object_type: The object_type of this MaskingColumn. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this MaskingColumn. + The name of the database column. Note that the same name is used for the masking column. + There is no separate displayName attribute for the masking column. + + + :return: The column_name of this MaskingColumn. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this MaskingColumn. + The name of the database column. Note that the same name is used for the masking column. + There is no separate displayName attribute for the masking column. + + + :param column_name: The column_name of this MaskingColumn. + :type: str + """ + self._column_name = column_name + + @property + def child_columns(self): + """ + Gets the child_columns of this MaskingColumn. + An array of child columns that are in referential relationship with the masking column. + + + :return: The child_columns of this MaskingColumn. + :rtype: list[str] + """ + return self._child_columns + + @child_columns.setter + def child_columns(self, child_columns): + """ + Sets the child_columns of this MaskingColumn. + An array of child columns that are in referential relationship with the masking column. + + + :param child_columns: The child_columns of this MaskingColumn. + :type: list[str] + """ + self._child_columns = child_columns + + @property + def masking_column_group(self): + """ + Gets the masking_column_group of this MaskingColumn. + The group of the masking column. All the columns in a group are masked together to ensure + that the masked data across these columns continue to retain the same logical relationship. + For more details, check Group Masking in the Data Safe documentation. + + + :return: The masking_column_group of this MaskingColumn. + :rtype: str + """ + return self._masking_column_group + + @masking_column_group.setter + def masking_column_group(self, masking_column_group): + """ + Sets the masking_column_group of this MaskingColumn. + The group of the masking column. All the columns in a group are masked together to ensure + that the masked data across these columns continue to retain the same logical relationship. + For more details, check Group Masking in the Data Safe documentation. + + + :param masking_column_group: The masking_column_group of this MaskingColumn. + :type: str + """ + self._masking_column_group = masking_column_group + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this MaskingColumn. + The OCID of the sensitive type associated with the masking column. + + + :return: The sensitive_type_id of this MaskingColumn. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this MaskingColumn. + The OCID of the sensitive type associated with the masking column. + + + :param sensitive_type_id: The sensitive_type_id of this MaskingColumn. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def is_masking_enabled(self): + """ + **[Required]** Gets the is_masking_enabled of this MaskingColumn. + Indicates if data masking is enabled for the masking column. + + + :return: The is_masking_enabled of this MaskingColumn. + :rtype: bool + """ + return self._is_masking_enabled + + @is_masking_enabled.setter + def is_masking_enabled(self, is_masking_enabled): + """ + Sets the is_masking_enabled of this MaskingColumn. + Indicates if data masking is enabled for the masking column. + + + :param is_masking_enabled: The is_masking_enabled of this MaskingColumn. + :type: bool + """ + self._is_masking_enabled = is_masking_enabled + + @property + def data_type(self): + """ + Gets the data_type of this MaskingColumn. + The data type of the masking column. + + + :return: The data_type of this MaskingColumn. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this MaskingColumn. + The data type of the masking column. + + + :param data_type: The data_type of this MaskingColumn. + :type: str + """ + self._data_type = data_type + + @property + def masking_formats(self): + """ + Gets the masking_formats of this MaskingColumn. + An array of masking formats assigned to the masking column. + + + :return: The masking_formats of this MaskingColumn. + :rtype: list[oci.data_safe.models.MaskingFormat] + """ + return self._masking_formats + + @masking_formats.setter + def masking_formats(self, masking_formats): + """ + Sets the masking_formats of this MaskingColumn. + An array of masking formats assigned to the masking column. + + + :param masking_formats: The masking_formats of this MaskingColumn. + :type: list[oci.data_safe.models.MaskingFormat] + """ + self._masking_formats = masking_formats + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_column_collection.py b/src/oci/data_safe/models/masking_column_collection.py new file mode 100644 index 0000000000..5a50b10138 --- /dev/null +++ b/src/oci/data_safe/models/masking_column_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingColumnCollection(object): + """ + A collection of masking column summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingColumnCollection 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 MaskingColumnCollection. + :type items: list[oci.data_safe.models.MaskingColumnSummary] + + """ + self.swagger_types = { + 'items': 'list[MaskingColumnSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this MaskingColumnCollection. + An array of masking column summary objects. + + + :return: The items of this MaskingColumnCollection. + :rtype: list[oci.data_safe.models.MaskingColumnSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this MaskingColumnCollection. + An array of masking column summary objects. + + + :param items: The items of this MaskingColumnCollection. + :type: list[oci.data_safe.models.MaskingColumnSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_column_summary.py b/src/oci/data_safe/models/masking_column_summary.py new file mode 100644 index 0000000000..3097963d67 --- /dev/null +++ b/src/oci/data_safe/models/masking_column_summary.py @@ -0,0 +1,597 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingColumnSummary(object): + """ + Summary of a masking column. + """ + + #: A constant which can be used with the lifecycle_state property of a MaskingColumnSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumnSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumnSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumnSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumnSummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a MaskingColumnSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the object_type property of a MaskingColumnSummary. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a MaskingColumnSummary. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + def __init__(self, **kwargs): + """ + Initializes a new MaskingColumnSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this MaskingColumnSummary. + :type key: str + + :param masking_policy_id: + The value to assign to the masking_policy_id property of this MaskingColumnSummary. + :type masking_policy_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this MaskingColumnSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this MaskingColumnSummary. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this MaskingColumnSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this MaskingColumnSummary. + :type time_updated: datetime + + :param schema_name: + The value to assign to the schema_name property of this MaskingColumnSummary. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this MaskingColumnSummary. + :type object_name: str + + :param object_type: + The value to assign to the object_type property of this MaskingColumnSummary. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param column_name: + The value to assign to the column_name property of this MaskingColumnSummary. + :type column_name: str + + :param child_columns: + The value to assign to the child_columns property of this MaskingColumnSummary. + :type child_columns: list[str] + + :param masking_column_group: + The value to assign to the masking_column_group property of this MaskingColumnSummary. + :type masking_column_group: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this MaskingColumnSummary. + :type sensitive_type_id: str + + :param is_masking_enabled: + The value to assign to the is_masking_enabled property of this MaskingColumnSummary. + :type is_masking_enabled: bool + + :param data_type: + The value to assign to the data_type property of this MaskingColumnSummary. + :type data_type: str + + :param masking_formats: + The value to assign to the masking_formats property of this MaskingColumnSummary. + :type masking_formats: list[oci.data_safe.models.MaskingFormat] + + """ + self.swagger_types = { + 'key': 'str', + 'masking_policy_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'schema_name': 'str', + 'object_name': 'str', + 'object_type': 'str', + 'column_name': 'str', + 'child_columns': 'list[str]', + 'masking_column_group': 'str', + 'sensitive_type_id': 'str', + 'is_masking_enabled': 'bool', + 'data_type': 'str', + 'masking_formats': 'list[MaskingFormat]' + } + + self.attribute_map = { + 'key': 'key', + 'masking_policy_id': 'maskingPolicyId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'object_type': 'objectType', + 'column_name': 'columnName', + 'child_columns': 'childColumns', + 'masking_column_group': 'maskingColumnGroup', + 'sensitive_type_id': 'sensitiveTypeId', + 'is_masking_enabled': 'isMaskingEnabled', + 'data_type': 'dataType', + 'masking_formats': 'maskingFormats' + } + + self._key = None + self._masking_policy_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._schema_name = None + self._object_name = None + self._object_type = None + self._column_name = None + self._child_columns = None + self._masking_column_group = None + self._sensitive_type_id = None + self._is_masking_enabled = None + self._data_type = None + self._masking_formats = None + + @property + def key(self): + """ + **[Required]** Gets the key of this MaskingColumnSummary. + The unique key that identifies a masking column. The key is numeric and unique within a masking policy. + + + :return: The key of this MaskingColumnSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this MaskingColumnSummary. + The unique key that identifies a masking column. The key is numeric and unique within a masking policy. + + + :param key: The key of this MaskingColumnSummary. + :type: str + """ + self._key = key + + @property + def masking_policy_id(self): + """ + **[Required]** Gets the masking_policy_id of this MaskingColumnSummary. + The OCID of the masking policy that contains the masking column. + + + :return: The masking_policy_id of this MaskingColumnSummary. + :rtype: str + """ + return self._masking_policy_id + + @masking_policy_id.setter + def masking_policy_id(self, masking_policy_id): + """ + Sets the masking_policy_id of this MaskingColumnSummary. + The OCID of the masking policy that contains the masking column. + + + :param masking_policy_id: The masking_policy_id of this MaskingColumnSummary. + :type: str + """ + self._masking_policy_id = masking_policy_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this MaskingColumnSummary. + The current state of the masking column. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this MaskingColumnSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this MaskingColumnSummary. + The current state of the masking column. + + + :param lifecycle_state: The lifecycle_state of this MaskingColumnSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this MaskingColumnSummary. + Details about the current state of the masking column. + + + :return: The lifecycle_details of this MaskingColumnSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this MaskingColumnSummary. + Details about the current state of the masking column. + + + :param lifecycle_details: The lifecycle_details of this MaskingColumnSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this MaskingColumnSummary. + The date and time the masking column was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this MaskingColumnSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this MaskingColumnSummary. + The date and time the masking column was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this MaskingColumnSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this MaskingColumnSummary. + The date and time the masking column was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this MaskingColumnSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this MaskingColumnSummary. + The date and time the masking column was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this MaskingColumnSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this MaskingColumnSummary. + The name of the schema that contains the database column. + + + :return: The schema_name of this MaskingColumnSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this MaskingColumnSummary. + The name of the schema that contains the database column. + + + :param schema_name: The schema_name of this MaskingColumnSummary. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this MaskingColumnSummary. + The name of the object (table or editioning view) that contains the database column. + + + :return: The object_name of this MaskingColumnSummary. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this MaskingColumnSummary. + The name of the object (table or editioning view) that contains the database column. + + + :param object_name: The object_name of this MaskingColumnSummary. + :type: str + """ + self._object_name = object_name + + @property + def object_type(self): + """ + Gets the object_type of this MaskingColumnSummary. + The type of the object that contains the database column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this MaskingColumnSummary. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this MaskingColumnSummary. + The type of the object that contains the database column. + + + :param object_type: The object_type of this MaskingColumnSummary. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this MaskingColumnSummary. + The name of the database column. Note that the same name is used for the masking column. + There is no separate displayName attribute for the masking column. + + + :return: The column_name of this MaskingColumnSummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this MaskingColumnSummary. + The name of the database column. Note that the same name is used for the masking column. + There is no separate displayName attribute for the masking column. + + + :param column_name: The column_name of this MaskingColumnSummary. + :type: str + """ + self._column_name = column_name + + @property + def child_columns(self): + """ + Gets the child_columns of this MaskingColumnSummary. + An array of child columns that are in referential relationship with the masking column. + + + :return: The child_columns of this MaskingColumnSummary. + :rtype: list[str] + """ + return self._child_columns + + @child_columns.setter + def child_columns(self, child_columns): + """ + Sets the child_columns of this MaskingColumnSummary. + An array of child columns that are in referential relationship with the masking column. + + + :param child_columns: The child_columns of this MaskingColumnSummary. + :type: list[str] + """ + self._child_columns = child_columns + + @property + def masking_column_group(self): + """ + Gets the masking_column_group of this MaskingColumnSummary. + The group of the masking column. All the columns in a group are masked together to ensure + that the masked data across these columns continue + to retain the same logical relationship. For more details, check Group Masking in the Data Safe documentation. + + + :return: The masking_column_group of this MaskingColumnSummary. + :rtype: str + """ + return self._masking_column_group + + @masking_column_group.setter + def masking_column_group(self, masking_column_group): + """ + Sets the masking_column_group of this MaskingColumnSummary. + The group of the masking column. All the columns in a group are masked together to ensure + that the masked data across these columns continue + to retain the same logical relationship. For more details, check Group Masking in the Data Safe documentation. + + + :param masking_column_group: The masking_column_group of this MaskingColumnSummary. + :type: str + """ + self._masking_column_group = masking_column_group + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this MaskingColumnSummary. + The OCID of the sensitive type associated with the masking column. + + + :return: The sensitive_type_id of this MaskingColumnSummary. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this MaskingColumnSummary. + The OCID of the sensitive type associated with the masking column. + + + :param sensitive_type_id: The sensitive_type_id of this MaskingColumnSummary. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def is_masking_enabled(self): + """ + **[Required]** Gets the is_masking_enabled of this MaskingColumnSummary. + Indicates if data masking is enabled for the masking column. + + + :return: The is_masking_enabled of this MaskingColumnSummary. + :rtype: bool + """ + return self._is_masking_enabled + + @is_masking_enabled.setter + def is_masking_enabled(self, is_masking_enabled): + """ + Sets the is_masking_enabled of this MaskingColumnSummary. + Indicates if data masking is enabled for the masking column. + + + :param is_masking_enabled: The is_masking_enabled of this MaskingColumnSummary. + :type: bool + """ + self._is_masking_enabled = is_masking_enabled + + @property + def data_type(self): + """ + Gets the data_type of this MaskingColumnSummary. + The data type of the masking column. + + + :return: The data_type of this MaskingColumnSummary. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this MaskingColumnSummary. + The data type of the masking column. + + + :param data_type: The data_type of this MaskingColumnSummary. + :type: str + """ + self._data_type = data_type + + @property + def masking_formats(self): + """ + Gets the masking_formats of this MaskingColumnSummary. + An array of masking formats assigned to the masking column. + + + :return: The masking_formats of this MaskingColumnSummary. + :rtype: list[oci.data_safe.models.MaskingFormat] + """ + return self._masking_formats + + @masking_formats.setter + def masking_formats(self, masking_formats): + """ + Sets the masking_formats of this MaskingColumnSummary. + An array of masking formats assigned to the masking column. + + + :param masking_formats: The masking_formats of this MaskingColumnSummary. + :type: list[oci.data_safe.models.MaskingFormat] + """ + self._masking_formats = masking_formats + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_format.py b/src/oci/data_safe/models/masking_format.py new file mode 100644 index 0000000000..2099146837 --- /dev/null +++ b/src/oci/data_safe/models/masking_format.py @@ -0,0 +1,150 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingFormat(object): + """ + A masking format defines the logic to mask data in a database column. The condition attribute + defines the condition that must be true for applying the masking format. It enables you to do + conditional masking + so that you can mask the column data values differently using different masking formats and + the associated conditions. A masking format can have one or more format entries. A format entry + can be a basic masking format such as Random Number, or it can be a library masking format.The + combined output of all the format entries is used for masking. It provides the flexibility to + define a masking format that can generate different parts of a data value separately and then + combine them to get the final data value for masking. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingFormat object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param condition: + The value to assign to the condition property of this MaskingFormat. + :type condition: str + + :param description: + The value to assign to the description property of this MaskingFormat. + :type description: str + + :param format_entries: + The value to assign to the format_entries property of this MaskingFormat. + :type format_entries: list[oci.data_safe.models.FormatEntry] + + """ + self.swagger_types = { + 'condition': 'str', + 'description': 'str', + 'format_entries': 'list[FormatEntry]' + } + + self.attribute_map = { + 'condition': 'condition', + 'description': 'description', + 'format_entries': 'formatEntries' + } + + self._condition = None + self._description = None + self._format_entries = None + + @property + def condition(self): + """ + Gets the condition of this MaskingFormat. + A condition that must be true for applying the masking format. It can be any valid + SQL construct that can be used in a SQL predicate. It enables you to do + conditional masking + so that you can mask the column data values differently using different masking + formats and the associated conditions. + + + :return: The condition of this MaskingFormat. + :rtype: str + """ + return self._condition + + @condition.setter + def condition(self, condition): + """ + Sets the condition of this MaskingFormat. + A condition that must be true for applying the masking format. It can be any valid + SQL construct that can be used in a SQL predicate. It enables you to do + conditional masking + so that you can mask the column data values differently using different masking + formats and the associated conditions. + + + :param condition: The condition of this MaskingFormat. + :type: str + """ + self._condition = condition + + @property + def description(self): + """ + Gets the description of this MaskingFormat. + The description of the masking format. + + + :return: The description of this MaskingFormat. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this MaskingFormat. + The description of the masking format. + + + :param description: The description of this MaskingFormat. + :type: str + """ + self._description = description + + @property + def format_entries(self): + """ + **[Required]** Gets the format_entries of this MaskingFormat. + An array of format entries. The combined output of all the format entries is + used for masking the column data values. + + + :return: The format_entries of this MaskingFormat. + :rtype: list[oci.data_safe.models.FormatEntry] + """ + return self._format_entries + + @format_entries.setter + def format_entries(self, format_entries): + """ + Sets the format_entries of this MaskingFormat. + An array of format entries. The combined output of all the format entries is + used for masking the column data values. + + + :param format_entries: The format_entries of this MaskingFormat. + :type: list[oci.data_safe.models.FormatEntry] + """ + self._format_entries = format_entries + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_policy.py b/src/oci/data_safe/models/masking_policy.py new file mode 100644 index 0000000000..f9e7d48fe1 --- /dev/null +++ b/src/oci/data_safe/models/masking_policy.py @@ -0,0 +1,681 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingPolicy(object): + """ + A masking policy defines the approach to mask data in a target database. It's basically + a collection of columns to be masked, called masking columns, and the associated masking + formats to be used to mask these columns. A masking policy can be used to mask multiple + databases provided that they have the same schema design. For more information, see + Masking Policies + in the Oracle Data Safe documentation. + """ + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicy. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the recompile property of a MaskingPolicy. + #: This constant has a value of "SERIAL" + RECOMPILE_SERIAL = "SERIAL" + + #: A constant which can be used with the recompile property of a MaskingPolicy. + #: This constant has a value of "PARALLEL" + RECOMPILE_PARALLEL = "PARALLEL" + + #: A constant which can be used with the recompile property of a MaskingPolicy. + #: This constant has a value of "NONE" + RECOMPILE_NONE = "NONE" + + def __init__(self, **kwargs): + """ + Initializes a new MaskingPolicy 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 MaskingPolicy. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this MaskingPolicy. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this MaskingPolicy. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this MaskingPolicy. + :type time_created: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this MaskingPolicy. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_updated: + The value to assign to the time_updated property of this MaskingPolicy. + :type time_updated: datetime + + :param description: + The value to assign to the description property of this MaskingPolicy. + :type description: str + + :param is_drop_temp_tables_enabled: + The value to assign to the is_drop_temp_tables_enabled property of this MaskingPolicy. + :type is_drop_temp_tables_enabled: bool + + :param is_redo_logging_enabled: + The value to assign to the is_redo_logging_enabled property of this MaskingPolicy. + :type is_redo_logging_enabled: bool + + :param is_refresh_stats_enabled: + The value to assign to the is_refresh_stats_enabled property of this MaskingPolicy. + :type is_refresh_stats_enabled: bool + + :param parallel_degree: + The value to assign to the parallel_degree property of this MaskingPolicy. + :type parallel_degree: str + + :param recompile: + The value to assign to the recompile property of this MaskingPolicy. + Allowed values for this property are: "SERIAL", "PARALLEL", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type recompile: str + + :param pre_masking_script: + The value to assign to the pre_masking_script property of this MaskingPolicy. + :type pre_masking_script: str + + :param post_masking_script: + The value to assign to the post_masking_script property of this MaskingPolicy. + :type post_masking_script: str + + :param column_source: + The value to assign to the column_source property of this MaskingPolicy. + :type column_source: oci.data_safe.models.ColumnSourceDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this MaskingPolicy. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this MaskingPolicy. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'lifecycle_state': 'str', + 'time_updated': 'datetime', + 'description': 'str', + 'is_drop_temp_tables_enabled': 'bool', + 'is_redo_logging_enabled': 'bool', + 'is_refresh_stats_enabled': 'bool', + 'parallel_degree': 'str', + 'recompile': 'str', + 'pre_masking_script': 'str', + 'post_masking_script': 'str', + 'column_source': 'ColumnSourceDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'lifecycle_state': 'lifecycleState', + 'time_updated': 'timeUpdated', + 'description': 'description', + 'is_drop_temp_tables_enabled': 'isDropTempTablesEnabled', + 'is_redo_logging_enabled': 'isRedoLoggingEnabled', + 'is_refresh_stats_enabled': 'isRefreshStatsEnabled', + 'parallel_degree': 'parallelDegree', + 'recompile': 'recompile', + 'pre_masking_script': 'preMaskingScript', + 'post_masking_script': 'postMaskingScript', + 'column_source': 'columnSource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._time_created = None + self._lifecycle_state = None + self._time_updated = None + self._description = None + self._is_drop_temp_tables_enabled = None + self._is_redo_logging_enabled = None + self._is_refresh_stats_enabled = None + self._parallel_degree = None + self._recompile = None + self._pre_masking_script = None + self._post_masking_script = None + self._column_source = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this MaskingPolicy. + The OCID of the masking policy. + + + :return: The id of this MaskingPolicy. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this MaskingPolicy. + The OCID of the masking policy. + + + :param id: The id of this MaskingPolicy. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this MaskingPolicy. + The OCID of the compartment that contains the masking policy. + + + :return: The compartment_id of this MaskingPolicy. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this MaskingPolicy. + The OCID of the compartment that contains the masking policy. + + + :param compartment_id: The compartment_id of this MaskingPolicy. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this MaskingPolicy. + The display name of the masking policy. + + + :return: The display_name of this MaskingPolicy. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this MaskingPolicy. + The display name of the masking policy. + + + :param display_name: The display_name of this MaskingPolicy. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this MaskingPolicy. + The date and time the masking policy was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this MaskingPolicy. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this MaskingPolicy. + The date and time the masking policy was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this MaskingPolicy. + :type: datetime + """ + self._time_created = time_created + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this MaskingPolicy. + The current state of the masking policy. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this MaskingPolicy. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this MaskingPolicy. + The current state of the masking policy. + + + :param lifecycle_state: The lifecycle_state of this MaskingPolicy. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this MaskingPolicy. + The date and time the masking policy was last updated, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this MaskingPolicy. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this MaskingPolicy. + The date and time the masking policy was last updated, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this MaskingPolicy. + :type: datetime + """ + self._time_updated = time_updated + + @property + def description(self): + """ + Gets the description of this MaskingPolicy. + The description of the masking policy. + + + :return: The description of this MaskingPolicy. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this MaskingPolicy. + The description of the masking policy. + + + :param description: The description of this MaskingPolicy. + :type: str + """ + self._description = description + + @property + def is_drop_temp_tables_enabled(self): + """ + **[Required]** Gets the is_drop_temp_tables_enabled of this MaskingPolicy. + Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. + Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want + to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + must be dropped before the database is available for unprivileged users. + + + :return: The is_drop_temp_tables_enabled of this MaskingPolicy. + :rtype: bool + """ + return self._is_drop_temp_tables_enabled + + @is_drop_temp_tables_enabled.setter + def is_drop_temp_tables_enabled(self, is_drop_temp_tables_enabled): + """ + Sets the is_drop_temp_tables_enabled of this MaskingPolicy. + Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. + Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want + to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + must be dropped before the database is available for unprivileged users. + + + :param is_drop_temp_tables_enabled: The is_drop_temp_tables_enabled of this MaskingPolicy. + :type: bool + """ + self._is_drop_temp_tables_enabled = is_drop_temp_tables_enabled + + @property + def is_redo_logging_enabled(self): + """ + **[Required]** Gets the is_redo_logging_enabled of this MaskingPolicy. + Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to + enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked + data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + + + :return: The is_redo_logging_enabled of this MaskingPolicy. + :rtype: bool + """ + return self._is_redo_logging_enabled + + @is_redo_logging_enabled.setter + def is_redo_logging_enabled(self, is_redo_logging_enabled): + """ + Sets the is_redo_logging_enabled of this MaskingPolicy. + Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to + enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked + data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + + + :param is_redo_logging_enabled: The is_redo_logging_enabled of this MaskingPolicy. + :type: bool + """ + self._is_redo_logging_enabled = is_redo_logging_enabled + + @property + def is_refresh_stats_enabled(self): + """ + **[Required]** Gets the is_refresh_stats_enabled of this MaskingPolicy. + Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics + gathering. The masking process gathers statistics on masked database tables after masking completes. + + + :return: The is_refresh_stats_enabled of this MaskingPolicy. + :rtype: bool + """ + return self._is_refresh_stats_enabled + + @is_refresh_stats_enabled.setter + def is_refresh_stats_enabled(self, is_refresh_stats_enabled): + """ + Sets the is_refresh_stats_enabled of this MaskingPolicy. + Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics + gathering. The masking process gathers statistics on masked database tables after masking completes. + + + :param is_refresh_stats_enabled: The is_refresh_stats_enabled of this MaskingPolicy. + :type: bool + """ + self._is_refresh_stats_enabled = is_refresh_stats_enabled + + @property + def parallel_degree(self): + """ + **[Required]** Gets the parallel_degree of this MaskingPolicy. + Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + + + :return: The parallel_degree of this MaskingPolicy. + :rtype: str + """ + return self._parallel_degree + + @parallel_degree.setter + def parallel_degree(self, parallel_degree): + """ + Sets the parallel_degree of this MaskingPolicy. + Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + + + :param parallel_degree: The parallel_degree of this MaskingPolicy. + :type: str + """ + self._parallel_degree = parallel_degree + + @property + def recompile(self): + """ + **[Required]** Gets the recompile of this MaskingPolicy. + Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + attribute is used. + + Allowed values for this property are: "SERIAL", "PARALLEL", "NONE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The recompile of this MaskingPolicy. + :rtype: str + """ + return self._recompile + + @recompile.setter + def recompile(self, recompile): + """ + Sets the recompile of this MaskingPolicy. + Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + attribute is used. + + + :param recompile: The recompile of this MaskingPolicy. + :type: str + """ + allowed_values = ["SERIAL", "PARALLEL", "NONE"] + if not value_allowed_none_or_none_sentinel(recompile, allowed_values): + recompile = 'UNKNOWN_ENUM_VALUE' + self._recompile = recompile + + @property + def pre_masking_script(self): + """ + Gets the pre_masking_script of this MaskingPolicy. + A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before + the core masking script generated using the masking policy. It's usually used to perform + any preparation or prerequisite work before masking data. + + + :return: The pre_masking_script of this MaskingPolicy. + :rtype: str + """ + return self._pre_masking_script + + @pre_masking_script.setter + def pre_masking_script(self, pre_masking_script): + """ + Sets the pre_masking_script of this MaskingPolicy. + A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before + the core masking script generated using the masking policy. It's usually used to perform + any preparation or prerequisite work before masking data. + + + :param pre_masking_script: The pre_masking_script of this MaskingPolicy. + :type: str + """ + self._pre_masking_script = pre_masking_script + + @property + def post_masking_script(self): + """ + Gets the post_masking_script of this MaskingPolicy. + A post-masking script, which can contain SQL and PL/SQL statements. It's executed after + the core masking script generated using the masking policy. It's usually used to perform + additional transformation or cleanup work after masking. + + + :return: The post_masking_script of this MaskingPolicy. + :rtype: str + """ + return self._post_masking_script + + @post_masking_script.setter + def post_masking_script(self, post_masking_script): + """ + Sets the post_masking_script of this MaskingPolicy. + A post-masking script, which can contain SQL and PL/SQL statements. It's executed after + the core masking script generated using the masking policy. It's usually used to perform + additional transformation or cleanup work after masking. + + + :param post_masking_script: The post_masking_script of this MaskingPolicy. + :type: str + """ + self._post_masking_script = post_masking_script + + @property + def column_source(self): + """ + Gets the column_source of this MaskingPolicy. + + :return: The column_source of this MaskingPolicy. + :rtype: oci.data_safe.models.ColumnSourceDetails + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this MaskingPolicy. + + :param column_source: The column_source of this MaskingPolicy. + :type: oci.data_safe.models.ColumnSourceDetails + """ + self._column_source = column_source + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this MaskingPolicy. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this MaskingPolicy. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this MaskingPolicy. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this MaskingPolicy. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this MaskingPolicy. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this MaskingPolicy. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this MaskingPolicy. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this MaskingPolicy. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_policy_collection.py b/src/oci/data_safe/models/masking_policy_collection.py new file mode 100644 index 0000000000..9eb792eebb --- /dev/null +++ b/src/oci/data_safe/models/masking_policy_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingPolicyCollection(object): + """ + A collection of masking policy summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingPolicyCollection 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 MaskingPolicyCollection. + :type items: list[oci.data_safe.models.MaskingPolicySummary] + + """ + self.swagger_types = { + 'items': 'list[MaskingPolicySummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this MaskingPolicyCollection. + An array of masking policy summary objects. + + + :return: The items of this MaskingPolicyCollection. + :rtype: list[oci.data_safe.models.MaskingPolicySummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this MaskingPolicyCollection. + An array of masking policy summary objects. + + + :param items: The items of this MaskingPolicyCollection. + :type: list[oci.data_safe.models.MaskingPolicySummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_policy_summary.py b/src/oci/data_safe/models/masking_policy_summary.py new file mode 100644 index 0000000000..02d784131c --- /dev/null +++ b/src/oci/data_safe/models/masking_policy_summary.py @@ -0,0 +1,405 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingPolicySummary(object): + """ + Summary of a masking policy. + """ + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "NEEDS_ATTENTION" + LIFECYCLE_STATE_NEEDS_ATTENTION = "NEEDS_ATTENTION" + + #: A constant which can be used with the lifecycle_state property of a MaskingPolicySummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new MaskingPolicySummary 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 MaskingPolicySummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this MaskingPolicySummary. + :type compartment_id: str + + :param display_name: + The value to assign to the display_name property of this MaskingPolicySummary. + :type display_name: str + + :param time_created: + The value to assign to the time_created property of this MaskingPolicySummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this MaskingPolicySummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this MaskingPolicySummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param description: + The value to assign to the description property of this MaskingPolicySummary. + :type description: str + + :param column_source: + The value to assign to the column_source property of this MaskingPolicySummary. + :type column_source: oci.data_safe.models.ColumnSourceDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this MaskingPolicySummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this MaskingPolicySummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'display_name': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'description': 'str', + 'column_source': 'ColumnSourceDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'display_name': 'displayName', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'description': 'description', + 'column_source': 'columnSource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._compartment_id = None + self._display_name = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._description = None + self._column_source = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this MaskingPolicySummary. + The OCID of the masking policy. + + + :return: The id of this MaskingPolicySummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this MaskingPolicySummary. + The OCID of the masking policy. + + + :param id: The id of this MaskingPolicySummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this MaskingPolicySummary. + The OCID of the compartment that contains the masking policy. + + + :return: The compartment_id of this MaskingPolicySummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this MaskingPolicySummary. + The OCID of the compartment that contains the masking policy. + + + :param compartment_id: The compartment_id of this MaskingPolicySummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this MaskingPolicySummary. + The display name of the masking policy. + + + :return: The display_name of this MaskingPolicySummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this MaskingPolicySummary. + The display name of the masking policy. + + + :param display_name: The display_name of this MaskingPolicySummary. + :type: str + """ + self._display_name = display_name + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this MaskingPolicySummary. + The date and time the masking policy was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this MaskingPolicySummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this MaskingPolicySummary. + The date and time the masking policy was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this MaskingPolicySummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this MaskingPolicySummary. + The date and time the masking policy was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this MaskingPolicySummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this MaskingPolicySummary. + The date and time the masking policy was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this MaskingPolicySummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this MaskingPolicySummary. + The current state of the masking policy. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this MaskingPolicySummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this MaskingPolicySummary. + The current state of the masking policy. + + + :param lifecycle_state: The lifecycle_state of this MaskingPolicySummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def description(self): + """ + Gets the description of this MaskingPolicySummary. + The description of the masking policy. + + + :return: The description of this MaskingPolicySummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this MaskingPolicySummary. + The description of the masking policy. + + + :param description: The description of this MaskingPolicySummary. + :type: str + """ + self._description = description + + @property + def column_source(self): + """ + Gets the column_source of this MaskingPolicySummary. + + :return: The column_source of this MaskingPolicySummary. + :rtype: oci.data_safe.models.ColumnSourceDetails + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this MaskingPolicySummary. + + :param column_source: The column_source of this MaskingPolicySummary. + :type: oci.data_safe.models.ColumnSourceDetails + """ + self._column_source = column_source + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this MaskingPolicySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this MaskingPolicySummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this MaskingPolicySummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this MaskingPolicySummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this MaskingPolicySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this MaskingPolicySummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this MaskingPolicySummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this MaskingPolicySummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_report.py b/src/oci/data_safe/models/masking_report.py new file mode 100644 index 0000000000..e6426724f4 --- /dev/null +++ b/src/oci/data_safe/models/masking_report.py @@ -0,0 +1,420 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingReport(object): + """ + A masking report contains information about a completed masking request. It includes details such as the target database masked, + masking policy used, masking start and finish time, total number of schemas, tables, columns and values masked, masked columns, and the masking formats used. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingReport 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 MaskingReport. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this MaskingReport. + :type compartment_id: str + + :param masking_work_request_id: + The value to assign to the masking_work_request_id property of this MaskingReport. + :type masking_work_request_id: str + + :param masking_policy_id: + The value to assign to the masking_policy_id property of this MaskingReport. + :type masking_policy_id: str + + :param target_id: + The value to assign to the target_id property of this MaskingReport. + :type target_id: str + + :param total_masked_sensitive_types: + The value to assign to the total_masked_sensitive_types property of this MaskingReport. + :type total_masked_sensitive_types: int + + :param total_masked_schemas: + The value to assign to the total_masked_schemas property of this MaskingReport. + :type total_masked_schemas: int + + :param total_masked_objects: + The value to assign to the total_masked_objects property of this MaskingReport. + :type total_masked_objects: int + + :param total_masked_columns: + The value to assign to the total_masked_columns property of this MaskingReport. + :type total_masked_columns: int + + :param total_masked_values: + The value to assign to the total_masked_values property of this MaskingReport. + :type total_masked_values: int + + :param time_masking_started: + The value to assign to the time_masking_started property of this MaskingReport. + :type time_masking_started: datetime + + :param time_masking_finished: + The value to assign to the time_masking_finished property of this MaskingReport. + :type time_masking_finished: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'masking_work_request_id': 'str', + 'masking_policy_id': 'str', + 'target_id': 'str', + 'total_masked_sensitive_types': 'int', + 'total_masked_schemas': 'int', + 'total_masked_objects': 'int', + 'total_masked_columns': 'int', + 'total_masked_values': 'int', + 'time_masking_started': 'datetime', + 'time_masking_finished': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'masking_work_request_id': 'maskingWorkRequestId', + 'masking_policy_id': 'maskingPolicyId', + 'target_id': 'targetId', + 'total_masked_sensitive_types': 'totalMaskedSensitiveTypes', + 'total_masked_schemas': 'totalMaskedSchemas', + 'total_masked_objects': 'totalMaskedObjects', + 'total_masked_columns': 'totalMaskedColumns', + 'total_masked_values': 'totalMaskedValues', + 'time_masking_started': 'timeMaskingStarted', + 'time_masking_finished': 'timeMaskingFinished' + } + + self._id = None + self._compartment_id = None + self._masking_work_request_id = None + self._masking_policy_id = None + self._target_id = None + self._total_masked_sensitive_types = None + self._total_masked_schemas = None + self._total_masked_objects = None + self._total_masked_columns = None + self._total_masked_values = None + self._time_masking_started = None + self._time_masking_finished = None + + @property + def id(self): + """ + **[Required]** Gets the id of this MaskingReport. + The OCID of the masking report. + + + :return: The id of this MaskingReport. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this MaskingReport. + The OCID of the masking report. + + + :param id: The id of this MaskingReport. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this MaskingReport. + The OCID of the compartment that contains the masking report. + + + :return: The compartment_id of this MaskingReport. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this MaskingReport. + The OCID of the compartment that contains the masking report. + + + :param compartment_id: The compartment_id of this MaskingReport. + :type: str + """ + self._compartment_id = compartment_id + + @property + def masking_work_request_id(self): + """ + **[Required]** Gets the masking_work_request_id of this MaskingReport. + The OCID of the masking work request that resulted in this masking report. + + + :return: The masking_work_request_id of this MaskingReport. + :rtype: str + """ + return self._masking_work_request_id + + @masking_work_request_id.setter + def masking_work_request_id(self, masking_work_request_id): + """ + Sets the masking_work_request_id of this MaskingReport. + The OCID of the masking work request that resulted in this masking report. + + + :param masking_work_request_id: The masking_work_request_id of this MaskingReport. + :type: str + """ + self._masking_work_request_id = masking_work_request_id + + @property + def masking_policy_id(self): + """ + **[Required]** Gets the masking_policy_id of this MaskingReport. + The OCID of the masking policy used. + + + :return: The masking_policy_id of this MaskingReport. + :rtype: str + """ + return self._masking_policy_id + + @masking_policy_id.setter + def masking_policy_id(self, masking_policy_id): + """ + Sets the masking_policy_id of this MaskingReport. + The OCID of the masking policy used. + + + :param masking_policy_id: The masking_policy_id of this MaskingReport. + :type: str + """ + self._masking_policy_id = masking_policy_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this MaskingReport. + The OCID of the target database masked. + + + :return: The target_id of this MaskingReport. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this MaskingReport. + The OCID of the target database masked. + + + :param target_id: The target_id of this MaskingReport. + :type: str + """ + self._target_id = target_id + + @property + def total_masked_sensitive_types(self): + """ + **[Required]** Gets the total_masked_sensitive_types of this MaskingReport. + The total number of unique sensitive types associated with the masked columns. + + + :return: The total_masked_sensitive_types of this MaskingReport. + :rtype: int + """ + return self._total_masked_sensitive_types + + @total_masked_sensitive_types.setter + def total_masked_sensitive_types(self, total_masked_sensitive_types): + """ + Sets the total_masked_sensitive_types of this MaskingReport. + The total number of unique sensitive types associated with the masked columns. + + + :param total_masked_sensitive_types: The total_masked_sensitive_types of this MaskingReport. + :type: int + """ + self._total_masked_sensitive_types = total_masked_sensitive_types + + @property + def total_masked_schemas(self): + """ + **[Required]** Gets the total_masked_schemas of this MaskingReport. + The total number of unique schemas that contain the masked columns. + + + :return: The total_masked_schemas of this MaskingReport. + :rtype: int + """ + return self._total_masked_schemas + + @total_masked_schemas.setter + def total_masked_schemas(self, total_masked_schemas): + """ + Sets the total_masked_schemas of this MaskingReport. + The total number of unique schemas that contain the masked columns. + + + :param total_masked_schemas: The total_masked_schemas of this MaskingReport. + :type: int + """ + self._total_masked_schemas = total_masked_schemas + + @property + def total_masked_objects(self): + """ + **[Required]** Gets the total_masked_objects of this MaskingReport. + The total number of unique objects (tables and editioning views) that contain the masked columns. + + + :return: The total_masked_objects of this MaskingReport. + :rtype: int + """ + return self._total_masked_objects + + @total_masked_objects.setter + def total_masked_objects(self, total_masked_objects): + """ + Sets the total_masked_objects of this MaskingReport. + The total number of unique objects (tables and editioning views) that contain the masked columns. + + + :param total_masked_objects: The total_masked_objects of this MaskingReport. + :type: int + """ + self._total_masked_objects = total_masked_objects + + @property + def total_masked_columns(self): + """ + **[Required]** Gets the total_masked_columns of this MaskingReport. + The total number of masked columns. + + + :return: The total_masked_columns of this MaskingReport. + :rtype: int + """ + return self._total_masked_columns + + @total_masked_columns.setter + def total_masked_columns(self, total_masked_columns): + """ + Sets the total_masked_columns of this MaskingReport. + The total number of masked columns. + + + :param total_masked_columns: The total_masked_columns of this MaskingReport. + :type: int + """ + self._total_masked_columns = total_masked_columns + + @property + def total_masked_values(self): + """ + **[Required]** Gets the total_masked_values of this MaskingReport. + The total number of masked values. + + + :return: The total_masked_values of this MaskingReport. + :rtype: int + """ + return self._total_masked_values + + @total_masked_values.setter + def total_masked_values(self, total_masked_values): + """ + Sets the total_masked_values of this MaskingReport. + The total number of masked values. + + + :param total_masked_values: The total_masked_values of this MaskingReport. + :type: int + """ + self._total_masked_values = total_masked_values + + @property + def time_masking_started(self): + """ + **[Required]** Gets the time_masking_started of this MaskingReport. + The date and time data masking started, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_masking_started of this MaskingReport. + :rtype: datetime + """ + return self._time_masking_started + + @time_masking_started.setter + def time_masking_started(self, time_masking_started): + """ + Sets the time_masking_started of this MaskingReport. + The date and time data masking started, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_masking_started: The time_masking_started of this MaskingReport. + :type: datetime + """ + self._time_masking_started = time_masking_started + + @property + def time_masking_finished(self): + """ + **[Required]** Gets the time_masking_finished of this MaskingReport. + The date and time data masking finished, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_masking_finished of this MaskingReport. + :rtype: datetime + """ + return self._time_masking_finished + + @time_masking_finished.setter + def time_masking_finished(self, time_masking_finished): + """ + Sets the time_masking_finished of this MaskingReport. + The date and time data masking finished, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_masking_finished: The time_masking_finished of this MaskingReport. + :type: datetime + """ + self._time_masking_finished = time_masking_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_report_collection.py b/src/oci/data_safe/models/masking_report_collection.py new file mode 100644 index 0000000000..11e9532fc0 --- /dev/null +++ b/src/oci/data_safe/models/masking_report_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingReportCollection(object): + """ + A collection of masking report summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingReportCollection 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 MaskingReportCollection. + :type items: list[oci.data_safe.models.MaskingReportSummary] + + """ + self.swagger_types = { + 'items': 'list[MaskingReportSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this MaskingReportCollection. + An array of masking report summary objects. + + + :return: The items of this MaskingReportCollection. + :rtype: list[oci.data_safe.models.MaskingReportSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this MaskingReportCollection. + An array of masking report summary objects. + + + :param items: The items of this MaskingReportCollection. + :type: list[oci.data_safe.models.MaskingReportSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/masking_report_summary.py b/src/oci/data_safe/models/masking_report_summary.py new file mode 100644 index 0000000000..174fb16865 --- /dev/null +++ b/src/oci/data_safe/models/masking_report_summary.py @@ -0,0 +1,419 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class MaskingReportSummary(object): + """ + Summary of a masking report. + """ + + def __init__(self, **kwargs): + """ + Initializes a new MaskingReportSummary 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 MaskingReportSummary. + :type id: str + + :param compartment_id: + The value to assign to the compartment_id property of this MaskingReportSummary. + :type compartment_id: str + + :param masking_work_request_id: + The value to assign to the masking_work_request_id property of this MaskingReportSummary. + :type masking_work_request_id: str + + :param masking_policy_id: + The value to assign to the masking_policy_id property of this MaskingReportSummary. + :type masking_policy_id: str + + :param target_id: + The value to assign to the target_id property of this MaskingReportSummary. + :type target_id: str + + :param total_masked_sensitive_types: + The value to assign to the total_masked_sensitive_types property of this MaskingReportSummary. + :type total_masked_sensitive_types: int + + :param total_masked_schemas: + The value to assign to the total_masked_schemas property of this MaskingReportSummary. + :type total_masked_schemas: int + + :param total_masked_objects: + The value to assign to the total_masked_objects property of this MaskingReportSummary. + :type total_masked_objects: int + + :param total_masked_columns: + The value to assign to the total_masked_columns property of this MaskingReportSummary. + :type total_masked_columns: int + + :param total_masked_values: + The value to assign to the total_masked_values property of this MaskingReportSummary. + :type total_masked_values: int + + :param time_masking_started: + The value to assign to the time_masking_started property of this MaskingReportSummary. + :type time_masking_started: datetime + + :param time_masking_finished: + The value to assign to the time_masking_finished property of this MaskingReportSummary. + :type time_masking_finished: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'compartment_id': 'str', + 'masking_work_request_id': 'str', + 'masking_policy_id': 'str', + 'target_id': 'str', + 'total_masked_sensitive_types': 'int', + 'total_masked_schemas': 'int', + 'total_masked_objects': 'int', + 'total_masked_columns': 'int', + 'total_masked_values': 'int', + 'time_masking_started': 'datetime', + 'time_masking_finished': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'compartment_id': 'compartmentId', + 'masking_work_request_id': 'maskingWorkRequestId', + 'masking_policy_id': 'maskingPolicyId', + 'target_id': 'targetId', + 'total_masked_sensitive_types': 'totalMaskedSensitiveTypes', + 'total_masked_schemas': 'totalMaskedSchemas', + 'total_masked_objects': 'totalMaskedObjects', + 'total_masked_columns': 'totalMaskedColumns', + 'total_masked_values': 'totalMaskedValues', + 'time_masking_started': 'timeMaskingStarted', + 'time_masking_finished': 'timeMaskingFinished' + } + + self._id = None + self._compartment_id = None + self._masking_work_request_id = None + self._masking_policy_id = None + self._target_id = None + self._total_masked_sensitive_types = None + self._total_masked_schemas = None + self._total_masked_objects = None + self._total_masked_columns = None + self._total_masked_values = None + self._time_masking_started = None + self._time_masking_finished = None + + @property + def id(self): + """ + **[Required]** Gets the id of this MaskingReportSummary. + The OCID of the masking report. + + + :return: The id of this MaskingReportSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this MaskingReportSummary. + The OCID of the masking report. + + + :param id: The id of this MaskingReportSummary. + :type: str + """ + self._id = id + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this MaskingReportSummary. + The OCID of the compartment that contains the masking report. + + + :return: The compartment_id of this MaskingReportSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this MaskingReportSummary. + The OCID of the compartment that contains the masking report. + + + :param compartment_id: The compartment_id of this MaskingReportSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def masking_work_request_id(self): + """ + **[Required]** Gets the masking_work_request_id of this MaskingReportSummary. + The OCID of the masking work request that resulted in this masking report. + + + :return: The masking_work_request_id of this MaskingReportSummary. + :rtype: str + """ + return self._masking_work_request_id + + @masking_work_request_id.setter + def masking_work_request_id(self, masking_work_request_id): + """ + Sets the masking_work_request_id of this MaskingReportSummary. + The OCID of the masking work request that resulted in this masking report. + + + :param masking_work_request_id: The masking_work_request_id of this MaskingReportSummary. + :type: str + """ + self._masking_work_request_id = masking_work_request_id + + @property + def masking_policy_id(self): + """ + **[Required]** Gets the masking_policy_id of this MaskingReportSummary. + The OCID of the masking policy used. + + + :return: The masking_policy_id of this MaskingReportSummary. + :rtype: str + """ + return self._masking_policy_id + + @masking_policy_id.setter + def masking_policy_id(self, masking_policy_id): + """ + Sets the masking_policy_id of this MaskingReportSummary. + The OCID of the masking policy used. + + + :param masking_policy_id: The masking_policy_id of this MaskingReportSummary. + :type: str + """ + self._masking_policy_id = masking_policy_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this MaskingReportSummary. + The OCID of the target database masked. + + + :return: The target_id of this MaskingReportSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this MaskingReportSummary. + The OCID of the target database masked. + + + :param target_id: The target_id of this MaskingReportSummary. + :type: str + """ + self._target_id = target_id + + @property + def total_masked_sensitive_types(self): + """ + **[Required]** Gets the total_masked_sensitive_types of this MaskingReportSummary. + The total number of unique sensitive types associated with the masked columns. + + + :return: The total_masked_sensitive_types of this MaskingReportSummary. + :rtype: int + """ + return self._total_masked_sensitive_types + + @total_masked_sensitive_types.setter + def total_masked_sensitive_types(self, total_masked_sensitive_types): + """ + Sets the total_masked_sensitive_types of this MaskingReportSummary. + The total number of unique sensitive types associated with the masked columns. + + + :param total_masked_sensitive_types: The total_masked_sensitive_types of this MaskingReportSummary. + :type: int + """ + self._total_masked_sensitive_types = total_masked_sensitive_types + + @property + def total_masked_schemas(self): + """ + **[Required]** Gets the total_masked_schemas of this MaskingReportSummary. + The total number of unique schemas that contain the masked columns. + + + :return: The total_masked_schemas of this MaskingReportSummary. + :rtype: int + """ + return self._total_masked_schemas + + @total_masked_schemas.setter + def total_masked_schemas(self, total_masked_schemas): + """ + Sets the total_masked_schemas of this MaskingReportSummary. + The total number of unique schemas that contain the masked columns. + + + :param total_masked_schemas: The total_masked_schemas of this MaskingReportSummary. + :type: int + """ + self._total_masked_schemas = total_masked_schemas + + @property + def total_masked_objects(self): + """ + **[Required]** Gets the total_masked_objects of this MaskingReportSummary. + The total number of unique objects (tables and editioning views) that contain the masked columns. + + + :return: The total_masked_objects of this MaskingReportSummary. + :rtype: int + """ + return self._total_masked_objects + + @total_masked_objects.setter + def total_masked_objects(self, total_masked_objects): + """ + Sets the total_masked_objects of this MaskingReportSummary. + The total number of unique objects (tables and editioning views) that contain the masked columns. + + + :param total_masked_objects: The total_masked_objects of this MaskingReportSummary. + :type: int + """ + self._total_masked_objects = total_masked_objects + + @property + def total_masked_columns(self): + """ + **[Required]** Gets the total_masked_columns of this MaskingReportSummary. + The total number of masked columns. + + + :return: The total_masked_columns of this MaskingReportSummary. + :rtype: int + """ + return self._total_masked_columns + + @total_masked_columns.setter + def total_masked_columns(self, total_masked_columns): + """ + Sets the total_masked_columns of this MaskingReportSummary. + The total number of masked columns. + + + :param total_masked_columns: The total_masked_columns of this MaskingReportSummary. + :type: int + """ + self._total_masked_columns = total_masked_columns + + @property + def total_masked_values(self): + """ + **[Required]** Gets the total_masked_values of this MaskingReportSummary. + The total number of masked values. + + + :return: The total_masked_values of this MaskingReportSummary. + :rtype: int + """ + return self._total_masked_values + + @total_masked_values.setter + def total_masked_values(self, total_masked_values): + """ + Sets the total_masked_values of this MaskingReportSummary. + The total number of masked values. + + + :param total_masked_values: The total_masked_values of this MaskingReportSummary. + :type: int + """ + self._total_masked_values = total_masked_values + + @property + def time_masking_started(self): + """ + **[Required]** Gets the time_masking_started of this MaskingReportSummary. + The date and time data masking started, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_masking_started of this MaskingReportSummary. + :rtype: datetime + """ + return self._time_masking_started + + @time_masking_started.setter + def time_masking_started(self, time_masking_started): + """ + Sets the time_masking_started of this MaskingReportSummary. + The date and time data masking started, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_masking_started: The time_masking_started of this MaskingReportSummary. + :type: datetime + """ + self._time_masking_started = time_masking_started + + @property + def time_masking_finished(self): + """ + **[Required]** Gets the time_masking_finished of this MaskingReportSummary. + The date and time data masking finished, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_masking_finished of this MaskingReportSummary. + :rtype: datetime + """ + return self._time_masking_finished + + @time_masking_finished.setter + def time_masking_finished(self, time_masking_finished): + """ + Sets the time_masking_finished of this MaskingReportSummary. + The date and time data masking finished, in the format defined by `RFC3339`__ + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_masking_finished: The time_masking_finished of this MaskingReportSummary. + :type: datetime + """ + self._time_masking_finished = time_masking_finished + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/modified_attributes.py b/src/oci/data_safe/models/modified_attributes.py new file mode 100644 index 0000000000..4d94f247d0 --- /dev/null +++ b/src/oci/data_safe/models/modified_attributes.py @@ -0,0 +1,102 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModifiedAttributes(object): + """ + The attributes of a sensitive column that have been modified in the target database. It's populated only in the case + of MODIFIED discovery results and shows the new values of the modified attributes. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModifiedAttributes object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param app_defined_child_column_keys: + The value to assign to the app_defined_child_column_keys property of this ModifiedAttributes. + :type app_defined_child_column_keys: list[str] + + :param db_defined_child_column_keys: + The value to assign to the db_defined_child_column_keys property of this ModifiedAttributes. + :type db_defined_child_column_keys: list[str] + + """ + self.swagger_types = { + 'app_defined_child_column_keys': 'list[str]', + 'db_defined_child_column_keys': 'list[str]' + } + + self.attribute_map = { + 'app_defined_child_column_keys': 'appDefinedChildColumnKeys', + 'db_defined_child_column_keys': 'dbDefinedChildColumnKeys' + } + + self._app_defined_child_column_keys = None + self._db_defined_child_column_keys = None + + @property + def app_defined_child_column_keys(self): + """ + Gets the app_defined_child_column_keys of this ModifiedAttributes. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + + + :return: The app_defined_child_column_keys of this ModifiedAttributes. + :rtype: list[str] + """ + return self._app_defined_child_column_keys + + @app_defined_child_column_keys.setter + def app_defined_child_column_keys(self, app_defined_child_column_keys): + """ + Sets the app_defined_child_column_keys of this ModifiedAttributes. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + + + :param app_defined_child_column_keys: The app_defined_child_column_keys of this ModifiedAttributes. + :type: list[str] + """ + self._app_defined_child_column_keys = app_defined_child_column_keys + + @property + def db_defined_child_column_keys(self): + """ + Gets the db_defined_child_column_keys of this ModifiedAttributes. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + + + :return: The db_defined_child_column_keys of this ModifiedAttributes. + :rtype: list[str] + """ + return self._db_defined_child_column_keys + + @db_defined_child_column_keys.setter + def db_defined_child_column_keys(self, db_defined_child_column_keys): + """ + Sets the db_defined_child_column_keys of this ModifiedAttributes. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + + + :param db_defined_child_column_keys: The db_defined_child_column_keys of this ModifiedAttributes. + :type: list[str] + """ + self._db_defined_child_column_keys = db_defined_child_column_keys + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/modify_global_settings_details.py b/src/oci/data_safe/models/modify_global_settings_details.py new file mode 100644 index 0000000000..7af8ff8b9d --- /dev/null +++ b/src/oci/data_safe/models/modify_global_settings_details.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ModifyGlobalSettingsDetails(object): + """ + The details required to modify the global settings in Data Safe. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ModifyGlobalSettingsDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_paid_usage: + The value to assign to the is_paid_usage property of this ModifyGlobalSettingsDetails. + :type is_paid_usage: bool + + :param online_retention_period: + The value to assign to the online_retention_period property of this ModifyGlobalSettingsDetails. + :type online_retention_period: int + + :param offline_retention_period: + The value to assign to the offline_retention_period property of this ModifyGlobalSettingsDetails. + :type offline_retention_period: int + + """ + self.swagger_types = { + 'is_paid_usage': 'bool', + 'online_retention_period': 'int', + 'offline_retention_period': 'int' + } + + self.attribute_map = { + 'is_paid_usage': 'isPaidUsage', + 'online_retention_period': 'onlineRetentionPeriod', + 'offline_retention_period': 'offlineRetentionPeriod' + } + + self._is_paid_usage = None + self._online_retention_period = None + self._offline_retention_period = None + + @property + def is_paid_usage(self): + """ + Gets the is_paid_usage of this ModifyGlobalSettingsDetails. + The paid usage option chosen by the customer admin. + + + :return: The is_paid_usage of this ModifyGlobalSettingsDetails. + :rtype: bool + """ + return self._is_paid_usage + + @is_paid_usage.setter + def is_paid_usage(self, is_paid_usage): + """ + Sets the is_paid_usage of this ModifyGlobalSettingsDetails. + The paid usage option chosen by the customer admin. + + + :param is_paid_usage: The is_paid_usage of this ModifyGlobalSettingsDetails. + :type: bool + """ + self._is_paid_usage = is_paid_usage + + @property + def online_retention_period(self): + """ + Gets the online_retention_period of this ModifyGlobalSettingsDetails. + The online retention period in months. + + + :return: The online_retention_period of this ModifyGlobalSettingsDetails. + :rtype: int + """ + return self._online_retention_period + + @online_retention_period.setter + def online_retention_period(self, online_retention_period): + """ + Sets the online_retention_period of this ModifyGlobalSettingsDetails. + The online retention period in months. + + + :param online_retention_period: The online_retention_period of this ModifyGlobalSettingsDetails. + :type: int + """ + self._online_retention_period = online_retention_period + + @property + def offline_retention_period(self): + """ + Gets the offline_retention_period of this ModifyGlobalSettingsDetails. + The offline retention period in months. + + + :return: The offline_retention_period of this ModifyGlobalSettingsDetails. + :rtype: int + """ + return self._offline_retention_period + + @offline_retention_period.setter + def offline_retention_period(self, offline_retention_period): + """ + Sets the offline_retention_period of this ModifyGlobalSettingsDetails. + The offline retention period in months. + + + :param offline_retention_period: The offline_retention_period of this ModifyGlobalSettingsDetails. + :type: int + """ + self._offline_retention_period = offline_retention_period + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/null_value_format_entry.py b/src/oci/data_safe/models/null_value_format_entry.py new file mode 100644 index 0000000000..f2953965ff --- /dev/null +++ b/src/oci/data_safe/models/null_value_format_entry.py @@ -0,0 +1,58 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class NullValueFormatEntry(FormatEntry): + """ + The Null Value masking format replaces column data with NULL. The column + being masked must be allowed to contain null values. To learn more, + check Null Value in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new NullValueFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.NullValueFormatEntry.type` attribute + of this class is ``NULL_VALUE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this NullValueFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this NullValueFormatEntry. + :type description: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description' + } + + self._type = None + self._description = None + self._type = 'NULL_VALUE' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_alert_policy_rule_details.py b/src/oci/data_safe/models/patch_alert_policy_rule_details.py new file mode 100644 index 0000000000..3848df3e29 --- /dev/null +++ b/src/oci/data_safe/models/patch_alert_policy_rule_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchAlertPolicyRuleDetails(object): + """ + Details for how to patch a alert policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchAlertPolicyRuleDetails 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 PatchAlertPolicyRuleDetails. + :type items: list[oci.data_safe.models.PatchInstruction] + + """ + self.swagger_types = { + 'items': 'list[PatchInstruction]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + Gets the items of this PatchAlertPolicyRuleDetails. + Array of patch instructions. + + + :return: The items of this PatchAlertPolicyRuleDetails. + :rtype: list[oci.data_safe.models.PatchInstruction] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PatchAlertPolicyRuleDetails. + Array of patch instructions. + + + :param items: The items of this PatchAlertPolicyRuleDetails. + :type: list[oci.data_safe.models.PatchInstruction] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_alerts_details.py b/src/oci/data_safe/models/patch_alerts_details.py new file mode 100644 index 0000000000..dec80b2d8c --- /dev/null +++ b/src/oci/data_safe/models/patch_alerts_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchAlertsDetails(object): + """ + Details for how to patch alerts. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchAlertsDetails 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 PatchAlertsDetails. + :type items: list[oci.data_safe.models.PatchInstruction] + + """ + self.swagger_types = { + 'items': 'list[PatchInstruction]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + Gets the items of this PatchAlertsDetails. + Array of patch instructions. + + + :return: The items of this PatchAlertsDetails. + :rtype: list[oci.data_safe.models.PatchInstruction] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PatchAlertsDetails. + Array of patch instructions. + + + :param items: The items of this PatchAlertsDetails. + :type: list[oci.data_safe.models.PatchInstruction] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_discovery_job_result_details.py b/src/oci/data_safe/models/patch_discovery_job_result_details.py new file mode 100644 index 0000000000..6f43511d2d --- /dev/null +++ b/src/oci/data_safe/models/patch_discovery_job_result_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchDiscoveryJobResultDetails(object): + """ + Details to patch discovery results. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchDiscoveryJobResultDetails 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 PatchDiscoveryJobResultDetails. + :type items: list[oci.data_safe.models.PatchInstruction] + + """ + self.swagger_types = { + 'items': 'list[PatchInstruction]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + Gets the items of this PatchDiscoveryJobResultDetails. + An array of patch instructions. + + + :return: The items of this PatchDiscoveryJobResultDetails. + :rtype: list[oci.data_safe.models.PatchInstruction] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PatchDiscoveryJobResultDetails. + An array of patch instructions. + + + :param items: The items of this PatchDiscoveryJobResultDetails. + :type: list[oci.data_safe.models.PatchInstruction] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_insert_instruction.py b/src/oci/data_safe/models/patch_insert_instruction.py new file mode 100644 index 0000000000..3c39e083ab --- /dev/null +++ b/src/oci/data_safe/models/patch_insert_instruction.py @@ -0,0 +1,87 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .patch_instruction import PatchInstruction +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchInsertInstruction(PatchInstruction): + """ + An operation that inserts a value into an array, shifting array items as necessary and handling NOT_FOUND exceptions by creating the implied containing structure. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchInsertInstruction object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.PatchInsertInstruction.operation` attribute + of this class is ``INSERT`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchInsertInstruction. + Allowed values for this property are: "INSERT", "REMOVE", "MERGE" + :type operation: str + + :param selection: + The value to assign to the selection property of this PatchInsertInstruction. + :type selection: str + + :param value: + The value to assign to the value property of this PatchInsertInstruction. + :type value: object + + """ + self.swagger_types = { + 'operation': 'str', + 'selection': 'str', + 'value': 'object' + } + + self.attribute_map = { + 'operation': 'operation', + 'selection': 'selection', + 'value': 'value' + } + + self._operation = None + self._selection = None + self._value = None + self._operation = 'INSERT' + + @property + def value(self): + """ + **[Required]** Gets the value of this PatchInsertInstruction. + A value to be inserted into the target. + + + :return: The value of this PatchInsertInstruction. + :rtype: object + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this PatchInsertInstruction. + A value to be inserted into the target. + + + :param value: The value of this PatchInsertInstruction. + :type: object + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_instruction.py b/src/oci/data_safe/models/patch_instruction.py new file mode 100644 index 0000000000..fe21e3d1fd --- /dev/null +++ b/src/oci/data_safe/models/patch_instruction.py @@ -0,0 +1,151 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchInstruction(object): + """ + A single instruction to be included as part of Patch request content. + """ + + #: A constant which can be used with the operation property of a PatchInstruction. + #: This constant has a value of "INSERT" + OPERATION_INSERT = "INSERT" + + #: A constant which can be used with the operation property of a PatchInstruction. + #: This constant has a value of "REMOVE" + OPERATION_REMOVE = "REMOVE" + + #: A constant which can be used with the operation property of a PatchInstruction. + #: This constant has a value of "MERGE" + OPERATION_MERGE = "MERGE" + + def __init__(self, **kwargs): + """ + Initializes a new PatchInstruction object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.PatchRemoveInstruction` + * :class:`~oci.data_safe.models.PatchInsertInstruction` + * :class:`~oci.data_safe.models.PatchMergeInstruction` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchInstruction. + Allowed values for this property are: "INSERT", "REMOVE", "MERGE" + :type operation: str + + :param selection: + The value to assign to the selection property of this PatchInstruction. + :type selection: str + + """ + self.swagger_types = { + 'operation': 'str', + 'selection': 'str' + } + + self.attribute_map = { + 'operation': 'operation', + 'selection': 'selection' + } + + self._operation = None + self._selection = 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['operation'] + + if type == 'REMOVE': + return 'PatchRemoveInstruction' + + if type == 'INSERT': + return 'PatchInsertInstruction' + + if type == 'MERGE': + return 'PatchMergeInstruction' + else: + return 'PatchInstruction' + + @property + def operation(self): + """ + **[Required]** Gets the operation of this PatchInstruction. + The patch operation. + + Allowed values for this property are: "INSERT", "REMOVE", "MERGE" + + + :return: The operation of this PatchInstruction. + :rtype: str + """ + return self._operation + + @operation.setter + def operation(self, operation): + """ + Sets the operation of this PatchInstruction. + The patch operation. + + + :param operation: The operation of this PatchInstruction. + :type: str + """ + allowed_values = ["INSERT", "REMOVE", "MERGE"] + if not value_allowed_none_or_none_sentinel(operation, allowed_values): + raise ValueError( + "Invalid value for `operation`, must be None or one of {0}" + .format(allowed_values) + ) + self._operation = operation + + @property + def selection(self): + """ + **[Required]** Gets the selection of this PatchInstruction. + The set of values to which the operation applies as a `JMESPath expression`__ for evaluation against the context resource. An operation fails if the selection yields an exception, except as otherwise specified. Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + + __ https://jmespath.org/specification.html + + + :return: The selection of this PatchInstruction. + :rtype: str + """ + return self._selection + + @selection.setter + def selection(self, selection): + """ + Sets the selection of this PatchInstruction. + The set of values to which the operation applies as a `JMESPath expression`__ for evaluation against the context resource. An operation fails if the selection yields an exception, except as otherwise specified. Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false. + + __ https://jmespath.org/specification.html + + + :param selection: The selection of this PatchInstruction. + :type: str + """ + self._selection = selection + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_masking_columns_details.py b/src/oci/data_safe/models/patch_masking_columns_details.py new file mode 100644 index 0000000000..dc2d3c0e33 --- /dev/null +++ b/src/oci/data_safe/models/patch_masking_columns_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchMaskingColumnsDetails(object): + """ + Details to patch columns in a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchMaskingColumnsDetails 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 PatchMaskingColumnsDetails. + :type items: list[oci.data_safe.models.PatchInstruction] + + """ + self.swagger_types = { + 'items': 'list[PatchInstruction]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + Gets the items of this PatchMaskingColumnsDetails. + An array of patch instructions. + + + :return: The items of this PatchMaskingColumnsDetails. + :rtype: list[oci.data_safe.models.PatchInstruction] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PatchMaskingColumnsDetails. + An array of patch instructions. + + + :param items: The items of this PatchMaskingColumnsDetails. + :type: list[oci.data_safe.models.PatchInstruction] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_merge_instruction.py b/src/oci/data_safe/models/patch_merge_instruction.py new file mode 100644 index 0000000000..3ea6ac5c00 --- /dev/null +++ b/src/oci/data_safe/models/patch_merge_instruction.py @@ -0,0 +1,89 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .patch_instruction import PatchInstruction +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchMergeInstruction(PatchInstruction): + """ + An operation that recursively updates items of the selection, or adding the value if the selection is empty. If the value is not an object, it is used directly, otherwise each key-value member is used to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value (similar to `RFC 7396`__ JSON Merge Patch, except that null values are copied rather than transformed into deletions). NOT_FOUND exceptions are handled by creating the implied containing structure. To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + + __ https://tools.ietf.org/html/rfc7396#section-2 + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchMergeInstruction object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.PatchMergeInstruction.operation` attribute + of this class is ``MERGE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchMergeInstruction. + Allowed values for this property are: "INSERT", "REMOVE", "MERGE" + :type operation: str + + :param selection: + The value to assign to the selection property of this PatchMergeInstruction. + :type selection: str + + :param value: + The value to assign to the value property of this PatchMergeInstruction. + :type value: object + + """ + self.swagger_types = { + 'operation': 'str', + 'selection': 'str', + 'value': 'object' + } + + self.attribute_map = { + 'operation': 'operation', + 'selection': 'selection', + 'value': 'value' + } + + self._operation = None + self._selection = None + self._value = None + self._operation = 'MERGE' + + @property + def value(self): + """ + Gets the value of this PatchMergeInstruction. + A value to be merged into the target. + + + :return: The value of this PatchMergeInstruction. + :rtype: object + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this PatchMergeInstruction. + A value to be merged into the target. + + + :param value: The value of this PatchMergeInstruction. + :type: object + """ + self._value = value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_remove_instruction.py b/src/oci/data_safe/models/patch_remove_instruction.py new file mode 100644 index 0000000000..42d7065a28 --- /dev/null +++ b/src/oci/data_safe/models/patch_remove_instruction.py @@ -0,0 +1,56 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .patch_instruction import PatchInstruction +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchRemoveInstruction(PatchInstruction): + """ + An operation that deletes items, ignoring NOT_FOUND exceptions. To avoid referential errors if an item's descendant is also in the selection, items of the selection are processed in order of decreasing depth. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchRemoveInstruction object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.PatchRemoveInstruction.operation` attribute + of this class is ``REMOVE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param operation: + The value to assign to the operation property of this PatchRemoveInstruction. + Allowed values for this property are: "INSERT", "REMOVE", "MERGE" + :type operation: str + + :param selection: + The value to assign to the selection property of this PatchRemoveInstruction. + :type selection: str + + """ + self.swagger_types = { + 'operation': 'str', + 'selection': 'str' + } + + self.attribute_map = { + 'operation': 'operation', + 'selection': 'selection' + } + + self._operation = None + self._selection = None + self._operation = 'REMOVE' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/patch_sensitive_column_details.py b/src/oci/data_safe/models/patch_sensitive_column_details.py new file mode 100644 index 0000000000..50e5afe9fb --- /dev/null +++ b/src/oci/data_safe/models/patch_sensitive_column_details.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PatchSensitiveColumnDetails(object): + """ + Details to patch columns in a sensitive data model. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PatchSensitiveColumnDetails 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 PatchSensitiveColumnDetails. + :type items: list[oci.data_safe.models.PatchInstruction] + + """ + self.swagger_types = { + 'items': 'list[PatchInstruction]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + Gets the items of this PatchSensitiveColumnDetails. + An array of patch instructions. + + + :return: The items of this PatchSensitiveColumnDetails. + :rtype: list[oci.data_safe.models.PatchInstruction] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this PatchSensitiveColumnDetails. + An array of patch instructions. + + + :param items: The items of this PatchSensitiveColumnDetails. + :type: list[oci.data_safe.models.PatchInstruction] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/ppf_format_entry.py b/src/oci/data_safe/models/ppf_format_entry.py new file mode 100644 index 0000000000..3739464a60 --- /dev/null +++ b/src/oci/data_safe/models/ppf_format_entry.py @@ -0,0 +1,100 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PPFFormatEntry(FormatEntry): + """ + The Post Processing Function masking format is a special masking option that + enables you to use a custom function to further transform column values after + they have been masked using some other masking formats. It takes the intermediate + masked values as input and returns the final masked values. For example, you can + use it for adding checksums or special encodings to the masked values. + + A post-processing function has the same signature as a user-defined function, + but it passes in the masked values the masking engine generates, and returns + the final masked values that should be used for masking. To learn more, check + Post Processing Function in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PPFFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.PPFFormatEntry.type` attribute + of this class is ``POST_PROCESSING_FUNCTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this PPFFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this PPFFormatEntry. + :type description: str + + :param post_processing_function: + The value to assign to the post_processing_function property of this PPFFormatEntry. + :type post_processing_function: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'post_processing_function': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'post_processing_function': 'postProcessingFunction' + } + + self._type = None + self._description = None + self._post_processing_function = None + self._type = 'POST_PROCESSING_FUNCTION' + + @property + def post_processing_function(self): + """ + **[Required]** Gets the post_processing_function of this PPFFormatEntry. + The post processing function in SCHEMA_NAME.PACKAGE_NAME.FUNCTION_NAME + format. It can be a standalone or packaged function, so PACKAGE_NAME + is optional. + + + :return: The post_processing_function of this PPFFormatEntry. + :rtype: str + """ + return self._post_processing_function + + @post_processing_function.setter + def post_processing_function(self, post_processing_function): + """ + Sets the post_processing_function of this PPFFormatEntry. + The post processing function in SCHEMA_NAME.PACKAGE_NAME.FUNCTION_NAME + format. It can be a standalone or packaged function, so PACKAGE_NAME + is optional. + + + :param post_processing_function: The post_processing_function of this PPFFormatEntry. + :type: str + """ + self._post_processing_function = post_processing_function + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/preserve_original_data_format_entry.py b/src/oci/data_safe/models/preserve_original_data_format_entry.py new file mode 100644 index 0000000000..6975d7be3e --- /dev/null +++ b/src/oci/data_safe/models/preserve_original_data_format_entry.py @@ -0,0 +1,59 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class PreserveOriginalDataFormatEntry(FormatEntry): + """ + The Preserve Original Data masking format retains the original values in a column. + It is useful in conditional masking when you want to preserve a subset of values + in a column and mask the remaining values using some other masking formats. To + learn more, check Preserve Original Data in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new PreserveOriginalDataFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.PreserveOriginalDataFormatEntry.type` attribute + of this class is ``PRESERVE_ORIGINAL_DATA`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this PreserveOriginalDataFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this PreserveOriginalDataFormatEntry. + :type description: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description' + } + + self._type = None + self._description = None + self._type = 'PRESERVE_ORIGINAL_DATA' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/provision_audit_conditions.py b/src/oci/data_safe/models/provision_audit_conditions.py new file mode 100644 index 0000000000..fbecd675aa --- /dev/null +++ b/src/oci/data_safe/models/provision_audit_conditions.py @@ -0,0 +1,167 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ProvisionAuditConditions(object): + """ + Represents audit policies with corresponding audit provisioning conditions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProvisionAuditConditions object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_policy_name: + The value to assign to the audit_policy_name property of this ProvisionAuditConditions. + :type audit_policy_name: str + + :param is_priv_users_managed_by_data_safe: + The value to assign to the is_priv_users_managed_by_data_safe property of this ProvisionAuditConditions. + :type is_priv_users_managed_by_data_safe: bool + + :param is_enabled: + The value to assign to the is_enabled property of this ProvisionAuditConditions. + :type is_enabled: bool + + :param enable_conditions: + The value to assign to the enable_conditions property of this ProvisionAuditConditions. + :type enable_conditions: list[oci.data_safe.models.EnableConditions] + + """ + self.swagger_types = { + 'audit_policy_name': 'str', + 'is_priv_users_managed_by_data_safe': 'bool', + 'is_enabled': 'bool', + 'enable_conditions': 'list[EnableConditions]' + } + + self.attribute_map = { + 'audit_policy_name': 'auditPolicyName', + 'is_priv_users_managed_by_data_safe': 'isPrivUsersManagedByDataSafe', + 'is_enabled': 'isEnabled', + 'enable_conditions': 'enableConditions' + } + + self._audit_policy_name = None + self._is_priv_users_managed_by_data_safe = None + self._is_enabled = None + self._enable_conditions = None + + @property + def audit_policy_name(self): + """ + **[Required]** Gets the audit_policy_name of this ProvisionAuditConditions. + Indicates the audit policy name available for provisioning from Data Safe. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :return: The audit_policy_name of this ProvisionAuditConditions. + :rtype: str + """ + return self._audit_policy_name + + @audit_policy_name.setter + def audit_policy_name(self, audit_policy_name): + """ + Sets the audit_policy_name of this ProvisionAuditConditions. + Indicates the audit policy name available for provisioning from Data Safe. Refer to the `documentation`__ for seeded audit policy names. For custom policies, refer to the user-defined policy name created in the target database. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/audit-policies.html#GUID-361A9A9A-7C21-4F5A-8945-9B3A0C472827 + + + :param audit_policy_name: The audit_policy_name of this ProvisionAuditConditions. + :type: str + """ + self._audit_policy_name = audit_policy_name + + @property + def is_priv_users_managed_by_data_safe(self): + """ + **[Required]** Gets the is_priv_users_managed_by_data_safe of this ProvisionAuditConditions. + Indicates whether the privileged user list is managed by Data Safe. + + + :return: The is_priv_users_managed_by_data_safe of this ProvisionAuditConditions. + :rtype: bool + """ + return self._is_priv_users_managed_by_data_safe + + @is_priv_users_managed_by_data_safe.setter + def is_priv_users_managed_by_data_safe(self, is_priv_users_managed_by_data_safe): + """ + Sets the is_priv_users_managed_by_data_safe of this ProvisionAuditConditions. + Indicates whether the privileged user list is managed by Data Safe. + + + :param is_priv_users_managed_by_data_safe: The is_priv_users_managed_by_data_safe of this ProvisionAuditConditions. + :type: bool + """ + self._is_priv_users_managed_by_data_safe = is_priv_users_managed_by_data_safe + + @property + def is_enabled(self): + """ + **[Required]** Gets the is_enabled of this ProvisionAuditConditions. + Indicates whether the policy has to be enabled or disabled in the target database. Set this to true if you want the audit policy to be enabled in the target database. If the seeded audit policy is not already created in the database, the provisioning creates and enables them. If this is set to false, the policy will be disabled in the target database. + + + :return: The is_enabled of this ProvisionAuditConditions. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this ProvisionAuditConditions. + Indicates whether the policy has to be enabled or disabled in the target database. Set this to true if you want the audit policy to be enabled in the target database. If the seeded audit policy is not already created in the database, the provisioning creates and enables them. If this is set to false, the policy will be disabled in the target database. + + + :param is_enabled: The is_enabled of this ProvisionAuditConditions. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def enable_conditions(self): + """ + Gets the enable_conditions of this ProvisionAuditConditions. + Indicates the users/roles in the target database for which the audit policy will be enforced, and the success/failure event condition to generate the audit event. + + + :return: The enable_conditions of this ProvisionAuditConditions. + :rtype: list[oci.data_safe.models.EnableConditions] + """ + return self._enable_conditions + + @enable_conditions.setter + def enable_conditions(self, enable_conditions): + """ + Sets the enable_conditions of this ProvisionAuditConditions. + Indicates the users/roles in the target database for which the audit policy will be enforced, and the success/failure event condition to generate the audit event. + + + :param enable_conditions: The enable_conditions of this ProvisionAuditConditions. + :type: list[oci.data_safe.models.EnableConditions] + """ + self._enable_conditions = enable_conditions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/provision_audit_policy_details.py b/src/oci/data_safe/models/provision_audit_policy_details.py new file mode 100644 index 0000000000..6007d2be88 --- /dev/null +++ b/src/oci/data_safe/models/provision_audit_policy_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ProvisionAuditPolicyDetails(object): + """ + Details for audit policy provisioning. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ProvisionAuditPolicyDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_data_safe_service_account_excluded: + The value to assign to the is_data_safe_service_account_excluded property of this ProvisionAuditPolicyDetails. + :type is_data_safe_service_account_excluded: bool + + :param provision_audit_conditions: + The value to assign to the provision_audit_conditions property of this ProvisionAuditPolicyDetails. + :type provision_audit_conditions: list[oci.data_safe.models.ProvisionAuditConditions] + + """ + self.swagger_types = { + 'is_data_safe_service_account_excluded': 'bool', + 'provision_audit_conditions': 'list[ProvisionAuditConditions]' + } + + self.attribute_map = { + 'is_data_safe_service_account_excluded': 'isDataSafeServiceAccountExcluded', + 'provision_audit_conditions': 'provisionAuditConditions' + } + + self._is_data_safe_service_account_excluded = None + self._provision_audit_conditions = None + + @property + def is_data_safe_service_account_excluded(self): + """ + Gets the is_data_safe_service_account_excluded of this ProvisionAuditPolicyDetails. + Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies. + + + :return: The is_data_safe_service_account_excluded of this ProvisionAuditPolicyDetails. + :rtype: bool + """ + return self._is_data_safe_service_account_excluded + + @is_data_safe_service_account_excluded.setter + def is_data_safe_service_account_excluded(self, is_data_safe_service_account_excluded): + """ + Sets the is_data_safe_service_account_excluded of this ProvisionAuditPolicyDetails. + Option provided to users at the target to indicate whether the Data Safe service account has to be excluded while provisioning the audit policies. + + + :param is_data_safe_service_account_excluded: The is_data_safe_service_account_excluded of this ProvisionAuditPolicyDetails. + :type: bool + """ + self._is_data_safe_service_account_excluded = is_data_safe_service_account_excluded + + @property + def provision_audit_conditions(self): + """ + **[Required]** Gets the provision_audit_conditions of this ProvisionAuditPolicyDetails. + The audit policy details for provisioning. + + + :return: The provision_audit_conditions of this ProvisionAuditPolicyDetails. + :rtype: list[oci.data_safe.models.ProvisionAuditConditions] + """ + return self._provision_audit_conditions + + @provision_audit_conditions.setter + def provision_audit_conditions(self, provision_audit_conditions): + """ + Sets the provision_audit_conditions of this ProvisionAuditPolicyDetails. + The audit policy details for provisioning. + + + :param provision_audit_conditions: The provision_audit_conditions of this ProvisionAuditPolicyDetails. + :type: list[oci.data_safe.models.ProvisionAuditConditions] + """ + self._provision_audit_conditions = provision_audit_conditions + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_date_format_entry.py b/src/oci/data_safe/models/random_date_format_entry.py new file mode 100644 index 0000000000..8b0c90fdd6 --- /dev/null +++ b/src/oci/data_safe/models/random_date_format_entry.py @@ -0,0 +1,126 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomDateFormatEntry(FormatEntry): + """ + The Random Date masking format generates random and unique dates within a range. + The date range is defined by the startDate and endDate attributes. The start date + must be less than or equal to the end date. When masking columns with uniqueness + constraint, ensure that the date range is sufficient enough to generate unique + values. To learn more, check Random Date in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomDateFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomDateFormatEntry.type` attribute + of this class is ``RANDOM_DATE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomDateFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomDateFormatEntry. + :type description: str + + :param start_date: + The value to assign to the start_date property of this RandomDateFormatEntry. + :type start_date: datetime + + :param end_date: + The value to assign to the end_date property of this RandomDateFormatEntry. + :type end_date: datetime + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_date': 'datetime', + 'end_date': 'datetime' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_date': 'startDate', + 'end_date': 'endDate' + } + + self._type = None + self._description = None + self._start_date = None + self._end_date = None + self._type = 'RANDOM_DATE' + + @property + def start_date(self): + """ + **[Required]** Gets the start_date of this RandomDateFormatEntry. + The lower bound of the range within which random dates should be generated. + The start date must be less than or equal to the end date. + + + :return: The start_date of this RandomDateFormatEntry. + :rtype: datetime + """ + return self._start_date + + @start_date.setter + def start_date(self, start_date): + """ + Sets the start_date of this RandomDateFormatEntry. + The lower bound of the range within which random dates should be generated. + The start date must be less than or equal to the end date. + + + :param start_date: The start_date of this RandomDateFormatEntry. + :type: datetime + """ + self._start_date = start_date + + @property + def end_date(self): + """ + **[Required]** Gets the end_date of this RandomDateFormatEntry. + The upper bound of the range within which random dates should be generated. + The end date must be greater than or equal to the start date. + + + :return: The end_date of this RandomDateFormatEntry. + :rtype: datetime + """ + return self._end_date + + @end_date.setter + def end_date(self, end_date): + """ + Sets the end_date of this RandomDateFormatEntry. + The upper bound of the range within which random dates should be generated. + The end date must be greater than or equal to the start date. + + + :param end_date: The end_date of this RandomDateFormatEntry. + :type: datetime + """ + self._end_date = end_date + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_decimal_number_format_entry.py b/src/oci/data_safe/models/random_decimal_number_format_entry.py new file mode 100644 index 0000000000..3a81fd5e2e --- /dev/null +++ b/src/oci/data_safe/models/random_decimal_number_format_entry.py @@ -0,0 +1,129 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomDecimalNumberFormatEntry(FormatEntry): + """ + The Random Decimal Number masking format generates random and unique decimal + numbers within a range. The range is defined by the startValue and endValue + attributes. The start value must be less than or equal to the end value. To + learn more, check Random Decimal Number in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomDecimalNumberFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomDecimalNumberFormatEntry.type` attribute + of this class is ``RANDOM_DECIMAL_NUMBER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomDecimalNumberFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomDecimalNumberFormatEntry. + :type description: str + + :param start_value: + The value to assign to the start_value property of this RandomDecimalNumberFormatEntry. + :type start_value: float + + :param end_value: + The value to assign to the end_value property of this RandomDecimalNumberFormatEntry. + :type end_value: float + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_value': 'float', + 'end_value': 'float' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_value': 'startValue', + 'end_value': 'endValue' + } + + self._type = None + self._description = None + self._start_value = None + self._end_value = None + self._type = 'RANDOM_DECIMAL_NUMBER' + + @property + def start_value(self): + """ + **[Required]** Gets the start_value of this RandomDecimalNumberFormatEntry. + The lower bound of the range within which random decimal numbers should + be generated. It must be less than or equal to the end value. It supports + input of double type. + + + :return: The start_value of this RandomDecimalNumberFormatEntry. + :rtype: float + """ + return self._start_value + + @start_value.setter + def start_value(self, start_value): + """ + Sets the start_value of this RandomDecimalNumberFormatEntry. + The lower bound of the range within which random decimal numbers should + be generated. It must be less than or equal to the end value. It supports + input of double type. + + + :param start_value: The start_value of this RandomDecimalNumberFormatEntry. + :type: float + """ + self._start_value = start_value + + @property + def end_value(self): + """ + **[Required]** Gets the end_value of this RandomDecimalNumberFormatEntry. + The upper bound of the range within which random decimal numbers should be + generated. It must be greater than or equal to the start value. It supports + input of double type. + + + :return: The end_value of this RandomDecimalNumberFormatEntry. + :rtype: float + """ + return self._end_value + + @end_value.setter + def end_value(self, end_value): + """ + Sets the end_value of this RandomDecimalNumberFormatEntry. + The upper bound of the range within which random decimal numbers should be + generated. It must be greater than or equal to the start value. It supports + input of double type. + + + :param end_value: The end_value of this RandomDecimalNumberFormatEntry. + :type: float + """ + self._end_value = end_value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_digits_format_entry.py b/src/oci/data_safe/models/random_digits_format_entry.py new file mode 100644 index 0000000000..cc07f893fa --- /dev/null +++ b/src/oci/data_safe/models/random_digits_format_entry.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomDigitsFormatEntry(FormatEntry): + """ + The Random Digits masking format generates random digits of length within a range. + The length range is defined by the startLength and endLength attributes. The start + length must be less than or equal to the end length. When masking columns with + uniqueness constraint, ensure that the length range is sufficient enough to generate + unique values. This masking format pads to the appropriate length in a string, but + does not pad when used for a number column. It's a complementary type of Random Number, + which is not padded. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomDigitsFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomDigitsFormatEntry.type` attribute + of this class is ``RANDOM_DIGITS`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomDigitsFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomDigitsFormatEntry. + :type description: str + + :param start_length: + The value to assign to the start_length property of this RandomDigitsFormatEntry. + :type start_length: int + + :param end_length: + The value to assign to the end_length property of this RandomDigitsFormatEntry. + :type end_length: int + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_length': 'int', + 'end_length': 'int' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_length': 'startLength', + 'end_length': 'endLength' + } + + self._type = None + self._description = None + self._start_length = None + self._end_length = None + self._type = 'RANDOM_DIGITS' + + @property + def start_length(self): + """ + **[Required]** Gets the start_length of this RandomDigitsFormatEntry. + The minimum number of digits the generated values should have. It can be + any integer greater than zero, but it must be less than or equal to the + end length. + + + :return: The start_length of this RandomDigitsFormatEntry. + :rtype: int + """ + return self._start_length + + @start_length.setter + def start_length(self, start_length): + """ + Sets the start_length of this RandomDigitsFormatEntry. + The minimum number of digits the generated values should have. It can be + any integer greater than zero, but it must be less than or equal to the + end length. + + + :param start_length: The start_length of this RandomDigitsFormatEntry. + :type: int + """ + self._start_length = start_length + + @property + def end_length(self): + """ + **[Required]** Gets the end_length of this RandomDigitsFormatEntry. + The maximum number of digits the generated values should have. It can + be any integer greater than zero, but it must be greater than or equal + to the start length. + + + :return: The end_length of this RandomDigitsFormatEntry. + :rtype: int + """ + return self._end_length + + @end_length.setter + def end_length(self, end_length): + """ + Sets the end_length of this RandomDigitsFormatEntry. + The maximum number of digits the generated values should have. It can + be any integer greater than zero, but it must be greater than or equal + to the start length. + + + :param end_length: The end_length of this RandomDigitsFormatEntry. + :type: int + """ + self._end_length = end_length + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_list_format_entry.py b/src/oci/data_safe/models/random_list_format_entry.py new file mode 100644 index 0000000000..7d5609a5d7 --- /dev/null +++ b/src/oci/data_safe/models/random_list_format_entry.py @@ -0,0 +1,95 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomListFormatEntry(FormatEntry): + """ + The Random List masking format randomly selects values from a list of values + to replace the original values. To learn more, check Random List in the + Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomListFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomListFormatEntry.type` attribute + of this class is ``RANDOM_LIST`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomListFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomListFormatEntry. + :type description: str + + :param random_list: + The value to assign to the random_list property of this RandomListFormatEntry. + :type random_list: list[str] + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'random_list': 'list[str]' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'random_list': 'randomList' + } + + self._type = None + self._description = None + self._random_list = None + self._type = 'RANDOM_LIST' + + @property + def random_list(self): + """ + **[Required]** Gets the random_list of this RandomListFormatEntry. + A comma-separated list of values to be used to replace column values. + The list can be of strings, numbers, or dates. The data type of each + value in the list must be compatible with the data type of the column. + The number of entries in the list cannot be more than 999. + + + :return: The random_list of this RandomListFormatEntry. + :rtype: list[str] + """ + return self._random_list + + @random_list.setter + def random_list(self, random_list): + """ + Sets the random_list of this RandomListFormatEntry. + A comma-separated list of values to be used to replace column values. + The list can be of strings, numbers, or dates. The data type of each + value in the list must be compatible with the data type of the column. + The number of entries in the list cannot be more than 999. + + + :param random_list: The random_list of this RandomListFormatEntry. + :type: list[str] + """ + self._random_list = random_list + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_number_format_entry.py b/src/oci/data_safe/models/random_number_format_entry.py new file mode 100644 index 0000000000..917c1c733a --- /dev/null +++ b/src/oci/data_safe/models/random_number_format_entry.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomNumberFormatEntry(FormatEntry): + """ + The Random Number masking format generates random and unique integers within + a range. The range is defined by the startValue and endValue attributes. The + start value must be less than or equal to the end value. When masking columns + with uniqueness constraint, ensure that the range is sufficient enough to + generate unique values. To learn more, check Random Number in the Data Safe + documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomNumberFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomNumberFormatEntry.type` attribute + of this class is ``RANDOM_NUMBER`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomNumberFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomNumberFormatEntry. + :type description: str + + :param start_value: + The value to assign to the start_value property of this RandomNumberFormatEntry. + :type start_value: int + + :param end_value: + The value to assign to the end_value property of this RandomNumberFormatEntry. + :type end_value: int + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_value': 'int', + 'end_value': 'int' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_value': 'startValue', + 'end_value': 'endValue' + } + + self._type = None + self._description = None + self._start_value = None + self._end_value = None + self._type = 'RANDOM_NUMBER' + + @property + def start_value(self): + """ + **[Required]** Gets the start_value of this RandomNumberFormatEntry. + The lower bound of the range within which random numbers should be + generated. It must be less than or equal to the end value. It + supports input of long type. + + + :return: The start_value of this RandomNumberFormatEntry. + :rtype: int + """ + return self._start_value + + @start_value.setter + def start_value(self, start_value): + """ + Sets the start_value of this RandomNumberFormatEntry. + The lower bound of the range within which random numbers should be + generated. It must be less than or equal to the end value. It + supports input of long type. + + + :param start_value: The start_value of this RandomNumberFormatEntry. + :type: int + """ + self._start_value = start_value + + @property + def end_value(self): + """ + **[Required]** Gets the end_value of this RandomNumberFormatEntry. + The upper bound of the range within which random numbers should be + generated. It must be greater than or equal to the start value. + It supports input of long type. + + + :return: The end_value of this RandomNumberFormatEntry. + :rtype: int + """ + return self._end_value + + @end_value.setter + def end_value(self, end_value): + """ + Sets the end_value of this RandomNumberFormatEntry. + The upper bound of the range within which random numbers should be + generated. It must be greater than or equal to the start value. + It supports input of long type. + + + :param end_value: The end_value of this RandomNumberFormatEntry. + :type: int + """ + self._end_value = end_value + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_string_format_entry.py b/src/oci/data_safe/models/random_string_format_entry.py new file mode 100644 index 0000000000..baf9f060ee --- /dev/null +++ b/src/oci/data_safe/models/random_string_format_entry.py @@ -0,0 +1,131 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomStringFormatEntry(FormatEntry): + """ + The Random String masking format generates random and unique strings of length + within a range. The length range is defined by the startLength and endLength + attributes. The start length must be less than or equal to the end length. When + masking columns with uniqueness constraint, ensure that the length range is + sufficient enough to generate unique values. To learn more, check Random String + in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomStringFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomStringFormatEntry.type` attribute + of this class is ``RANDOM_STRING`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomStringFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomStringFormatEntry. + :type description: str + + :param start_length: + The value to assign to the start_length property of this RandomStringFormatEntry. + :type start_length: int + + :param end_length: + The value to assign to the end_length property of this RandomStringFormatEntry. + :type end_length: int + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_length': 'int', + 'end_length': 'int' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_length': 'startLength', + 'end_length': 'endLength' + } + + self._type = None + self._description = None + self._start_length = None + self._end_length = None + self._type = 'RANDOM_STRING' + + @property + def start_length(self): + """ + **[Required]** Gets the start_length of this RandomStringFormatEntry. + The minimum number of characters the generated strings should have. It can + be any integer greater than zero, but it must be less than or equal to the + end length. + + + :return: The start_length of this RandomStringFormatEntry. + :rtype: int + """ + return self._start_length + + @start_length.setter + def start_length(self, start_length): + """ + Sets the start_length of this RandomStringFormatEntry. + The minimum number of characters the generated strings should have. It can + be any integer greater than zero, but it must be less than or equal to the + end length. + + + :param start_length: The start_length of this RandomStringFormatEntry. + :type: int + """ + self._start_length = start_length + + @property + def end_length(self): + """ + **[Required]** Gets the end_length of this RandomStringFormatEntry. + The maximum number of characters the generated strings should have. It can + be any integer greater than zero, but it must be greater than or equal to + the start length. + + + :return: The end_length of this RandomStringFormatEntry. + :rtype: int + """ + return self._end_length + + @end_length.setter + def end_length(self, end_length): + """ + Sets the end_length of this RandomStringFormatEntry. + The maximum number of characters the generated strings should have. It can + be any integer greater than zero, but it must be greater than or equal to + the start length. + + + :param end_length: The end_length of this RandomStringFormatEntry. + :type: int + """ + self._end_length = end_length + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/random_substitution_format_entry.py b/src/oci/data_safe/models/random_substitution_format_entry.py new file mode 100644 index 0000000000..5d45714a9a --- /dev/null +++ b/src/oci/data_safe/models/random_substitution_format_entry.py @@ -0,0 +1,158 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RandomSubstitutionFormatEntry(FormatEntry): + """ + The Random Substitution masking format uses the specified substitution column + as the source of masked values. The values in the substitution column are randomly + ordered before mapping them to the original column values. As a masking operation + renames tables temporarily, the substitution column must be in a table that has + no masking column. Also, you may want to ensure that the substitution column has + sufficient values to uniquely mask the target column. + + Unlike Deterministic Substitution, Random Substitution doesn't do deterministic + masking, and thus, doesn't require a seed value. To learn more, check Random + Substitution in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RandomSubstitutionFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RandomSubstitutionFormatEntry.type` attribute + of this class is ``RANDOM_SUBSTITUTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RandomSubstitutionFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RandomSubstitutionFormatEntry. + :type description: str + + :param schema_name: + The value to assign to the schema_name property of this RandomSubstitutionFormatEntry. + :type schema_name: str + + :param table_name: + The value to assign to the table_name property of this RandomSubstitutionFormatEntry. + :type table_name: str + + :param column_name: + The value to assign to the column_name property of this RandomSubstitutionFormatEntry. + :type column_name: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'schema_name': 'str', + 'table_name': 'str', + 'column_name': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'schema_name': 'schemaName', + 'table_name': 'tableName', + 'column_name': 'columnName' + } + + self._type = None + self._description = None + self._schema_name = None + self._table_name = None + self._column_name = None + self._type = 'RANDOM_SUBSTITUTION' + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this RandomSubstitutionFormatEntry. + The name of the schema that contains the substitution column. + + + :return: The schema_name of this RandomSubstitutionFormatEntry. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this RandomSubstitutionFormatEntry. + The name of the schema that contains the substitution column. + + + :param schema_name: The schema_name of this RandomSubstitutionFormatEntry. + :type: str + """ + self._schema_name = schema_name + + @property + def table_name(self): + """ + **[Required]** Gets the table_name of this RandomSubstitutionFormatEntry. + The name of the table that contains the substitution column. + + + :return: The table_name of this RandomSubstitutionFormatEntry. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this RandomSubstitutionFormatEntry. + The name of the table that contains the substitution column. + + + :param table_name: The table_name of this RandomSubstitutionFormatEntry. + :type: str + """ + self._table_name = table_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this RandomSubstitutionFormatEntry. + The name of the substitution column. + + + :return: The column_name of this RandomSubstitutionFormatEntry. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this RandomSubstitutionFormatEntry. + The name of the substitution column. + + + :param column_name: The column_name of this RandomSubstitutionFormatEntry. + :type: str + """ + self._column_name = column_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/data_safe/models/regular_expression_format_entry.py b/src/oci/data_safe/models/regular_expression_format_entry.py new file mode 100644 index 0000000000..a41a133b4a --- /dev/null +++ b/src/oci/data_safe/models/regular_expression_format_entry.py @@ -0,0 +1,127 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RegularExpressionFormatEntry(FormatEntry): + """ + The Regular Expression masking format gives the flexibility to use regular + expressions to search for sensitive data in a column of Large Object data + type (LOB), and replace the data with a fixed string, fixed number, null + value, or SQL expression. It can also be used for columns of VARCHAR2 type + to mask parts of strings. To learn more, check Regular Expressions in the + Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RegularExpressionFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.RegularExpressionFormatEntry.type` attribute + of this class is ``REGULAR_EXPRESSION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this RegularExpressionFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this RegularExpressionFormatEntry. + :type description: str + + :param regular_expression: + The value to assign to the regular_expression property of this RegularExpressionFormatEntry. + :type regular_expression: str + + :param replace_with: + The value to assign to the replace_with property of this RegularExpressionFormatEntry. + :type replace_with: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'regular_expression': 'str', + 'replace_with': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'regular_expression': 'regularExpression', + 'replace_with': 'replaceWith' + } + + self._type = None + self._description = None + self._regular_expression = None + self._replace_with = None + self._type = 'REGULAR_EXPRESSION' + + @property + def regular_expression(self): + """ + **[Required]** Gets the regular_expression of this RegularExpressionFormatEntry. + The pattern that should be used to search for data. + + + :return: The regular_expression of this RegularExpressionFormatEntry. + :rtype: str + """ + return self._regular_expression + + @regular_expression.setter + def regular_expression(self, regular_expression): + """ + Sets the regular_expression of this RegularExpressionFormatEntry. + The pattern that should be used to search for data. + + + :param regular_expression: The regular_expression of this RegularExpressionFormatEntry. + :type: str + """ + self._regular_expression = regular_expression + + @property + def replace_with(self): + """ + **[Required]** Gets the replace_with of this RegularExpressionFormatEntry. + The value that should be used to replace the data matching the regular + expression. It can be a fixed string, fixed number, null value, or + SQL expression. + + + :return: The replace_with of this RegularExpressionFormatEntry. + :rtype: str + """ + return self._replace_with + + @replace_with.setter + def replace_with(self, replace_with): + """ + Sets the replace_with of this RegularExpressionFormatEntry. + The value that should be used to replace the data matching the regular + expression. It can be a fixed string, fixed number, null value, or + SQL expression. + + + :param replace_with: The replace_with of this RegularExpressionFormatEntry. + :type: str + """ + self._replace_with = replace_with + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/report.py b/src/oci/data_safe/models/report.py new file mode 100644 index 0000000000..ca8a245efe --- /dev/null +++ b/src/oci/data_safe/models/report.py @@ -0,0 +1,430 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Report(object): + """ + Description of Report. + """ + + #: A constant which can be used with the mime_type property of a Report. + #: This constant has a value of "PDF" + MIME_TYPE_PDF = "PDF" + + #: A constant which can be used with the mime_type property of a Report. + #: This constant has a value of "XLS" + MIME_TYPE_XLS = "XLS" + + #: A constant which can be used with the lifecycle_state property of a Report. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a Report. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + def __init__(self, **kwargs): + """ + Initializes a new Report 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 Report. + :type id: str + + :param display_name: + The value to assign to the display_name property of this Report. + :type display_name: str + + :param report_definition_id: + The value to assign to the report_definition_id property of this Report. + :type report_definition_id: str + + :param description: + The value to assign to the description property of this Report. + :type description: str + + :param compartment_id: + The value to assign to the compartment_id property of this Report. + :type compartment_id: str + + :param mime_type: + The value to assign to the mime_type property of this Report. + Allowed values for this property are: "PDF", "XLS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type mime_type: str + + :param time_generated: + The value to assign to the time_generated property of this Report. + :type time_generated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Report. + Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this Report. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this Report. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this Report. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'report_definition_id': 'str', + 'description': 'str', + 'compartment_id': 'str', + 'mime_type': 'str', + 'time_generated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'report_definition_id': 'reportDefinitionId', + 'description': 'description', + 'compartment_id': 'compartmentId', + 'mime_type': 'mimeType', + 'time_generated': 'timeGenerated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._report_definition_id = None + self._description = None + self._compartment_id = None + self._mime_type = None + self._time_generated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Report. + The OCID of the report. + + + :return: The id of this Report. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Report. + The OCID of the report. + + + :param id: The id of this Report. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this Report. + Name of the report. + + + :return: The display_name of this Report. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this Report. + Name of the report. + + + :param display_name: The display_name of this Report. + :type: str + """ + self._display_name = display_name + + @property + def report_definition_id(self): + """ + Gets the report_definition_id of this Report. + The OCID of the report definition. + + + :return: The report_definition_id of this Report. + :rtype: str + """ + return self._report_definition_id + + @report_definition_id.setter + def report_definition_id(self, report_definition_id): + """ + Sets the report_definition_id of this Report. + The OCID of the report definition. + + + :param report_definition_id: The report_definition_id of this Report. + :type: str + """ + self._report_definition_id = report_definition_id + + @property + def description(self): + """ + Gets the description of this Report. + Specifies a description of the report. + + + :return: The description of this Report. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this Report. + Specifies a description of the report. + + + :param description: The description of this Report. + :type: str + """ + self._description = description + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this Report. + The OCID of the compartment containing the report. + + + :return: The compartment_id of this Report. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Report. + The OCID of the compartment containing the report. + + + :param compartment_id: The compartment_id of this Report. + :type: str + """ + self._compartment_id = compartment_id + + @property + def mime_type(self): + """ + Gets the mime_type of this Report. + Specifies the format of report to be excel or pdf + + Allowed values for this property are: "PDF", "XLS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The mime_type of this Report. + :rtype: str + """ + return self._mime_type + + @mime_type.setter + def mime_type(self, mime_type): + """ + Sets the mime_type of this Report. + Specifies the format of report to be excel or pdf + + + :param mime_type: The mime_type of this Report. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(mime_type, allowed_values): + mime_type = 'UNKNOWN_ENUM_VALUE' + self._mime_type = mime_type + + @property + def time_generated(self): + """ + **[Required]** Gets the time_generated of this Report. + Specifies the time at which the report was generated. + + + :return: The time_generated of this Report. + :rtype: datetime + """ + return self._time_generated + + @time_generated.setter + def time_generated(self, time_generated): + """ + Sets the time_generated of this Report. + Specifies the time at which the report was generated. + + + :param time_generated: The time_generated of this Report. + :type: datetime + """ + self._time_generated = time_generated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this Report. + The current state of the report. + + Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Report. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Report. + The current state of the report. + + + :param lifecycle_state: The lifecycle_state of this Report. + :type: str + """ + allowed_values = ["UPDATING", "ACTIVE"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this Report. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this Report. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this Report. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this Report. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this Report. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this Report. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this Report. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this Report. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this Report. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this Report. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this Report. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this Report. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/report_collection.py b/src/oci/data_safe/models/report_collection.py new file mode 100644 index 0000000000..3b6ee67b76 --- /dev/null +++ b/src/oci/data_safe/models/report_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ReportCollection(object): + """ + Collection of report summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ReportCollection 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 ReportCollection. + :type items: list[oci.data_safe.models.ReportSummary] + + """ + self.swagger_types = { + 'items': 'list[ReportSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ReportCollection. + Array of report summary. + + + :return: The items of this ReportCollection. + :rtype: list[oci.data_safe.models.ReportSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ReportCollection. + Array of report summary. + + + :param items: The items of this ReportCollection. + :type: list[oci.data_safe.models.ReportSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/report_definition.py b/src/oci/data_safe/models/report_definition.py new file mode 100644 index 0000000000..80720d8394 --- /dev/null +++ b/src/oci/data_safe/models/report_definition.py @@ -0,0 +1,741 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ReportDefinition(object): + """ + Description of report definition. + """ + + #: A constant which can be used with the category property of a ReportDefinition. + #: This constant has a value of "CUSTOM_REPORTS" + CATEGORY_CUSTOM_REPORTS = "CUSTOM_REPORTS" + + #: A constant which can be used with the category property of a ReportDefinition. + #: This constant has a value of "SUMMARY" + CATEGORY_SUMMARY = "SUMMARY" + + #: A constant which can be used with the category property of a ReportDefinition. + #: This constant has a value of "ACTIVITY_AUDITING" + CATEGORY_ACTIVITY_AUDITING = "ACTIVITY_AUDITING" + + #: A constant which can be used with the data_source property of a ReportDefinition. + #: This constant has a value of "EVENTS" + DATA_SOURCE_EVENTS = "EVENTS" + + #: A constant which can be used with the data_source property of a ReportDefinition. + #: This constant has a value of "ALERTS" + DATA_SOURCE_ALERTS = "ALERTS" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinition. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinition. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinition. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinition. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinition. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ReportDefinition 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 ReportDefinition. + :type display_name: str + + :param id: + The value to assign to the id property of this ReportDefinition. + :type id: str + + :param parent_id: + The value to assign to the parent_id property of this ReportDefinition. + :type parent_id: str + + :param category: + The value to assign to the category property of this ReportDefinition. + Allowed values for this property are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type category: str + + :param description: + The value to assign to the description property of this ReportDefinition. + :type description: str + + :param data_source: + The value to assign to the data_source property of this ReportDefinition. + Allowed values for this property are: "EVENTS", "ALERTS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type data_source: str + + :param is_seeded: + The value to assign to the is_seeded property of this ReportDefinition. + :type is_seeded: bool + + :param display_order: + The value to assign to the display_order property of this ReportDefinition. + :type display_order: int + + :param time_created: + The value to assign to the time_created property of this ReportDefinition. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ReportDefinition. + :type time_updated: datetime + + :param scim_filter: + The value to assign to the scim_filter property of this ReportDefinition. + :type scim_filter: str + + :param column_info: + The value to assign to the column_info property of this ReportDefinition. + :type column_info: list[oci.data_safe.models.Column] + + :param column_filters: + The value to assign to the column_filters property of this ReportDefinition. + :type column_filters: list[oci.data_safe.models.ColumnFilter] + + :param column_sortings: + The value to assign to the column_sortings property of this ReportDefinition. + :type column_sortings: list[oci.data_safe.models.ColumnSorting] + + :param summary: + The value to assign to the summary property of this ReportDefinition. + :type summary: list[oci.data_safe.models.Summary] + + :param compartment_id: + The value to assign to the compartment_id property of this ReportDefinition. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ReportDefinition. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ReportDefinition. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ReportDefinition. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this ReportDefinition. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'id': 'str', + 'parent_id': 'str', + 'category': 'str', + 'description': 'str', + 'data_source': 'str', + 'is_seeded': 'bool', + 'display_order': 'int', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'scim_filter': 'str', + 'column_info': 'list[Column]', + 'column_filters': 'list[ColumnFilter]', + 'column_sortings': 'list[ColumnSorting]', + 'summary': 'list[Summary]', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'id': 'id', + 'parent_id': 'parentId', + 'category': 'category', + 'description': 'description', + 'data_source': 'dataSource', + 'is_seeded': 'isSeeded', + 'display_order': 'displayOrder', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'scim_filter': 'scimFilter', + 'column_info': 'columnInfo', + 'column_filters': 'columnFilters', + 'column_sortings': 'columnSortings', + 'summary': 'summary', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._display_name = None + self._id = None + self._parent_id = None + self._category = None + self._description = None + self._data_source = None + self._is_seeded = None + self._display_order = None + self._time_created = None + self._time_updated = None + self._scim_filter = None + self._column_info = None + self._column_filters = None + self._column_sortings = None + self._summary = None + self._compartment_id = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ReportDefinition. + Name of the report definition. + + + :return: The display_name of this ReportDefinition. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ReportDefinition. + Name of the report definition. + + + :param display_name: The display_name of this ReportDefinition. + :type: str + """ + self._display_name = display_name + + @property + def id(self): + """ + **[Required]** Gets the id of this ReportDefinition. + The OCID of the report definition. + + + :return: The id of this ReportDefinition. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ReportDefinition. + The OCID of the report definition. + + + :param id: The id of this ReportDefinition. + :type: str + """ + self._id = id + + @property + def parent_id(self): + """ + Gets the parent_id of this ReportDefinition. + The OCID of the parent report definition. In the case of seeded report definition, this is same as definition OCID. + + + :return: The parent_id of this ReportDefinition. + :rtype: str + """ + return self._parent_id + + @parent_id.setter + def parent_id(self, parent_id): + """ + Sets the parent_id of this ReportDefinition. + The OCID of the parent report definition. In the case of seeded report definition, this is same as definition OCID. + + + :param parent_id: The parent_id of this ReportDefinition. + :type: str + """ + self._parent_id = parent_id + + @property + def category(self): + """ + Gets the category of this ReportDefinition. + Specifies the name of the category that this report belongs to. + + Allowed values for this property are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The category of this ReportDefinition. + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """ + Sets the category of this ReportDefinition. + Specifies the name of the category that this report belongs to. + + + :param category: The category of this ReportDefinition. + :type: str + """ + allowed_values = ["CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"] + if not value_allowed_none_or_none_sentinel(category, allowed_values): + category = 'UNKNOWN_ENUM_VALUE' + self._category = category + + @property + def description(self): + """ + Gets the description of this ReportDefinition. + A description of the report definition. + + + :return: The description of this ReportDefinition. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ReportDefinition. + A description of the report definition. + + + :param description: The description of this ReportDefinition. + :type: str + """ + self._description = description + + @property + def data_source(self): + """ + Gets the data_source of this ReportDefinition. + Specifies the name of a resource that provides data for the report. For example alerts, events. + + Allowed values for this property are: "EVENTS", "ALERTS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The data_source of this ReportDefinition. + :rtype: str + """ + return self._data_source + + @data_source.setter + def data_source(self, data_source): + """ + Sets the data_source of this ReportDefinition. + Specifies the name of a resource that provides data for the report. For example alerts, events. + + + :param data_source: The data_source of this ReportDefinition. + :type: str + """ + allowed_values = ["EVENTS", "ALERTS"] + if not value_allowed_none_or_none_sentinel(data_source, allowed_values): + data_source = 'UNKNOWN_ENUM_VALUE' + self._data_source = data_source + + @property + def is_seeded(self): + """ + Gets the is_seeded of this ReportDefinition. + Signifies whether the definition is seeded or user defined. Values can either be 'true' or 'false'. + + + :return: The is_seeded of this ReportDefinition. + :rtype: bool + """ + return self._is_seeded + + @is_seeded.setter + def is_seeded(self, is_seeded): + """ + Sets the is_seeded of this ReportDefinition. + Signifies whether the definition is seeded or user defined. Values can either be 'true' or 'false'. + + + :param is_seeded: The is_seeded of this ReportDefinition. + :type: bool + """ + self._is_seeded = is_seeded + + @property + def display_order(self): + """ + Gets the display_order of this ReportDefinition. + Specifies how the report definitions are ordered in the display. + + + :return: The display_order of this ReportDefinition. + :rtype: int + """ + return self._display_order + + @display_order.setter + def display_order(self, display_order): + """ + Sets the display_order of this ReportDefinition. + Specifies how the report definitions are ordered in the display. + + + :param display_order: The display_order of this ReportDefinition. + :type: int + """ + self._display_order = display_order + + @property + def time_created(self): + """ + Gets the time_created of this ReportDefinition. + Specifies the time at which the report definition was created. + + + :return: The time_created of this ReportDefinition. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ReportDefinition. + Specifies the time at which the report definition was created. + + + :param time_created: The time_created of this ReportDefinition. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ReportDefinition. + The date and time of the report definition update in Data Safe. + + + :return: The time_updated of this ReportDefinition. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ReportDefinition. + The date and time of the report definition update in Data Safe. + + + :param time_updated: The time_updated of this ReportDefinition. + :type: datetime + """ + self._time_updated = time_updated + + @property + def scim_filter(self): + """ + Gets the scim_filter of this ReportDefinition. + Additional scim filters used to specialize the report. + + + :return: The scim_filter of this ReportDefinition. + :rtype: str + """ + return self._scim_filter + + @scim_filter.setter + def scim_filter(self, scim_filter): + """ + Sets the scim_filter of this ReportDefinition. + Additional scim filters used to specialize the report. + + + :param scim_filter: The scim_filter of this ReportDefinition. + :type: str + """ + self._scim_filter = scim_filter + + @property + def column_info(self): + """ + Gets the column_info of this ReportDefinition. + An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). + + + :return: The column_info of this ReportDefinition. + :rtype: list[oci.data_safe.models.Column] + """ + return self._column_info + + @column_info.setter + def column_info(self, column_info): + """ + Sets the column_info of this ReportDefinition. + An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). + + + :param column_info: The column_info of this ReportDefinition. + :type: list[oci.data_safe.models.Column] + """ + self._column_info = column_info + + @property + def column_filters(self): + """ + Gets the column_filters of this ReportDefinition. + An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + + + :return: The column_filters of this ReportDefinition. + :rtype: list[oci.data_safe.models.ColumnFilter] + """ + return self._column_filters + + @column_filters.setter + def column_filters(self, column_filters): + """ + Sets the column_filters of this ReportDefinition. + An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + + + :param column_filters: The column_filters of this ReportDefinition. + :type: list[oci.data_safe.models.ColumnFilter] + """ + self._column_filters = column_filters + + @property + def column_sortings(self): + """ + Gets the column_sortings of this ReportDefinition. + An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. + + + :return: The column_sortings of this ReportDefinition. + :rtype: list[oci.data_safe.models.ColumnSorting] + """ + return self._column_sortings + + @column_sortings.setter + def column_sortings(self, column_sortings): + """ + Sets the column_sortings of this ReportDefinition. + An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. + + + :param column_sortings: The column_sortings of this ReportDefinition. + :type: list[oci.data_safe.models.ColumnSorting] + """ + self._column_sortings = column_sortings + + @property + def summary(self): + """ + Gets the summary of this ReportDefinition. + An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). + + + :return: The summary of this ReportDefinition. + :rtype: list[oci.data_safe.models.Summary] + """ + return self._summary + + @summary.setter + def summary(self, summary): + """ + Sets the summary of this ReportDefinition. + An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). + + + :param summary: The summary of this ReportDefinition. + :type: list[oci.data_safe.models.Summary] + """ + self._summary = summary + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ReportDefinition. + The OCID of the compartment containing the report definition. + + + :return: The compartment_id of this ReportDefinition. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ReportDefinition. + The OCID of the compartment containing the report definition. + + + :param compartment_id: The compartment_id of this ReportDefinition. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ReportDefinition. + The current state of the report. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ReportDefinition. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ReportDefinition. + The current state of the report. + + + :param lifecycle_state: The lifecycle_state of this ReportDefinition. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ReportDefinition. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ReportDefinition. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ReportDefinition. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ReportDefinition. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ReportDefinition. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ReportDefinition. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ReportDefinition. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ReportDefinition. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this ReportDefinition. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this ReportDefinition. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this ReportDefinition. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this ReportDefinition. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/report_definition_collection.py b/src/oci/data_safe/models/report_definition_collection.py new file mode 100644 index 0000000000..baec5f7307 --- /dev/null +++ b/src/oci/data_safe/models/report_definition_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ReportDefinitionCollection(object): + """ + Collection of report definition summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ReportDefinitionCollection 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 ReportDefinitionCollection. + :type items: list[oci.data_safe.models.ReportDefinitionSummary] + + """ + self.swagger_types = { + 'items': 'list[ReportDefinitionSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ReportDefinitionCollection. + Array of report definition summary. + + + :return: The items of this ReportDefinitionCollection. + :rtype: list[oci.data_safe.models.ReportDefinitionSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ReportDefinitionCollection. + Array of report definition summary. + + + :param items: The items of this ReportDefinitionCollection. + :type: list[oci.data_safe.models.ReportDefinitionSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/report_definition_summary.py b/src/oci/data_safe/models/report_definition_summary.py new file mode 100644 index 0000000000..5117e163fc --- /dev/null +++ b/src/oci/data_safe/models/report_definition_summary.py @@ -0,0 +1,522 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ReportDefinitionSummary(object): + """ + Summary of report definition. + """ + + #: A constant which can be used with the category property of a ReportDefinitionSummary. + #: This constant has a value of "CUSTOM_REPORTS" + CATEGORY_CUSTOM_REPORTS = "CUSTOM_REPORTS" + + #: A constant which can be used with the category property of a ReportDefinitionSummary. + #: This constant has a value of "SUMMARY" + CATEGORY_SUMMARY = "SUMMARY" + + #: A constant which can be used with the category property of a ReportDefinitionSummary. + #: This constant has a value of "ACTIVITY_AUDITING" + CATEGORY_ACTIVITY_AUDITING = "ACTIVITY_AUDITING" + + #: A constant which can be used with the data_source property of a ReportDefinitionSummary. + #: This constant has a value of "EVENTS" + DATA_SOURCE_EVENTS = "EVENTS" + + #: A constant which can be used with the data_source property of a ReportDefinitionSummary. + #: This constant has a value of "ALERTS" + DATA_SOURCE_ALERTS = "ALERTS" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinitionSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinitionSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinitionSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinitionSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a ReportDefinitionSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new ReportDefinitionSummary 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 ReportDefinitionSummary. + :type display_name: str + + :param id: + The value to assign to the id property of this ReportDefinitionSummary. + :type id: str + + :param category: + The value to assign to the category property of this ReportDefinitionSummary. + Allowed values for this property are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type category: str + + :param description: + The value to assign to the description property of this ReportDefinitionSummary. + :type description: str + + :param is_seeded: + The value to assign to the is_seeded property of this ReportDefinitionSummary. + :type is_seeded: bool + + :param display_order: + The value to assign to the display_order property of this ReportDefinitionSummary. + :type display_order: int + + :param time_created: + The value to assign to the time_created property of this ReportDefinitionSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this ReportDefinitionSummary. + :type time_updated: datetime + + :param compartment_id: + The value to assign to the compartment_id property of this ReportDefinitionSummary. + :type compartment_id: str + + :param data_source: + The value to assign to the data_source property of this ReportDefinitionSummary. + Allowed values for this property are: "EVENTS", "ALERTS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type data_source: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ReportDefinitionSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ReportDefinitionSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ReportDefinitionSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'id': 'str', + 'category': 'str', + 'description': 'str', + 'is_seeded': 'bool', + 'display_order': 'int', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'compartment_id': 'str', + 'data_source': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'id': 'id', + 'category': 'category', + 'description': 'description', + 'is_seeded': 'isSeeded', + 'display_order': 'displayOrder', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'compartment_id': 'compartmentId', + 'data_source': 'dataSource', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._id = None + self._category = None + self._description = None + self._is_seeded = None + self._display_order = None + self._time_created = None + self._time_updated = None + self._compartment_id = None + self._data_source = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ReportDefinitionSummary. + Name of the report definition. + + + :return: The display_name of this ReportDefinitionSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ReportDefinitionSummary. + Name of the report definition. + + + :param display_name: The display_name of this ReportDefinitionSummary. + :type: str + """ + self._display_name = display_name + + @property + def id(self): + """ + **[Required]** Gets the id of this ReportDefinitionSummary. + The OCID of the report definition. + + + :return: The id of this ReportDefinitionSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ReportDefinitionSummary. + The OCID of the report definition. + + + :param id: The id of this ReportDefinitionSummary. + :type: str + """ + self._id = id + + @property + def category(self): + """ + Gets the category of this ReportDefinitionSummary. + Specifies the name of the category that this report belongs to. + + Allowed values for this property are: "CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The category of this ReportDefinitionSummary. + :rtype: str + """ + return self._category + + @category.setter + def category(self, category): + """ + Sets the category of this ReportDefinitionSummary. + Specifies the name of the category that this report belongs to. + + + :param category: The category of this ReportDefinitionSummary. + :type: str + """ + allowed_values = ["CUSTOM_REPORTS", "SUMMARY", "ACTIVITY_AUDITING"] + if not value_allowed_none_or_none_sentinel(category, allowed_values): + category = 'UNKNOWN_ENUM_VALUE' + self._category = category + + @property + def description(self): + """ + Gets the description of this ReportDefinitionSummary. + A description of the report definition. + + + :return: The description of this ReportDefinitionSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ReportDefinitionSummary. + A description of the report definition. + + + :param description: The description of this ReportDefinitionSummary. + :type: str + """ + self._description = description + + @property + def is_seeded(self): + """ + Gets the is_seeded of this ReportDefinitionSummary. + Signifies whether the definition is seeded or user defined. Values can either be 'true' or 'false'. + + + :return: The is_seeded of this ReportDefinitionSummary. + :rtype: bool + """ + return self._is_seeded + + @is_seeded.setter + def is_seeded(self, is_seeded): + """ + Sets the is_seeded of this ReportDefinitionSummary. + Signifies whether the definition is seeded or user defined. Values can either be 'true' or 'false'. + + + :param is_seeded: The is_seeded of this ReportDefinitionSummary. + :type: bool + """ + self._is_seeded = is_seeded + + @property + def display_order(self): + """ + Gets the display_order of this ReportDefinitionSummary. + Specifies how the report definitions are ordered in the display. + + + :return: The display_order of this ReportDefinitionSummary. + :rtype: int + """ + return self._display_order + + @display_order.setter + def display_order(self, display_order): + """ + Sets the display_order of this ReportDefinitionSummary. + Specifies how the report definitions are ordered in the display. + + + :param display_order: The display_order of this ReportDefinitionSummary. + :type: int + """ + self._display_order = display_order + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this ReportDefinitionSummary. + Specifies the time at which the report definition was created. + + + :return: The time_created of this ReportDefinitionSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this ReportDefinitionSummary. + Specifies the time at which the report definition was created. + + + :param time_created: The time_created of this ReportDefinitionSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + Gets the time_updated of this ReportDefinitionSummary. + The date and time of the report definition update in Data Safe. + + + :return: The time_updated of this ReportDefinitionSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this ReportDefinitionSummary. + The date and time of the report definition update in Data Safe. + + + :param time_updated: The time_updated of this ReportDefinitionSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ReportDefinitionSummary. + The OCID of the compartment containing the report definition. + + + :return: The compartment_id of this ReportDefinitionSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ReportDefinitionSummary. + The OCID of the compartment containing the report definition. + + + :param compartment_id: The compartment_id of this ReportDefinitionSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def data_source(self): + """ + Gets the data_source of this ReportDefinitionSummary. + Specifies the name of a resource that provides data for the report. For example alerts, events. + + Allowed values for this property are: "EVENTS", "ALERTS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The data_source of this ReportDefinitionSummary. + :rtype: str + """ + return self._data_source + + @data_source.setter + def data_source(self, data_source): + """ + Sets the data_source of this ReportDefinitionSummary. + Specifies the name of a resource that provides data for the report. For example alerts, events. + + + :param data_source: The data_source of this ReportDefinitionSummary. + :type: str + """ + allowed_values = ["EVENTS", "ALERTS"] + if not value_allowed_none_or_none_sentinel(data_source, allowed_values): + data_source = 'UNKNOWN_ENUM_VALUE' + self._data_source = data_source + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ReportDefinitionSummary. + The current state of the report + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ReportDefinitionSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ReportDefinitionSummary. + The current state of the report + + + :param lifecycle_state: The lifecycle_state of this ReportDefinitionSummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ReportDefinitionSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ReportDefinitionSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ReportDefinitionSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ReportDefinitionSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ReportDefinitionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ReportDefinitionSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ReportDefinitionSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ReportDefinitionSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/report_summary.py b/src/oci/data_safe/models/report_summary.py new file mode 100644 index 0000000000..7547a6865a --- /dev/null +++ b/src/oci/data_safe/models/report_summary.py @@ -0,0 +1,397 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ReportSummary(object): + """ + Description of report. + """ + + #: A constant which can be used with the mime_type property of a ReportSummary. + #: This constant has a value of "PDF" + MIME_TYPE_PDF = "PDF" + + #: A constant which can be used with the mime_type property of a ReportSummary. + #: This constant has a value of "XLS" + MIME_TYPE_XLS = "XLS" + + #: A constant which can be used with the lifecycle_state property of a ReportSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a ReportSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + def __init__(self, **kwargs): + """ + Initializes a new ReportSummary 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 ReportSummary. + :type display_name: str + + :param id: + The value to assign to the id property of this ReportSummary. + :type id: str + + :param report_definition_id: + The value to assign to the report_definition_id property of this ReportSummary. + :type report_definition_id: str + + :param description: + The value to assign to the description property of this ReportSummary. + :type description: str + + :param mime_type: + The value to assign to the mime_type property of this ReportSummary. + Allowed values for this property are: "PDF", "XLS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type mime_type: str + + :param time_generated: + The value to assign to the time_generated property of this ReportSummary. + :type time_generated: datetime + + :param compartment_id: + The value to assign to the compartment_id property of this ReportSummary. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this ReportSummary. + Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this ReportSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this ReportSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'id': 'str', + 'report_definition_id': 'str', + 'description': 'str', + 'mime_type': 'str', + 'time_generated': 'datetime', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'id': 'id', + 'report_definition_id': 'reportDefinitionId', + 'description': 'description', + 'mime_type': 'mimeType', + 'time_generated': 'timeGenerated', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._id = None + self._report_definition_id = None + self._description = None + self._mime_type = None + self._time_generated = None + self._compartment_id = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this ReportSummary. + Name of the report. + + + :return: The display_name of this ReportSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this ReportSummary. + Name of the report. + + + :param display_name: The display_name of this ReportSummary. + :type: str + """ + self._display_name = display_name + + @property + def id(self): + """ + **[Required]** Gets the id of this ReportSummary. + The OCID of the report. + + + :return: The id of this ReportSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ReportSummary. + The OCID of the report. + + + :param id: The id of this ReportSummary. + :type: str + """ + self._id = id + + @property + def report_definition_id(self): + """ + Gets the report_definition_id of this ReportSummary. + The OCID of the report definition. + + + :return: The report_definition_id of this ReportSummary. + :rtype: str + """ + return self._report_definition_id + + @report_definition_id.setter + def report_definition_id(self, report_definition_id): + """ + Sets the report_definition_id of this ReportSummary. + The OCID of the report definition. + + + :param report_definition_id: The report_definition_id of this ReportSummary. + :type: str + """ + self._report_definition_id = report_definition_id + + @property + def description(self): + """ + Gets the description of this ReportSummary. + Description of the report. + + + :return: The description of this ReportSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this ReportSummary. + Description of the report. + + + :param description: The description of this ReportSummary. + :type: str + """ + self._description = description + + @property + def mime_type(self): + """ + Gets the mime_type of this ReportSummary. + Specifies the format of report to be excel or pdf + + Allowed values for this property are: "PDF", "XLS", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The mime_type of this ReportSummary. + :rtype: str + """ + return self._mime_type + + @mime_type.setter + def mime_type(self, mime_type): + """ + Sets the mime_type of this ReportSummary. + Specifies the format of report to be excel or pdf + + + :param mime_type: The mime_type of this ReportSummary. + :type: str + """ + allowed_values = ["PDF", "XLS"] + if not value_allowed_none_or_none_sentinel(mime_type, allowed_values): + mime_type = 'UNKNOWN_ENUM_VALUE' + self._mime_type = mime_type + + @property + def time_generated(self): + """ + **[Required]** Gets the time_generated of this ReportSummary. + Specifies the time at which the report was generated. + + + :return: The time_generated of this ReportSummary. + :rtype: datetime + """ + return self._time_generated + + @time_generated.setter + def time_generated(self, time_generated): + """ + Sets the time_generated of this ReportSummary. + Specifies the time at which the report was generated. + + + :param time_generated: The time_generated of this ReportSummary. + :type: datetime + """ + self._time_generated = time_generated + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this ReportSummary. + The OCID of the compartment containing the report. + + + :return: The compartment_id of this ReportSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this ReportSummary. + The OCID of the compartment containing the report. + + + :param compartment_id: The compartment_id of this ReportSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this ReportSummary. + The current state of the report. + + Allowed values for this property are: "UPDATING", "ACTIVE", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this ReportSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this ReportSummary. + The current state of the report. + + + :param lifecycle_state: The lifecycle_state of this ReportSummary. + :type: str + """ + allowed_values = ["UPDATING", "ACTIVE"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this ReportSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this ReportSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this ReportSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this ReportSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this ReportSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this ReportSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this ReportSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this ReportSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/role_summary.py b/src/oci/data_safe/models/role_summary.py new file mode 100644 index 0000000000..645a451369 --- /dev/null +++ b/src/oci/data_safe/models/role_summary.py @@ -0,0 +1,256 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class RoleSummary(object): + """ + Details of a role fetched from the database. + """ + + def __init__(self, **kwargs): + """ + Initializes a new RoleSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param role_name: + The value to assign to the role_name property of this RoleSummary. + :type role_name: str + + :param authentication_type: + The value to assign to the authentication_type property of this RoleSummary. + :type authentication_type: str + + :param is_password_required: + The value to assign to the is_password_required property of this RoleSummary. + :type is_password_required: bool + + :param is_common: + The value to assign to the is_common property of this RoleSummary. + :type is_common: bool + + :param is_oracle_maintained: + The value to assign to the is_oracle_maintained property of this RoleSummary. + :type is_oracle_maintained: bool + + :param is_inherited: + The value to assign to the is_inherited property of this RoleSummary. + :type is_inherited: bool + + :param is_implicit: + The value to assign to the is_implicit property of this RoleSummary. + :type is_implicit: bool + + """ + self.swagger_types = { + 'role_name': 'str', + 'authentication_type': 'str', + 'is_password_required': 'bool', + 'is_common': 'bool', + 'is_oracle_maintained': 'bool', + 'is_inherited': 'bool', + 'is_implicit': 'bool' + } + + self.attribute_map = { + 'role_name': 'roleName', + 'authentication_type': 'authenticationType', + 'is_password_required': 'isPasswordRequired', + 'is_common': 'isCommon', + 'is_oracle_maintained': 'isOracleMaintained', + 'is_inherited': 'isInherited', + 'is_implicit': 'isImplicit' + } + + self._role_name = None + self._authentication_type = None + self._is_password_required = None + self._is_common = None + self._is_oracle_maintained = None + self._is_inherited = None + self._is_implicit = None + + @property + def role_name(self): + """ + **[Required]** Gets the role_name of this RoleSummary. + Name of the role. + + + :return: The role_name of this RoleSummary. + :rtype: str + """ + return self._role_name + + @role_name.setter + def role_name(self, role_name): + """ + Sets the role_name of this RoleSummary. + Name of the role. + + + :param role_name: The role_name of this RoleSummary. + :type: str + """ + self._role_name = role_name + + @property + def authentication_type(self): + """ + **[Required]** Gets the authentication_type of this RoleSummary. + Type of authentication. + + + :return: The authentication_type of this RoleSummary. + :rtype: str + """ + return self._authentication_type + + @authentication_type.setter + def authentication_type(self, authentication_type): + """ + Sets the authentication_type of this RoleSummary. + Type of authentication. + + + :param authentication_type: The authentication_type of this RoleSummary. + :type: str + """ + self._authentication_type = authentication_type + + @property + def is_password_required(self): + """ + Gets the is_password_required of this RoleSummary. + Is password required. + + + :return: The is_password_required of this RoleSummary. + :rtype: bool + """ + return self._is_password_required + + @is_password_required.setter + def is_password_required(self, is_password_required): + """ + Sets the is_password_required of this RoleSummary. + Is password required. + + + :param is_password_required: The is_password_required of this RoleSummary. + :type: bool + """ + self._is_password_required = is_password_required + + @property + def is_common(self): + """ + Gets the is_common of this RoleSummary. + Is the role common. + + + :return: The is_common of this RoleSummary. + :rtype: bool + """ + return self._is_common + + @is_common.setter + def is_common(self, is_common): + """ + Sets the is_common of this RoleSummary. + Is the role common. + + + :param is_common: The is_common of this RoleSummary. + :type: bool + """ + self._is_common = is_common + + @property + def is_oracle_maintained(self): + """ + Gets the is_oracle_maintained of this RoleSummary. + Is the role oracle maintained. + + + :return: The is_oracle_maintained of this RoleSummary. + :rtype: bool + """ + return self._is_oracle_maintained + + @is_oracle_maintained.setter + def is_oracle_maintained(self, is_oracle_maintained): + """ + Sets the is_oracle_maintained of this RoleSummary. + Is the role oracle maintained. + + + :param is_oracle_maintained: The is_oracle_maintained of this RoleSummary. + :type: bool + """ + self._is_oracle_maintained = is_oracle_maintained + + @property + def is_inherited(self): + """ + Gets the is_inherited of this RoleSummary. + Is the role inherited. + + + :return: The is_inherited of this RoleSummary. + :rtype: bool + """ + return self._is_inherited + + @is_inherited.setter + def is_inherited(self, is_inherited): + """ + Sets the is_inherited of this RoleSummary. + Is the role inherited. + + + :param is_inherited: The is_inherited of this RoleSummary. + :type: bool + """ + self._is_inherited = is_inherited + + @property + def is_implicit(self): + """ + Gets the is_implicit of this RoleSummary. + Is the role implicit. + + + :return: The is_implicit of this RoleSummary. + :rtype: bool + """ + return self._is_implicit + + @is_implicit.setter + def is_implicit(self, is_implicit): + """ + Sets the is_implicit of this RoleSummary. + Is the role implicit. + + + :param is_implicit: The is_implicit of this RoleSummary. + :type: bool + """ + self._is_implicit = is_implicit + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/schema_summary.py b/src/oci/data_safe/models/schema_summary.py new file mode 100644 index 0000000000..5b45d27622 --- /dev/null +++ b/src/oci/data_safe/models/schema_summary.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SchemaSummary(object): + """ + Details of a schema fetched from the database. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SchemaSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param schema_name: + The value to assign to the schema_name property of this SchemaSummary. + :type schema_name: str + + :param is_oracle_maintained: + The value to assign to the is_oracle_maintained property of this SchemaSummary. + :type is_oracle_maintained: bool + + """ + self.swagger_types = { + 'schema_name': 'str', + 'is_oracle_maintained': 'bool' + } + + self.attribute_map = { + 'schema_name': 'schemaName', + 'is_oracle_maintained': 'isOracleMaintained' + } + + self._schema_name = None + self._is_oracle_maintained = None + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this SchemaSummary. + Name of the schema. + + + :return: The schema_name of this SchemaSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this SchemaSummary. + Name of the schema. + + + :param schema_name: The schema_name of this SchemaSummary. + :type: str + """ + self._schema_name = schema_name + + @property + def is_oracle_maintained(self): + """ + **[Required]** Gets the is_oracle_maintained of this SchemaSummary. + Indicates if the schema is oracle supplied. + + + :return: The is_oracle_maintained of this SchemaSummary. + :rtype: bool + """ + return self._is_oracle_maintained + + @is_oracle_maintained.setter + def is_oracle_maintained(self, is_oracle_maintained): + """ + Sets the is_oracle_maintained of this SchemaSummary. + Indicates if the schema is oracle supplied. + + + :param is_oracle_maintained: The is_oracle_maintained of this SchemaSummary. + :type: bool + """ + self._is_oracle_maintained = is_oracle_maintained + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_category.py b/src/oci/data_safe/models/sensitive_category.py new file mode 100644 index 0000000000..60ae242dc3 --- /dev/null +++ b/src/oci/data_safe/models/sensitive_category.py @@ -0,0 +1,142 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .sensitive_type import SensitiveType +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveCategory(SensitiveType): + """ + Details of the sensitive category. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveCategory object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.SensitiveCategory.entity_type` attribute + of this class is ``SENSITIVE_CATEGORY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this SensitiveCategory. + :type id: str + + :param entity_type: + The value to assign to the entity_type property of this SensitiveCategory. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this SensitiveCategory. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this SensitiveCategory. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveCategory. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED" + :type lifecycle_state: str + + :param short_name: + The value to assign to the short_name property of this SensitiveCategory. + :type short_name: str + + :param source: + The value to assign to the source property of this SensitiveCategory. + Allowed values for this property are: "ORACLE", "USER" + :type source: str + + :param time_created: + The value to assign to the time_created property of this SensitiveCategory. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveCategory. + :type time_updated: datetime + + :param description: + The value to assign to the description property of this SensitiveCategory. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this SensitiveCategory. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SensitiveCategory. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SensitiveCategory. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this SensitiveCategory. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'entity_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'short_name': 'str', + 'source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'short_name': 'shortName', + 'source': 'source', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._entity_type = None + self._display_name = None + self._compartment_id = None + self._lifecycle_state = None + self._short_name = None + self._source = None + self._time_created = None + self._time_updated = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._entity_type = 'SENSITIVE_CATEGORY' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_column.py b/src/oci/data_safe/models/sensitive_column.py new file mode 100644 index 0000000000..60a1a841cb --- /dev/null +++ b/src/oci/data_safe/models/sensitive_column.py @@ -0,0 +1,851 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveColumn(object): + """ + A sensitive column is a resource corresponding to a database column that is considered sensitive. + It's a subresource of sensitive data model resource and is always associated with a sensitive data model. + Note that referential relationships are also managed as part of sensitive columns. + """ + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumn. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumn. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumn. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumn. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumn. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the object_type property of a SensitiveColumn. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a SensitiveColumn. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + #: A constant which can be used with the status property of a SensitiveColumn. + #: This constant has a value of "VALID" + STATUS_VALID = "VALID" + + #: A constant which can be used with the status property of a SensitiveColumn. + #: This constant has a value of "INVALID" + STATUS_INVALID = "INVALID" + + #: A constant which can be used with the source property of a SensitiveColumn. + #: This constant has a value of "MANUAL" + SOURCE_MANUAL = "MANUAL" + + #: A constant which can be used with the source property of a SensitiveColumn. + #: This constant has a value of "DISCOVERY" + SOURCE_DISCOVERY = "DISCOVERY" + + #: A constant which can be used with the relation_type property of a SensitiveColumn. + #: This constant has a value of "NONE" + RELATION_TYPE_NONE = "NONE" + + #: A constant which can be used with the relation_type property of a SensitiveColumn. + #: This constant has a value of "APP_DEFINED" + RELATION_TYPE_APP_DEFINED = "APP_DEFINED" + + #: A constant which can be used with the relation_type property of a SensitiveColumn. + #: This constant has a value of "DB_DEFINED" + RELATION_TYPE_DB_DEFINED = "DB_DEFINED" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveColumn object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this SensitiveColumn. + :type key: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this SensitiveColumn. + :type sensitive_data_model_id: str + + :param time_created: + The value to assign to the time_created property of this SensitiveColumn. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveColumn. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveColumn. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this SensitiveColumn. + :type lifecycle_details: str + + :param app_name: + The value to assign to the app_name property of this SensitiveColumn. + :type app_name: str + + :param schema_name: + The value to assign to the schema_name property of this SensitiveColumn. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this SensitiveColumn. + :type object_name: str + + :param column_name: + The value to assign to the column_name property of this SensitiveColumn. + :type column_name: str + + :param object_type: + The value to assign to the object_type property of this SensitiveColumn. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param data_type: + The value to assign to the data_type property of this SensitiveColumn. + :type data_type: str + + :param status: + The value to assign to the status property of this SensitiveColumn. + Allowed values for this property are: "VALID", "INVALID", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this SensitiveColumn. + :type sensitive_type_id: str + + :param source: + The value to assign to the source property of this SensitiveColumn. + Allowed values for this property are: "MANUAL", "DISCOVERY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param parent_column_keys: + The value to assign to the parent_column_keys property of this SensitiveColumn. + :type parent_column_keys: list[str] + + :param relation_type: + The value to assign to the relation_type property of this SensitiveColumn. + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type relation_type: str + + :param estimated_data_value_count: + The value to assign to the estimated_data_value_count property of this SensitiveColumn. + :type estimated_data_value_count: int + + :param sample_data_values: + The value to assign to the sample_data_values property of this SensitiveColumn. + :type sample_data_values: list[str] + + :param app_defined_child_column_keys: + The value to assign to the app_defined_child_column_keys property of this SensitiveColumn. + :type app_defined_child_column_keys: list[str] + + :param db_defined_child_column_keys: + The value to assign to the db_defined_child_column_keys property of this SensitiveColumn. + :type db_defined_child_column_keys: list[str] + + :param column_groups: + The value to assign to the column_groups property of this SensitiveColumn. + :type column_groups: list[str] + + """ + self.swagger_types = { + 'key': 'str', + 'sensitive_data_model_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'app_name': 'str', + 'schema_name': 'str', + 'object_name': 'str', + 'column_name': 'str', + 'object_type': 'str', + 'data_type': 'str', + 'status': 'str', + 'sensitive_type_id': 'str', + 'source': 'str', + 'parent_column_keys': 'list[str]', + 'relation_type': 'str', + 'estimated_data_value_count': 'int', + 'sample_data_values': 'list[str]', + 'app_defined_child_column_keys': 'list[str]', + 'db_defined_child_column_keys': 'list[str]', + 'column_groups': 'list[str]' + } + + self.attribute_map = { + 'key': 'key', + 'sensitive_data_model_id': 'sensitiveDataModelId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'app_name': 'appName', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'column_name': 'columnName', + 'object_type': 'objectType', + 'data_type': 'dataType', + 'status': 'status', + 'sensitive_type_id': 'sensitiveTypeId', + 'source': 'source', + 'parent_column_keys': 'parentColumnKeys', + 'relation_type': 'relationType', + 'estimated_data_value_count': 'estimatedDataValueCount', + 'sample_data_values': 'sampleDataValues', + 'app_defined_child_column_keys': 'appDefinedChildColumnKeys', + 'db_defined_child_column_keys': 'dbDefinedChildColumnKeys', + 'column_groups': 'columnGroups' + } + + self._key = None + self._sensitive_data_model_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._lifecycle_details = None + self._app_name = None + self._schema_name = None + self._object_name = None + self._column_name = None + self._object_type = None + self._data_type = None + self._status = None + self._sensitive_type_id = None + self._source = None + self._parent_column_keys = None + self._relation_type = None + self._estimated_data_value_count = None + self._sample_data_values = None + self._app_defined_child_column_keys = None + self._db_defined_child_column_keys = None + self._column_groups = None + + @property + def key(self): + """ + **[Required]** Gets the key of this SensitiveColumn. + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + + :return: The key of this SensitiveColumn. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this SensitiveColumn. + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + + :param key: The key of this SensitiveColumn. + :type: str + """ + self._key = key + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this SensitiveColumn. + The OCID of the sensitive data model that contains the sensitive column. + + + :return: The sensitive_data_model_id of this SensitiveColumn. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this SensitiveColumn. + The OCID of the sensitive data model that contains the sensitive column. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this SensitiveColumn. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SensitiveColumn. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was created in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SensitiveColumn. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SensitiveColumn. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was created in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SensitiveColumn. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SensitiveColumn. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was last updated in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SensitiveColumn. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SensitiveColumn. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was last updated in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SensitiveColumn. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SensitiveColumn. + The current state of the sensitive column. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SensitiveColumn. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SensitiveColumn. + The current state of the sensitive column. + + + :param lifecycle_state: The lifecycle_state of this SensitiveColumn. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this SensitiveColumn. + Details about the current state of the sensitive column. + + + :return: The lifecycle_details of this SensitiveColumn. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this SensitiveColumn. + Details about the current state of the sensitive column. + + + :param lifecycle_details: The lifecycle_details of this SensitiveColumn. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def app_name(self): + """ + **[Required]** Gets the app_name of this SensitiveColumn. + The name of the application associated with the sensitive column. It's useful when the application name is + different from the schema name. Otherwise, it can be ignored. + + + :return: The app_name of this SensitiveColumn. + :rtype: str + """ + return self._app_name + + @app_name.setter + def app_name(self, app_name): + """ + Sets the app_name of this SensitiveColumn. + The name of the application associated with the sensitive column. It's useful when the application name is + different from the schema name. Otherwise, it can be ignored. + + + :param app_name: The app_name of this SensitiveColumn. + :type: str + """ + self._app_name = app_name + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this SensitiveColumn. + The database schema that contains the sensitive column. + + + :return: The schema_name of this SensitiveColumn. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this SensitiveColumn. + The database schema that contains the sensitive column. + + + :param schema_name: The schema_name of this SensitiveColumn. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this SensitiveColumn. + The database object that contains the sensitive column. + + + :return: The object_name of this SensitiveColumn. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this SensitiveColumn. + The database object that contains the sensitive column. + + + :param object_name: The object_name of this SensitiveColumn. + :type: str + """ + self._object_name = object_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this SensitiveColumn. + The name of the sensitive column. + + + :return: The column_name of this SensitiveColumn. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this SensitiveColumn. + The name of the sensitive column. + + + :param column_name: The column_name of this SensitiveColumn. + :type: str + """ + self._column_name = column_name + + @property + def object_type(self): + """ + **[Required]** Gets the object_type of this SensitiveColumn. + The type of the database object that contains the sensitive column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this SensitiveColumn. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this SensitiveColumn. + The type of the database object that contains the sensitive column. + + + :param object_type: The object_type of this SensitiveColumn. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def data_type(self): + """ + **[Required]** Gets the data_type of this SensitiveColumn. + The data type of the sensitive column. + + + :return: The data_type of this SensitiveColumn. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this SensitiveColumn. + The data type of the sensitive column. + + + :param data_type: The data_type of this SensitiveColumn. + :type: str + """ + self._data_type = data_type + + @property + def status(self): + """ + **[Required]** Gets the status of this SensitiveColumn. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an + incremental data discovery job does not identify these columns as sensitive again. + + Allowed values for this property are: "VALID", "INVALID", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this SensitiveColumn. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this SensitiveColumn. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an + incremental data discovery job does not identify these columns as sensitive again. + + + :param status: The status of this SensitiveColumn. + :type: str + """ + allowed_values = ["VALID", "INVALID"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this SensitiveColumn. + The OCID of the sensitive type associated with the sensitive column. + + + :return: The sensitive_type_id of this SensitiveColumn. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this SensitiveColumn. + The OCID of the sensitive type associated with the sensitive column. + + + :param sensitive_type_id: The sensitive_type_id of this SensitiveColumn. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def source(self): + """ + **[Required]** Gets the source of this SensitiveColumn. + The source of the sensitive column. DISCOVERY indicates that the column was added to the sensitive data model + using a data discovery job. MANUAL indicates that the column was added manually. + + Allowed values for this property are: "MANUAL", "DISCOVERY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source of this SensitiveColumn. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this SensitiveColumn. + The source of the sensitive column. DISCOVERY indicates that the column was added to the sensitive data model + using a data discovery job. MANUAL indicates that the column was added manually. + + + :param source: The source of this SensitiveColumn. + :type: str + """ + allowed_values = ["MANUAL", "DISCOVERY"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + source = 'UNKNOWN_ENUM_VALUE' + self._source = source + + @property + def parent_column_keys(self): + """ + Gets the parent_column_keys of this SensitiveColumn. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :return: The parent_column_keys of this SensitiveColumn. + :rtype: list[str] + """ + return self._parent_column_keys + + @parent_column_keys.setter + def parent_column_keys(self, parent_column_keys): + """ + Sets the parent_column_keys of this SensitiveColumn. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :param parent_column_keys: The parent_column_keys of this SensitiveColumn. + :type: list[str] + """ + self._parent_column_keys = parent_column_keys + + @property + def relation_type(self): + """ + **[Required]** Gets the relation_type of this SensitiveColumn. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the + sensitive column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database + dictionary. APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The relation_type of this SensitiveColumn. + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """ + Sets the relation_type of this SensitiveColumn. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the + sensitive column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database + dictionary. APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + + :param relation_type: The relation_type of this SensitiveColumn. + :type: str + """ + allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + if not value_allowed_none_or_none_sentinel(relation_type, allowed_values): + relation_type = 'UNKNOWN_ENUM_VALUE' + self._relation_type = relation_type + + @property + def estimated_data_value_count(self): + """ + **[Required]** Gets the estimated_data_value_count of this SensitiveColumn. + The estimated number of data values the column has in the associated database. + + + :return: The estimated_data_value_count of this SensitiveColumn. + :rtype: int + """ + return self._estimated_data_value_count + + @estimated_data_value_count.setter + def estimated_data_value_count(self, estimated_data_value_count): + """ + Sets the estimated_data_value_count of this SensitiveColumn. + The estimated number of data values the column has in the associated database. + + + :param estimated_data_value_count: The estimated_data_value_count of this SensitiveColumn. + :type: int + """ + self._estimated_data_value_count = estimated_data_value_count + + @property + def sample_data_values(self): + """ + Gets the sample_data_values of this SensitiveColumn. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :return: The sample_data_values of this SensitiveColumn. + :rtype: list[str] + """ + return self._sample_data_values + + @sample_data_values.setter + def sample_data_values(self, sample_data_values): + """ + Sets the sample_data_values of this SensitiveColumn. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :param sample_data_values: The sample_data_values of this SensitiveColumn. + :type: list[str] + """ + self._sample_data_values = sample_data_values + + @property + def app_defined_child_column_keys(self): + """ + Gets the app_defined_child_column_keys of this SensitiveColumn. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + + + :return: The app_defined_child_column_keys of this SensitiveColumn. + :rtype: list[str] + """ + return self._app_defined_child_column_keys + + @app_defined_child_column_keys.setter + def app_defined_child_column_keys(self, app_defined_child_column_keys): + """ + Sets the app_defined_child_column_keys of this SensitiveColumn. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + + + :param app_defined_child_column_keys: The app_defined_child_column_keys of this SensitiveColumn. + :type: list[str] + """ + self._app_defined_child_column_keys = app_defined_child_column_keys + + @property + def db_defined_child_column_keys(self): + """ + Gets the db_defined_child_column_keys of this SensitiveColumn. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + + + :return: The db_defined_child_column_keys of this SensitiveColumn. + :rtype: list[str] + """ + return self._db_defined_child_column_keys + + @db_defined_child_column_keys.setter + def db_defined_child_column_keys(self, db_defined_child_column_keys): + """ + Sets the db_defined_child_column_keys of this SensitiveColumn. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + + + :param db_defined_child_column_keys: The db_defined_child_column_keys of this SensitiveColumn. + :type: list[str] + """ + self._db_defined_child_column_keys = db_defined_child_column_keys + + @property + def column_groups(self): + """ + Gets the column_groups of this SensitiveColumn. + The composite key groups to which the sensitive column belongs. If the column is part of a composite key, + it's assigned a column group. It helps identify and manage referential relationships that involve composite keys. + + + :return: The column_groups of this SensitiveColumn. + :rtype: list[str] + """ + return self._column_groups + + @column_groups.setter + def column_groups(self, column_groups): + """ + Sets the column_groups of this SensitiveColumn. + The composite key groups to which the sensitive column belongs. If the column is part of a composite key, + it's assigned a column group. It helps identify and manage referential relationships that involve composite keys. + + + :param column_groups: The column_groups of this SensitiveColumn. + :type: list[str] + """ + self._column_groups = column_groups + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_column_collection.py b/src/oci/data_safe/models/sensitive_column_collection.py new file mode 100644 index 0000000000..cabbd31e56 --- /dev/null +++ b/src/oci/data_safe/models/sensitive_column_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveColumnCollection(object): + """ + A collection of sensitive column summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveColumnCollection 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 SensitiveColumnCollection. + :type items: list[oci.data_safe.models.SensitiveColumnSummary] + + """ + self.swagger_types = { + 'items': 'list[SensitiveColumnSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SensitiveColumnCollection. + An array of sensitive column summary objects. + + + :return: The items of this SensitiveColumnCollection. + :rtype: list[oci.data_safe.models.SensitiveColumnSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SensitiveColumnCollection. + An array of sensitive column summary objects. + + + :param items: The items of this SensitiveColumnCollection. + :type: list[oci.data_safe.models.SensitiveColumnSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_column_summary.py b/src/oci/data_safe/models/sensitive_column_summary.py new file mode 100644 index 0000000000..7958f0e482 --- /dev/null +++ b/src/oci/data_safe/models/sensitive_column_summary.py @@ -0,0 +1,754 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveColumnSummary(object): + """ + Summary of a sensitive column present in a sensitive data model. + """ + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumnSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumnSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumnSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumnSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveColumnSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the object_type property of a SensitiveColumnSummary. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a SensitiveColumnSummary. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + #: A constant which can be used with the status property of a SensitiveColumnSummary. + #: This constant has a value of "VALID" + STATUS_VALID = "VALID" + + #: A constant which can be used with the status property of a SensitiveColumnSummary. + #: This constant has a value of "INVALID" + STATUS_INVALID = "INVALID" + + #: A constant which can be used with the source property of a SensitiveColumnSummary. + #: This constant has a value of "MANUAL" + SOURCE_MANUAL = "MANUAL" + + #: A constant which can be used with the source property of a SensitiveColumnSummary. + #: This constant has a value of "DISCOVERY" + SOURCE_DISCOVERY = "DISCOVERY" + + #: A constant which can be used with the relation_type property of a SensitiveColumnSummary. + #: This constant has a value of "NONE" + RELATION_TYPE_NONE = "NONE" + + #: A constant which can be used with the relation_type property of a SensitiveColumnSummary. + #: This constant has a value of "APP_DEFINED" + RELATION_TYPE_APP_DEFINED = "APP_DEFINED" + + #: A constant which can be used with the relation_type property of a SensitiveColumnSummary. + #: This constant has a value of "DB_DEFINED" + RELATION_TYPE_DB_DEFINED = "DB_DEFINED" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveColumnSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param key: + The value to assign to the key property of this SensitiveColumnSummary. + :type key: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this SensitiveColumnSummary. + :type sensitive_data_model_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveColumnSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param lifecycle_details: + The value to assign to the lifecycle_details property of this SensitiveColumnSummary. + :type lifecycle_details: str + + :param time_created: + The value to assign to the time_created property of this SensitiveColumnSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveColumnSummary. + :type time_updated: datetime + + :param app_name: + The value to assign to the app_name property of this SensitiveColumnSummary. + :type app_name: str + + :param schema_name: + The value to assign to the schema_name property of this SensitiveColumnSummary. + :type schema_name: str + + :param object_name: + The value to assign to the object_name property of this SensitiveColumnSummary. + :type object_name: str + + :param column_name: + The value to assign to the column_name property of this SensitiveColumnSummary. + :type column_name: str + + :param object_type: + The value to assign to the object_type property of this SensitiveColumnSummary. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type object_type: str + + :param data_type: + The value to assign to the data_type property of this SensitiveColumnSummary. + :type data_type: str + + :param status: + The value to assign to the status property of this SensitiveColumnSummary. + Allowed values for this property are: "VALID", "INVALID", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type status: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this SensitiveColumnSummary. + :type sensitive_type_id: str + + :param source: + The value to assign to the source property of this SensitiveColumnSummary. + Allowed values for this property are: "MANUAL", "DISCOVERY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param parent_column_keys: + The value to assign to the parent_column_keys property of this SensitiveColumnSummary. + :type parent_column_keys: list[str] + + :param relation_type: + The value to assign to the relation_type property of this SensitiveColumnSummary. + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type relation_type: str + + :param estimated_data_value_count: + The value to assign to the estimated_data_value_count property of this SensitiveColumnSummary. + :type estimated_data_value_count: int + + :param sample_data_values: + The value to assign to the sample_data_values property of this SensitiveColumnSummary. + :type sample_data_values: list[str] + + """ + self.swagger_types = { + 'key': 'str', + 'sensitive_data_model_id': 'str', + 'lifecycle_state': 'str', + 'lifecycle_details': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'app_name': 'str', + 'schema_name': 'str', + 'object_name': 'str', + 'column_name': 'str', + 'object_type': 'str', + 'data_type': 'str', + 'status': 'str', + 'sensitive_type_id': 'str', + 'source': 'str', + 'parent_column_keys': 'list[str]', + 'relation_type': 'str', + 'estimated_data_value_count': 'int', + 'sample_data_values': 'list[str]' + } + + self.attribute_map = { + 'key': 'key', + 'sensitive_data_model_id': 'sensitiveDataModelId', + 'lifecycle_state': 'lifecycleState', + 'lifecycle_details': 'lifecycleDetails', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'app_name': 'appName', + 'schema_name': 'schemaName', + 'object_name': 'objectName', + 'column_name': 'columnName', + 'object_type': 'objectType', + 'data_type': 'dataType', + 'status': 'status', + 'sensitive_type_id': 'sensitiveTypeId', + 'source': 'source', + 'parent_column_keys': 'parentColumnKeys', + 'relation_type': 'relationType', + 'estimated_data_value_count': 'estimatedDataValueCount', + 'sample_data_values': 'sampleDataValues' + } + + self._key = None + self._sensitive_data_model_id = None + self._lifecycle_state = None + self._lifecycle_details = None + self._time_created = None + self._time_updated = None + self._app_name = None + self._schema_name = None + self._object_name = None + self._column_name = None + self._object_type = None + self._data_type = None + self._status = None + self._sensitive_type_id = None + self._source = None + self._parent_column_keys = None + self._relation_type = None + self._estimated_data_value_count = None + self._sample_data_values = None + + @property + def key(self): + """ + **[Required]** Gets the key of this SensitiveColumnSummary. + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + + :return: The key of this SensitiveColumnSummary. + :rtype: str + """ + return self._key + + @key.setter + def key(self, key): + """ + Sets the key of this SensitiveColumnSummary. + The unique key that identifies the sensitive column. It's numeric and unique within a sensitive data model. + + + :param key: The key of this SensitiveColumnSummary. + :type: str + """ + self._key = key + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this SensitiveColumnSummary. + The OCID of the sensitive data model that contains the sensitive column. + + + :return: The sensitive_data_model_id of this SensitiveColumnSummary. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this SensitiveColumnSummary. + The OCID of the sensitive data model that contains the sensitive column. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this SensitiveColumnSummary. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SensitiveColumnSummary. + The current state of the sensitive column. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SensitiveColumnSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SensitiveColumnSummary. + The current state of the sensitive column. + + + :param lifecycle_state: The lifecycle_state of this SensitiveColumnSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def lifecycle_details(self): + """ + Gets the lifecycle_details of this SensitiveColumnSummary. + Details about the current state of the sensitive column. + + + :return: The lifecycle_details of this SensitiveColumnSummary. + :rtype: str + """ + return self._lifecycle_details + + @lifecycle_details.setter + def lifecycle_details(self, lifecycle_details): + """ + Sets the lifecycle_details of this SensitiveColumnSummary. + Details about the current state of the sensitive column. + + + :param lifecycle_details: The lifecycle_details of this SensitiveColumnSummary. + :type: str + """ + self._lifecycle_details = lifecycle_details + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SensitiveColumnSummary. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was created in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SensitiveColumnSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SensitiveColumnSummary. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was created in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SensitiveColumnSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SensitiveColumnSummary. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was last updated in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SensitiveColumnSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SensitiveColumnSummary. + The date and time, in the format defined by `RFC3339`__, + the sensitive column was last updated in the sensitive data model. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SensitiveColumnSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def app_name(self): + """ + **[Required]** Gets the app_name of this SensitiveColumnSummary. + The name of the application associated with the sensitive column. It's useful when the application name is + different from the schema name. Otherwise, it can be ignored. + + + :return: The app_name of this SensitiveColumnSummary. + :rtype: str + """ + return self._app_name + + @app_name.setter + def app_name(self, app_name): + """ + Sets the app_name of this SensitiveColumnSummary. + The name of the application associated with the sensitive column. It's useful when the application name is + different from the schema name. Otherwise, it can be ignored. + + + :param app_name: The app_name of this SensitiveColumnSummary. + :type: str + """ + self._app_name = app_name + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this SensitiveColumnSummary. + The database schema that contains the sensitive column. + + + :return: The schema_name of this SensitiveColumnSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this SensitiveColumnSummary. + The database schema that contains the sensitive column. + + + :param schema_name: The schema_name of this SensitiveColumnSummary. + :type: str + """ + self._schema_name = schema_name + + @property + def object_name(self): + """ + **[Required]** Gets the object_name of this SensitiveColumnSummary. + The database object that contains the sensitive column. + + + :return: The object_name of this SensitiveColumnSummary. + :rtype: str + """ + return self._object_name + + @object_name.setter + def object_name(self, object_name): + """ + Sets the object_name of this SensitiveColumnSummary. + The database object that contains the sensitive column. + + + :param object_name: The object_name of this SensitiveColumnSummary. + :type: str + """ + self._object_name = object_name + + @property + def column_name(self): + """ + **[Required]** Gets the column_name of this SensitiveColumnSummary. + The name of the sensitive column. + + + :return: The column_name of this SensitiveColumnSummary. + :rtype: str + """ + return self._column_name + + @column_name.setter + def column_name(self, column_name): + """ + Sets the column_name of this SensitiveColumnSummary. + The name of the sensitive column. + + + :param column_name: The column_name of this SensitiveColumnSummary. + :type: str + """ + self._column_name = column_name + + @property + def object_type(self): + """ + **[Required]** Gets the object_type of this SensitiveColumnSummary. + The type of the database object that contains the sensitive column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The object_type of this SensitiveColumnSummary. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this SensitiveColumnSummary. + The type of the database object that contains the sensitive column. + + + :param object_type: The object_type of this SensitiveColumnSummary. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + object_type = 'UNKNOWN_ENUM_VALUE' + self._object_type = object_type + + @property + def data_type(self): + """ + **[Required]** Gets the data_type of this SensitiveColumnSummary. + The data type of the sensitive column. + + + :return: The data_type of this SensitiveColumnSummary. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this SensitiveColumnSummary. + The data type of the sensitive column. + + + :param data_type: The data_type of this SensitiveColumnSummary. + :type: str + """ + self._data_type = data_type + + @property + def status(self): + """ + **[Required]** Gets the status of this SensitiveColumnSummary. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an + incremental data discovery job does not identify these columns as sensitive again. + + Allowed values for this property are: "VALID", "INVALID", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The status of this SensitiveColumnSummary. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this SensitiveColumnSummary. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an + incremental data discovery job does not identify these columns as sensitive again. + + + :param status: The status of this SensitiveColumnSummary. + :type: str + """ + allowed_values = ["VALID", "INVALID"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + status = 'UNKNOWN_ENUM_VALUE' + self._status = status + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this SensitiveColumnSummary. + The OCID of the sensitive type associated with the sensitive column. + + + :return: The sensitive_type_id of this SensitiveColumnSummary. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this SensitiveColumnSummary. + The OCID of the sensitive type associated with the sensitive column. + + + :param sensitive_type_id: The sensitive_type_id of this SensitiveColumnSummary. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def source(self): + """ + **[Required]** Gets the source of this SensitiveColumnSummary. + The source of the sensitive column. DISCOVERY indicates that the column was added to the sensitive data model + using a data discovery job. MANUAL indicates that the column was added manually. + + Allowed values for this property are: "MANUAL", "DISCOVERY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source of this SensitiveColumnSummary. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this SensitiveColumnSummary. + The source of the sensitive column. DISCOVERY indicates that the column was added to the sensitive data model + using a data discovery job. MANUAL indicates that the column was added manually. + + + :param source: The source of this SensitiveColumnSummary. + :type: str + """ + allowed_values = ["MANUAL", "DISCOVERY"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + source = 'UNKNOWN_ENUM_VALUE' + self._source = source + + @property + def parent_column_keys(self): + """ + Gets the parent_column_keys of this SensitiveColumnSummary. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :return: The parent_column_keys of this SensitiveColumnSummary. + :rtype: list[str] + """ + return self._parent_column_keys + + @parent_column_keys.setter + def parent_column_keys(self, parent_column_keys): + """ + Sets the parent_column_keys of this SensitiveColumnSummary. + Unique keys identifying the columns that are parents of the sensitive column. At present, it tracks a single parent only. + + + :param parent_column_keys: The parent_column_keys of this SensitiveColumnSummary. + :type: list[str] + """ + self._parent_column_keys = parent_column_keys + + @property + def relation_type(self): + """ + **[Required]** Gets the relation_type of this SensitiveColumnSummary. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the + sensitive column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database + dictionary. APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The relation_type of this SensitiveColumnSummary. + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """ + Sets the relation_type of this SensitiveColumnSummary. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the + sensitive column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database + dictionary. APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + + :param relation_type: The relation_type of this SensitiveColumnSummary. + :type: str + """ + allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + if not value_allowed_none_or_none_sentinel(relation_type, allowed_values): + relation_type = 'UNKNOWN_ENUM_VALUE' + self._relation_type = relation_type + + @property + def estimated_data_value_count(self): + """ + **[Required]** Gets the estimated_data_value_count of this SensitiveColumnSummary. + The estimated number of data values the column has in the associated database. + + + :return: The estimated_data_value_count of this SensitiveColumnSummary. + :rtype: int + """ + return self._estimated_data_value_count + + @estimated_data_value_count.setter + def estimated_data_value_count(self, estimated_data_value_count): + """ + Sets the estimated_data_value_count of this SensitiveColumnSummary. + The estimated number of data values the column has in the associated database. + + + :param estimated_data_value_count: The estimated_data_value_count of this SensitiveColumnSummary. + :type: int + """ + self._estimated_data_value_count = estimated_data_value_count + + @property + def sample_data_values(self): + """ + Gets the sample_data_values of this SensitiveColumnSummary. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :return: The sample_data_values of this SensitiveColumnSummary. + :rtype: list[str] + """ + return self._sample_data_values + + @sample_data_values.setter + def sample_data_values(self, sample_data_values): + """ + Sets the sample_data_values of this SensitiveColumnSummary. + Original data values collected for the sensitive column from the associated database. Sample data helps review + the column and ensure that it actually contains sensitive data. Note that sample data is retrieved by a data + discovery job only if the isSampleDataCollectionEnabled attribute is set to true. At present, only one data + value is collected per sensitive column. + + + :param sample_data_values: The sample_data_values of this SensitiveColumnSummary. + :type: list[str] + """ + self._sample_data_values = sample_data_values + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_data_model.py b/src/oci/data_safe/models/sensitive_data_model.py new file mode 100644 index 0000000000..ad00791c10 --- /dev/null +++ b/src/oci/data_safe/models/sensitive_data_model.py @@ -0,0 +1,684 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveDataModel(object): + """ + A sensitive data model is a collection of sensitive columns and their referential relationships. It helps + understand the sensitive data landscape, track changes, and efficiently enable security controls such as data + masking. It can be managed either manually or by performing sensitive data discovery on a reference target + database. `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-data-models1.html#GUID-849CA7D2-1809-40DD-B6D7-44E46EFF7EB5 + """ + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModel. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModel. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModel. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModel. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModel. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModel. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveDataModel 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 SensitiveDataModel. + :type id: str + + :param display_name: + The value to assign to the display_name property of this SensitiveDataModel. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this SensitiveDataModel. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this SensitiveDataModel. + :type target_id: str + + :param time_created: + The value to assign to the time_created property of this SensitiveDataModel. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveDataModel. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveDataModel. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param app_suite_name: + The value to assign to the app_suite_name property of this SensitiveDataModel. + :type app_suite_name: str + + :param description: + The value to assign to the description property of this SensitiveDataModel. + :type description: str + + :param schemas_for_discovery: + The value to assign to the schemas_for_discovery property of this SensitiveDataModel. + :type schemas_for_discovery: list[str] + + :param sensitive_type_ids_for_discovery: + The value to assign to the sensitive_type_ids_for_discovery property of this SensitiveDataModel. + :type sensitive_type_ids_for_discovery: list[str] + + :param is_sample_data_collection_enabled: + The value to assign to the is_sample_data_collection_enabled property of this SensitiveDataModel. + :type is_sample_data_collection_enabled: bool + + :param is_app_defined_relation_discovery_enabled: + The value to assign to the is_app_defined_relation_discovery_enabled property of this SensitiveDataModel. + :type is_app_defined_relation_discovery_enabled: bool + + :param is_include_all_schemas: + The value to assign to the is_include_all_schemas property of this SensitiveDataModel. + :type is_include_all_schemas: bool + + :param is_include_all_sensitive_types: + The value to assign to the is_include_all_sensitive_types property of this SensitiveDataModel. + :type is_include_all_sensitive_types: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this SensitiveDataModel. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SensitiveDataModel. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this SensitiveDataModel. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'app_suite_name': 'str', + 'description': 'str', + 'schemas_for_discovery': 'list[str]', + 'sensitive_type_ids_for_discovery': 'list[str]', + 'is_sample_data_collection_enabled': 'bool', + 'is_app_defined_relation_discovery_enabled': 'bool', + 'is_include_all_schemas': 'bool', + 'is_include_all_sensitive_types': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'app_suite_name': 'appSuiteName', + 'description': 'description', + 'schemas_for_discovery': 'schemasForDiscovery', + 'sensitive_type_ids_for_discovery': 'sensitiveTypeIdsForDiscovery', + 'is_sample_data_collection_enabled': 'isSampleDataCollectionEnabled', + 'is_app_defined_relation_discovery_enabled': 'isAppDefinedRelationDiscoveryEnabled', + 'is_include_all_schemas': 'isIncludeAllSchemas', + 'is_include_all_sensitive_types': 'isIncludeAllSensitiveTypes', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._target_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._app_suite_name = None + self._description = None + self._schemas_for_discovery = None + self._sensitive_type_ids_for_discovery = None + self._is_sample_data_collection_enabled = None + self._is_app_defined_relation_discovery_enabled = None + self._is_include_all_schemas = None + self._is_include_all_sensitive_types = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SensitiveDataModel. + The OCID of the sensitive data model. + + + :return: The id of this SensitiveDataModel. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SensitiveDataModel. + The OCID of the sensitive data model. + + + :param id: The id of this SensitiveDataModel. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this SensitiveDataModel. + The display name of the sensitive data model. + + + :return: The display_name of this SensitiveDataModel. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this SensitiveDataModel. + The display name of the sensitive data model. + + + :param display_name: The display_name of this SensitiveDataModel. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SensitiveDataModel. + The OCID of the compartment that contains the sensitive data model. + + + :return: The compartment_id of this SensitiveDataModel. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SensitiveDataModel. + The OCID of the compartment that contains the sensitive data model. + + + :param compartment_id: The compartment_id of this SensitiveDataModel. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this SensitiveDataModel. + The OCID of the reference target database associated with the sensitive data model. All operations such as + performing data discovery and adding columns manually are done in the context of the associated target database. + + + :return: The target_id of this SensitiveDataModel. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this SensitiveDataModel. + The OCID of the reference target database associated with the sensitive data model. All operations such as + performing data discovery and adding columns manually are done in the context of the associated target database. + + + :param target_id: The target_id of this SensitiveDataModel. + :type: str + """ + self._target_id = target_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SensitiveDataModel. + The date and time the sensitive data model was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SensitiveDataModel. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SensitiveDataModel. + The date and time the sensitive data model was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SensitiveDataModel. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SensitiveDataModel. + The date and time the sensitive data model was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SensitiveDataModel. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SensitiveDataModel. + The date and time the sensitive data model was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SensitiveDataModel. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SensitiveDataModel. + The current state of the sensitive data model. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SensitiveDataModel. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SensitiveDataModel. + The current state of the sensitive data model. + + + :param lifecycle_state: The lifecycle_state of this SensitiveDataModel. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def app_suite_name(self): + """ + **[Required]** Gets the app_suite_name of this SensitiveDataModel. + The application suite name identifying a collection of applications. The default value is GENERIC. It's useful + only if maintaining a sensitive data model for a suite of applications. + + + :return: The app_suite_name of this SensitiveDataModel. + :rtype: str + """ + return self._app_suite_name + + @app_suite_name.setter + def app_suite_name(self, app_suite_name): + """ + Sets the app_suite_name of this SensitiveDataModel. + The application suite name identifying a collection of applications. The default value is GENERIC. It's useful + only if maintaining a sensitive data model for a suite of applications. + + + :param app_suite_name: The app_suite_name of this SensitiveDataModel. + :type: str + """ + self._app_suite_name = app_suite_name + + @property + def description(self): + """ + Gets the description of this SensitiveDataModel. + The description of the sensitive data model. + + + :return: The description of this SensitiveDataModel. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SensitiveDataModel. + The description of the sensitive data model. + + + :param description: The description of this SensitiveDataModel. + :type: str + """ + self._description = description + + @property + def schemas_for_discovery(self): + """ + Gets the schemas_for_discovery of this SensitiveDataModel. + The schemas to be scanned by data discovery jobs. + + + :return: The schemas_for_discovery of this SensitiveDataModel. + :rtype: list[str] + """ + return self._schemas_for_discovery + + @schemas_for_discovery.setter + def schemas_for_discovery(self, schemas_for_discovery): + """ + Sets the schemas_for_discovery of this SensitiveDataModel. + The schemas to be scanned by data discovery jobs. + + + :param schemas_for_discovery: The schemas_for_discovery of this SensitiveDataModel. + :type: list[str] + """ + self._schemas_for_discovery = schemas_for_discovery + + @property + def sensitive_type_ids_for_discovery(self): + """ + Gets the sensitive_type_ids_for_discovery of this SensitiveDataModel. + The OCIDs of the sensitive types to be used by data discovery jobs. + + + :return: The sensitive_type_ids_for_discovery of this SensitiveDataModel. + :rtype: list[str] + """ + return self._sensitive_type_ids_for_discovery + + @sensitive_type_ids_for_discovery.setter + def sensitive_type_ids_for_discovery(self, sensitive_type_ids_for_discovery): + """ + Sets the sensitive_type_ids_for_discovery of this SensitiveDataModel. + The OCIDs of the sensitive types to be used by data discovery jobs. + + + :param sensitive_type_ids_for_discovery: The sensitive_type_ids_for_discovery of this SensitiveDataModel. + :type: list[str] + """ + self._sensitive_type_ids_for_discovery = sensitive_type_ids_for_discovery + + @property + def is_sample_data_collection_enabled(self): + """ + **[Required]** Gets the is_sample_data_collection_enabled of this SensitiveDataModel. + Indicates if data discovery jobs should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only if + it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values + are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :return: The is_sample_data_collection_enabled of this SensitiveDataModel. + :rtype: bool + """ + return self._is_sample_data_collection_enabled + + @is_sample_data_collection_enabled.setter + def is_sample_data_collection_enabled(self, is_sample_data_collection_enabled): + """ + Sets the is_sample_data_collection_enabled of this SensitiveDataModel. + Indicates if data discovery jobs should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only if + it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data values + are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :param is_sample_data_collection_enabled: The is_sample_data_collection_enabled of this SensitiveDataModel. + :type: bool + """ + self._is_sample_data_collection_enabled = is_sample_data_collection_enabled + + @property + def is_app_defined_relation_discovery_enabled(self): + """ + **[Required]** Gets the is_app_defined_relation_discovery_enabled of this SensitiveDataModel. + Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential + relationships between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) + relationships. This option helps identify application-level relationships that are not defined in the database dictionary, + which in turn, helps identify additional sensitive columns and preserve referential integrity during data masking. + It's disabled by default and should be used only if there is a need to identify application-level relationships. + + + :return: The is_app_defined_relation_discovery_enabled of this SensitiveDataModel. + :rtype: bool + """ + return self._is_app_defined_relation_discovery_enabled + + @is_app_defined_relation_discovery_enabled.setter + def is_app_defined_relation_discovery_enabled(self, is_app_defined_relation_discovery_enabled): + """ + Sets the is_app_defined_relation_discovery_enabled of this SensitiveDataModel. + Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential + relationships between columns. Note that data discovery automatically identifies and adds database-level (dictionary-defined) + relationships. This option helps identify application-level relationships that are not defined in the database dictionary, + which in turn, helps identify additional sensitive columns and preserve referential integrity during data masking. + It's disabled by default and should be used only if there is a need to identify application-level relationships. + + + :param is_app_defined_relation_discovery_enabled: The is_app_defined_relation_discovery_enabled of this SensitiveDataModel. + :type: bool + """ + self._is_app_defined_relation_discovery_enabled = is_app_defined_relation_discovery_enabled + + @property + def is_include_all_schemas(self): + """ + **[Required]** Gets the is_include_all_schemas of this SensitiveDataModel. + Indicates if all the schemas in the associated target database should be scanned by data discovery jobs. + If it's set to true, the schemasForDiscovery attribute is ignored and all schemas are used for data discovery. + + + :return: The is_include_all_schemas of this SensitiveDataModel. + :rtype: bool + """ + return self._is_include_all_schemas + + @is_include_all_schemas.setter + def is_include_all_schemas(self, is_include_all_schemas): + """ + Sets the is_include_all_schemas of this SensitiveDataModel. + Indicates if all the schemas in the associated target database should be scanned by data discovery jobs. + If it's set to true, the schemasForDiscovery attribute is ignored and all schemas are used for data discovery. + + + :param is_include_all_schemas: The is_include_all_schemas of this SensitiveDataModel. + :type: bool + """ + self._is_include_all_schemas = is_include_all_schemas + + @property + def is_include_all_sensitive_types(self): + """ + **[Required]** Gets the is_include_all_sensitive_types of this SensitiveDataModel. + Indicates if all the existing sensitive types should be used by data discovery jobs.If it's set to true, the + sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. + + + :return: The is_include_all_sensitive_types of this SensitiveDataModel. + :rtype: bool + """ + return self._is_include_all_sensitive_types + + @is_include_all_sensitive_types.setter + def is_include_all_sensitive_types(self, is_include_all_sensitive_types): + """ + Sets the is_include_all_sensitive_types of this SensitiveDataModel. + Indicates if all the existing sensitive types should be used by data discovery jobs.If it's set to true, the + sensitiveTypeIdsForDiscovery attribute is ignored and all sensitive types are used for data discovery. + + + :param is_include_all_sensitive_types: The is_include_all_sensitive_types of this SensitiveDataModel. + :type: bool + """ + self._is_include_all_sensitive_types = is_include_all_sensitive_types + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SensitiveDataModel. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SensitiveDataModel. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SensitiveDataModel. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SensitiveDataModel. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SensitiveDataModel. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SensitiveDataModel. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SensitiveDataModel. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SensitiveDataModel. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this SensitiveDataModel. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this SensitiveDataModel. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this SensitiveDataModel. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this SensitiveDataModel. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_data_model_collection.py b/src/oci/data_safe/models/sensitive_data_model_collection.py new file mode 100644 index 0000000000..d4ae2ebfdf --- /dev/null +++ b/src/oci/data_safe/models/sensitive_data_model_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveDataModelCollection(object): + """ + A collection of sensitive data model summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveDataModelCollection 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 SensitiveDataModelCollection. + :type items: list[oci.data_safe.models.SensitiveDataModelSummary] + + """ + self.swagger_types = { + 'items': 'list[SensitiveDataModelSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SensitiveDataModelCollection. + An array of sensitive data model summary objects. + + + :return: The items of this SensitiveDataModelCollection. + :rtype: list[oci.data_safe.models.SensitiveDataModelSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SensitiveDataModelCollection. + An array of sensitive data model summary objects. + + + :param items: The items of this SensitiveDataModelCollection. + :type: list[oci.data_safe.models.SensitiveDataModelSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_data_model_summary.py b/src/oci/data_safe/models/sensitive_data_model_summary.py new file mode 100644 index 0000000000..f5ce3e7cef --- /dev/null +++ b/src/oci/data_safe/models/sensitive_data_model_summary.py @@ -0,0 +1,440 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveDataModelSummary(object): + """ + Summary of a sensitive data model. + """ + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModelSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModelSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModelSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModelSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModelSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SensitiveDataModelSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveDataModelSummary 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 SensitiveDataModelSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this SensitiveDataModelSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this SensitiveDataModelSummary. + :type compartment_id: str + + :param target_id: + The value to assign to the target_id property of this SensitiveDataModelSummary. + :type target_id: str + + :param time_created: + The value to assign to the time_created property of this SensitiveDataModelSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveDataModelSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveDataModelSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param app_suite_name: + The value to assign to the app_suite_name property of this SensitiveDataModelSummary. + :type app_suite_name: str + + :param description: + The value to assign to the description property of this SensitiveDataModelSummary. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SensitiveDataModelSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SensitiveDataModelSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'target_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'app_suite_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'target_id': 'targetId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'app_suite_name': 'appSuiteName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._target_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._app_suite_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SensitiveDataModelSummary. + The OCID of the sensitive data model. + + + :return: The id of this SensitiveDataModelSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SensitiveDataModelSummary. + The OCID of the sensitive data model. + + + :param id: The id of this SensitiveDataModelSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this SensitiveDataModelSummary. + The display name of the sensitive data model. + + + :return: The display_name of this SensitiveDataModelSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this SensitiveDataModelSummary. + The display name of the sensitive data model. + + + :param display_name: The display_name of this SensitiveDataModelSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SensitiveDataModelSummary. + The OCID of the compartment that contains the sensitive data model. + + + :return: The compartment_id of this SensitiveDataModelSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SensitiveDataModelSummary. + The OCID of the compartment that contains the sensitive data model. + + + :param compartment_id: The compartment_id of this SensitiveDataModelSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this SensitiveDataModelSummary. + The OCID of the reference target database associated with the sensitive data model. All operations such as + performing data discovery and adding columns manually are done in the context of the associated target database. + + + :return: The target_id of this SensitiveDataModelSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this SensitiveDataModelSummary. + The OCID of the reference target database associated with the sensitive data model. All operations such as + performing data discovery and adding columns manually are done in the context of the associated target database. + + + :param target_id: The target_id of this SensitiveDataModelSummary. + :type: str + """ + self._target_id = target_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SensitiveDataModelSummary. + The date and time the sensitive data model was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SensitiveDataModelSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SensitiveDataModelSummary. + The date and time the sensitive data model was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SensitiveDataModelSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SensitiveDataModelSummary. + The date and time the sensitive data model was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SensitiveDataModelSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SensitiveDataModelSummary. + The date and time the sensitive data model was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SensitiveDataModelSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SensitiveDataModelSummary. + The current state of the sensitive data model. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SensitiveDataModelSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SensitiveDataModelSummary. + The current state of the sensitive data model. + + + :param lifecycle_state: The lifecycle_state of this SensitiveDataModelSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def app_suite_name(self): + """ + **[Required]** Gets the app_suite_name of this SensitiveDataModelSummary. + The application suite name identifying a collection of applications. The default value is GENERIC. It's useful + only if maintaining a sensitive data model for a suite of applications. + + + :return: The app_suite_name of this SensitiveDataModelSummary. + :rtype: str + """ + return self._app_suite_name + + @app_suite_name.setter + def app_suite_name(self, app_suite_name): + """ + Sets the app_suite_name of this SensitiveDataModelSummary. + The application suite name identifying a collection of applications. The default value is GENERIC. It's useful + only if maintaining a sensitive data model for a suite of applications. + + + :param app_suite_name: The app_suite_name of this SensitiveDataModelSummary. + :type: str + """ + self._app_suite_name = app_suite_name + + @property + def description(self): + """ + Gets the description of this SensitiveDataModelSummary. + The description of the sensitive data model. + + + :return: The description of this SensitiveDataModelSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SensitiveDataModelSummary. + The description of the sensitive data model. + + + :param description: The description of this SensitiveDataModelSummary. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SensitiveDataModelSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SensitiveDataModelSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SensitiveDataModelSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SensitiveDataModelSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SensitiveDataModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SensitiveDataModelSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SensitiveDataModelSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SensitiveDataModelSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_type.py b/src/oci/data_safe/models/sensitive_type.py new file mode 100644 index 0000000000..f0659af102 --- /dev/null +++ b/src/oci/data_safe/models/sensitive_type.py @@ -0,0 +1,590 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveType(object): + """ + A sensitive type defines a particular type or class of sensitive data. It can be a basic sensitive type with regular + expressions or a sensitive category. While sensitive types are used for data discovery, sensitive categories are used + for logically grouping the related or similar sensitive types. `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-45A5A3CB-5B67-4C75-9ACC-DD511D14E7C4 + """ + + #: A constant which can be used with the entity_type property of a SensitiveType. + #: This constant has a value of "SENSITIVE_TYPE" + ENTITY_TYPE_SENSITIVE_TYPE = "SENSITIVE_TYPE" + + #: A constant which can be used with the entity_type property of a SensitiveType. + #: This constant has a value of "SENSITIVE_CATEGORY" + ENTITY_TYPE_SENSITIVE_CATEGORY = "SENSITIVE_CATEGORY" + + #: A constant which can be used with the lifecycle_state property of a SensitiveType. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveType. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SensitiveType. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveType. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveType. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SensitiveType. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the source property of a SensitiveType. + #: This constant has a value of "ORACLE" + SOURCE_ORACLE = "ORACLE" + + #: A constant which can be used with the source property of a SensitiveType. + #: This constant has a value of "USER" + SOURCE_USER = "USER" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveType object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.SensitiveTypePattern` + * :class:`~oci.data_safe.models.SensitiveCategory` + + 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 SensitiveType. + :type id: str + + :param entity_type: + The value to assign to the entity_type property of this SensitiveType. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this SensitiveType. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this SensitiveType. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveType. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param short_name: + The value to assign to the short_name property of this SensitiveType. + :type short_name: str + + :param source: + The value to assign to the source property of this SensitiveType. + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param time_created: + The value to assign to the time_created property of this SensitiveType. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveType. + :type time_updated: datetime + + :param description: + The value to assign to the description property of this SensitiveType. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this SensitiveType. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SensitiveType. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SensitiveType. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this SensitiveType. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'entity_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'short_name': 'str', + 'source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'short_name': 'shortName', + 'source': 'source', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._entity_type = None + self._display_name = None + self._compartment_id = None + self._lifecycle_state = None + self._short_name = None + self._source = None + self._time_created = None + self._time_updated = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entityType'] + + if type == 'SENSITIVE_TYPE': + return 'SensitiveTypePattern' + + if type == 'SENSITIVE_CATEGORY': + return 'SensitiveCategory' + else: + return 'SensitiveType' + + @property + def id(self): + """ + **[Required]** Gets the id of this SensitiveType. + The OCID of the sensitive type. + + + :return: The id of this SensitiveType. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SensitiveType. + The OCID of the sensitive type. + + + :param id: The id of this SensitiveType. + :type: str + """ + self._id = id + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this SensitiveType. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this SensitiveType. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this SensitiveType. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + + :param entity_type: The entity_type of this SensitiveType. + :type: str + """ + allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this SensitiveType. + The display name of the sensitive type. + + + :return: The display_name of this SensitiveType. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this SensitiveType. + The display name of the sensitive type. + + + :param display_name: The display_name of this SensitiveType. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SensitiveType. + The OCID of the compartment that contains the sensitive type. + + + :return: The compartment_id of this SensitiveType. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SensitiveType. + The OCID of the compartment that contains the sensitive type. + + + :param compartment_id: The compartment_id of this SensitiveType. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SensitiveType. + The current state of the sensitive type. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SensitiveType. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SensitiveType. + The current state of the sensitive type. + + + :param lifecycle_state: The lifecycle_state of this SensitiveType. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def short_name(self): + """ + Gets the short_name of this SensitiveType. + The short name of the sensitive type. + + + :return: The short_name of this SensitiveType. + :rtype: str + """ + return self._short_name + + @short_name.setter + def short_name(self, short_name): + """ + Sets the short_name of this SensitiveType. + The short name of the sensitive type. + + + :param short_name: The short_name of this SensitiveType. + :type: str + """ + self._short_name = short_name + + @property + def source(self): + """ + **[Required]** Gets the source of this SensitiveType. + Specifies whether the sensitive type is user-defined or predefined. + + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source of this SensitiveType. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this SensitiveType. + Specifies whether the sensitive type is user-defined or predefined. + + + :param source: The source of this SensitiveType. + :type: str + """ + allowed_values = ["ORACLE", "USER"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + source = 'UNKNOWN_ENUM_VALUE' + self._source = source + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SensitiveType. + The date and time the sensitive type was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SensitiveType. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SensitiveType. + The date and time the sensitive type was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SensitiveType. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SensitiveType. + The date and time the sensitive type was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SensitiveType. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SensitiveType. + The date and time the sensitive type was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SensitiveType. + :type: datetime + """ + self._time_updated = time_updated + + @property + def description(self): + """ + Gets the description of this SensitiveType. + The description of the sensitive type. + + + :return: The description of this SensitiveType. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SensitiveType. + The description of the sensitive type. + + + :param description: The description of this SensitiveType. + :type: str + """ + self._description = description + + @property + def parent_category_id(self): + """ + Gets the parent_category_id of this SensitiveType. + The OCID of the parent sensitive category. + + + :return: The parent_category_id of this SensitiveType. + :rtype: str + """ + return self._parent_category_id + + @parent_category_id.setter + def parent_category_id(self, parent_category_id): + """ + Sets the parent_category_id of this SensitiveType. + The OCID of the parent sensitive category. + + + :param parent_category_id: The parent_category_id of this SensitiveType. + :type: str + """ + self._parent_category_id = parent_category_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SensitiveType. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SensitiveType. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SensitiveType. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SensitiveType. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SensitiveType. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SensitiveType. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SensitiveType. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SensitiveType. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this SensitiveType. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this SensitiveType. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this SensitiveType. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this SensitiveType. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_type_collection.py b/src/oci/data_safe/models/sensitive_type_collection.py new file mode 100644 index 0000000000..926bd9becc --- /dev/null +++ b/src/oci/data_safe/models/sensitive_type_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveTypeCollection(object): + """ + A collection of sensitive type summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveTypeCollection 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 SensitiveTypeCollection. + :type items: list[oci.data_safe.models.SensitiveTypeSummary] + + """ + self.swagger_types = { + 'items': 'list[SensitiveTypeSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this SensitiveTypeCollection. + An array of sensitive type summary objects. + + + :return: The items of this SensitiveTypeCollection. + :rtype: list[oci.data_safe.models.SensitiveTypeSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this SensitiveTypeCollection. + An array of sensitive type summary objects. + + + :param items: The items of this SensitiveTypeCollection. + :type: list[oci.data_safe.models.SensitiveTypeSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_type_pattern.py b/src/oci/data_safe/models/sensitive_type_pattern.py new file mode 100644 index 0000000000..3108681602 --- /dev/null +++ b/src/oci/data_safe/models/sensitive_type_pattern.py @@ -0,0 +1,322 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .sensitive_type import SensitiveType +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveTypePattern(SensitiveType): + """ + Details of the sensitive type. + """ + + #: A constant which can be used with the search_type property of a SensitiveTypePattern. + #: This constant has a value of "OR" + SEARCH_TYPE_OR = "OR" + + #: A constant which can be used with the search_type property of a SensitiveTypePattern. + #: This constant has a value of "AND" + SEARCH_TYPE_AND = "AND" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveTypePattern object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.SensitiveTypePattern.entity_type` attribute + of this class is ``SENSITIVE_TYPE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param id: + The value to assign to the id property of this SensitiveTypePattern. + :type id: str + + :param entity_type: + The value to assign to the entity_type property of this SensitiveTypePattern. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this SensitiveTypePattern. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this SensitiveTypePattern. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveTypePattern. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param short_name: + The value to assign to the short_name property of this SensitiveTypePattern. + :type short_name: str + + :param source: + The value to assign to the source property of this SensitiveTypePattern. + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param time_created: + The value to assign to the time_created property of this SensitiveTypePattern. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveTypePattern. + :type time_updated: datetime + + :param description: + The value to assign to the description property of this SensitiveTypePattern. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this SensitiveTypePattern. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SensitiveTypePattern. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SensitiveTypePattern. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this SensitiveTypePattern. + :type system_tags: dict(str, dict(str, object)) + + :param name_pattern: + The value to assign to the name_pattern property of this SensitiveTypePattern. + :type name_pattern: str + + :param comment_pattern: + The value to assign to the comment_pattern property of this SensitiveTypePattern. + :type comment_pattern: str + + :param data_pattern: + The value to assign to the data_pattern property of this SensitiveTypePattern. + :type data_pattern: str + + :param search_type: + The value to assign to the search_type property of this SensitiveTypePattern. + Allowed values for this property are: "OR", "AND", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type search_type: str + + :param default_masking_format_id: + The value to assign to the default_masking_format_id property of this SensitiveTypePattern. + :type default_masking_format_id: str + + """ + self.swagger_types = { + 'id': 'str', + 'entity_type': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'short_name': 'str', + 'source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))', + 'name_pattern': 'str', + 'comment_pattern': 'str', + 'data_pattern': 'str', + 'search_type': 'str', + 'default_masking_format_id': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'short_name': 'shortName', + 'source': 'source', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags', + 'name_pattern': 'namePattern', + 'comment_pattern': 'commentPattern', + 'data_pattern': 'dataPattern', + 'search_type': 'searchType', + 'default_masking_format_id': 'defaultMaskingFormatId' + } + + self._id = None + self._entity_type = None + self._display_name = None + self._compartment_id = None + self._lifecycle_state = None + self._short_name = None + self._source = None + self._time_created = None + self._time_updated = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + self._name_pattern = None + self._comment_pattern = None + self._data_pattern = None + self._search_type = None + self._default_masking_format_id = None + self._entity_type = 'SENSITIVE_TYPE' + + @property + def name_pattern(self): + """ + Gets the name_pattern of this SensitiveTypePattern. + A regular expression to be used by data discovery for matching column names. + + + :return: The name_pattern of this SensitiveTypePattern. + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """ + Sets the name_pattern of this SensitiveTypePattern. + A regular expression to be used by data discovery for matching column names. + + + :param name_pattern: The name_pattern of this SensitiveTypePattern. + :type: str + """ + self._name_pattern = name_pattern + + @property + def comment_pattern(self): + """ + Gets the comment_pattern of this SensitiveTypePattern. + A regular expression to be used by data discovery for matching column comments. + + + :return: The comment_pattern of this SensitiveTypePattern. + :rtype: str + """ + return self._comment_pattern + + @comment_pattern.setter + def comment_pattern(self, comment_pattern): + """ + Sets the comment_pattern of this SensitiveTypePattern. + A regular expression to be used by data discovery for matching column comments. + + + :param comment_pattern: The comment_pattern of this SensitiveTypePattern. + :type: str + """ + self._comment_pattern = comment_pattern + + @property + def data_pattern(self): + """ + Gets the data_pattern of this SensitiveTypePattern. + A regular expression to be used by data discovery for matching column data values. + + + :return: The data_pattern of this SensitiveTypePattern. + :rtype: str + """ + return self._data_pattern + + @data_pattern.setter + def data_pattern(self, data_pattern): + """ + Sets the data_pattern of this SensitiveTypePattern. + A regular expression to be used by data discovery for matching column data values. + + + :param data_pattern: The data_pattern of this SensitiveTypePattern. + :type: str + """ + self._data_pattern = data_pattern + + @property + def search_type(self): + """ + Gets the search_type of this SensitiveTypePattern. + The search type indicating how the column name, comment and data patterns should be used by data discovery. + `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC + + Allowed values for this property are: "OR", "AND", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The search_type of this SensitiveTypePattern. + :rtype: str + """ + return self._search_type + + @search_type.setter + def search_type(self, search_type): + """ + Sets the search_type of this SensitiveTypePattern. + The search type indicating how the column name, comment and data patterns should be used by data discovery. + `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC + + + :param search_type: The search_type of this SensitiveTypePattern. + :type: str + """ + allowed_values = ["OR", "AND"] + if not value_allowed_none_or_none_sentinel(search_type, allowed_values): + search_type = 'UNKNOWN_ENUM_VALUE' + self._search_type = search_type + + @property + def default_masking_format_id(self): + """ + Gets the default_masking_format_id of this SensitiveTypePattern. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :return: The default_masking_format_id of this SensitiveTypePattern. + :rtype: str + """ + return self._default_masking_format_id + + @default_masking_format_id.setter + def default_masking_format_id(self, default_masking_format_id): + """ + Sets the default_masking_format_id of this SensitiveTypePattern. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :param default_masking_format_id: The default_masking_format_id of this SensitiveTypePattern. + :type: str + """ + self._default_masking_format_id = default_masking_format_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sensitive_type_summary.py b/src/oci/data_safe/models/sensitive_type_summary.py new file mode 100644 index 0000000000..d054bf81fc --- /dev/null +++ b/src/oci/data_safe/models/sensitive_type_summary.py @@ -0,0 +1,563 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SensitiveTypeSummary(object): + """ + Summary of a sensitive type. + """ + + #: A constant which can be used with the lifecycle_state property of a SensitiveTypeSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveTypeSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a SensitiveTypeSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveTypeSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a SensitiveTypeSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a SensitiveTypeSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + #: A constant which can be used with the source property of a SensitiveTypeSummary. + #: This constant has a value of "ORACLE" + SOURCE_ORACLE = "ORACLE" + + #: A constant which can be used with the source property of a SensitiveTypeSummary. + #: This constant has a value of "USER" + SOURCE_USER = "USER" + + #: A constant which can be used with the entity_type property of a SensitiveTypeSummary. + #: This constant has a value of "SENSITIVE_TYPE" + ENTITY_TYPE_SENSITIVE_TYPE = "SENSITIVE_TYPE" + + #: A constant which can be used with the entity_type property of a SensitiveTypeSummary. + #: This constant has a value of "SENSITIVE_CATEGORY" + ENTITY_TYPE_SENSITIVE_CATEGORY = "SENSITIVE_CATEGORY" + + def __init__(self, **kwargs): + """ + Initializes a new SensitiveTypeSummary 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 SensitiveTypeSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this SensitiveTypeSummary. + :type display_name: str + + :param compartment_id: + The value to assign to the compartment_id property of this SensitiveTypeSummary. + :type compartment_id: str + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this SensitiveTypeSummary. + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param short_name: + The value to assign to the short_name property of this SensitiveTypeSummary. + :type short_name: str + + :param source: + The value to assign to the source property of this SensitiveTypeSummary. + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type source: str + + :param time_created: + The value to assign to the time_created property of this SensitiveTypeSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this SensitiveTypeSummary. + :type time_updated: datetime + + :param description: + The value to assign to the description property of this SensitiveTypeSummary. + :type description: str + + :param entity_type: + The value to assign to the entity_type property of this SensitiveTypeSummary. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type entity_type: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this SensitiveTypeSummary. + :type parent_category_id: str + + :param default_masking_format_id: + The value to assign to the default_masking_format_id property of this SensitiveTypeSummary. + :type default_masking_format_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this SensitiveTypeSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this SensitiveTypeSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'compartment_id': 'str', + 'lifecycle_state': 'str', + 'short_name': 'str', + 'source': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'description': 'str', + 'entity_type': 'str', + 'parent_category_id': 'str', + 'default_masking_format_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'compartment_id': 'compartmentId', + 'lifecycle_state': 'lifecycleState', + 'short_name': 'shortName', + 'source': 'source', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'description': 'description', + 'entity_type': 'entityType', + 'parent_category_id': 'parentCategoryId', + 'default_masking_format_id': 'defaultMaskingFormatId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._compartment_id = None + self._lifecycle_state = None + self._short_name = None + self._source = None + self._time_created = None + self._time_updated = None + self._description = None + self._entity_type = None + self._parent_category_id = None + self._default_masking_format_id = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this SensitiveTypeSummary. + The OCID of the sensitive type. + + + :return: The id of this SensitiveTypeSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this SensitiveTypeSummary. + The OCID of the sensitive type. + + + :param id: The id of this SensitiveTypeSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this SensitiveTypeSummary. + The display name of the sensitive type. + + + :return: The display_name of this SensitiveTypeSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this SensitiveTypeSummary. + The display name of the sensitive type. + + + :param display_name: The display_name of this SensitiveTypeSummary. + :type: str + """ + self._display_name = display_name + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this SensitiveTypeSummary. + The OCID of the compartment that contains the sensitive type. + + + :return: The compartment_id of this SensitiveTypeSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this SensitiveTypeSummary. + The OCID of the compartment that contains the sensitive type. + + + :param compartment_id: The compartment_id of this SensitiveTypeSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this SensitiveTypeSummary. + The current state of the sensitive type. + + Allowed values for this property are: "CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this SensitiveTypeSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this SensitiveTypeSummary. + The current state of the sensitive type. + + + :param lifecycle_state: The lifecycle_state of this SensitiveTypeSummary. + :type: str + """ + allowed_values = ["CREATING", "ACTIVE", "UPDATING", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def short_name(self): + """ + Gets the short_name of this SensitiveTypeSummary. + The short name of the sensitive type. + + + :return: The short_name of this SensitiveTypeSummary. + :rtype: str + """ + return self._short_name + + @short_name.setter + def short_name(self, short_name): + """ + Sets the short_name of this SensitiveTypeSummary. + The short name of the sensitive type. + + + :param short_name: The short_name of this SensitiveTypeSummary. + :type: str + """ + self._short_name = short_name + + @property + def source(self): + """ + **[Required]** Gets the source of this SensitiveTypeSummary. + Specifies whether the sensitive type is user-defined or predefined. + + Allowed values for this property are: "ORACLE", "USER", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The source of this SensitiveTypeSummary. + :rtype: str + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this SensitiveTypeSummary. + Specifies whether the sensitive type is user-defined or predefined. + + + :param source: The source of this SensitiveTypeSummary. + :type: str + """ + allowed_values = ["ORACLE", "USER"] + if not value_allowed_none_or_none_sentinel(source, allowed_values): + source = 'UNKNOWN_ENUM_VALUE' + self._source = source + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this SensitiveTypeSummary. + The date and time the sensitive type was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this SensitiveTypeSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this SensitiveTypeSummary. + The date and time the sensitive type was created, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this SensitiveTypeSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this SensitiveTypeSummary. + The date and time the sensitive type was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this SensitiveTypeSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this SensitiveTypeSummary. + The date and time the sensitive type was last updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this SensitiveTypeSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def description(self): + """ + Gets the description of this SensitiveTypeSummary. + The description of the sensitive type. + + + :return: The description of this SensitiveTypeSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this SensitiveTypeSummary. + The description of the sensitive type. + + + :param description: The description of this SensitiveTypeSummary. + :type: str + """ + self._description = description + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this SensitiveTypeSummary. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The entity_type of this SensitiveTypeSummary. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this SensitiveTypeSummary. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + + :param entity_type: The entity_type of this SensitiveTypeSummary. + :type: str + """ + allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + entity_type = 'UNKNOWN_ENUM_VALUE' + self._entity_type = entity_type + + @property + def parent_category_id(self): + """ + Gets the parent_category_id of this SensitiveTypeSummary. + The OCID of the parent sensitive category. + + + :return: The parent_category_id of this SensitiveTypeSummary. + :rtype: str + """ + return self._parent_category_id + + @parent_category_id.setter + def parent_category_id(self, parent_category_id): + """ + Sets the parent_category_id of this SensitiveTypeSummary. + The OCID of the parent sensitive category. + + + :param parent_category_id: The parent_category_id of this SensitiveTypeSummary. + :type: str + """ + self._parent_category_id = parent_category_id + + @property + def default_masking_format_id(self): + """ + Gets the default_masking_format_id of this SensitiveTypeSummary. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :return: The default_masking_format_id of this SensitiveTypeSummary. + :rtype: str + """ + return self._default_masking_format_id + + @default_masking_format_id.setter + def default_masking_format_id(self, default_masking_format_id): + """ + Sets the default_masking_format_id of this SensitiveTypeSummary. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :param default_masking_format_id: The default_masking_format_id of this SensitiveTypeSummary. + :type: str + """ + self._default_masking_format_id = default_masking_format_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this SensitiveTypeSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this SensitiveTypeSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this SensitiveTypeSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this SensitiveTypeSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this SensitiveTypeSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this SensitiveTypeSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this SensitiveTypeSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this SensitiveTypeSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/shuffle_format_entry.py b/src/oci/data_safe/models/shuffle_format_entry.py new file mode 100644 index 0000000000..74f6b03e64 --- /dev/null +++ b/src/oci/data_safe/models/shuffle_format_entry.py @@ -0,0 +1,98 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ShuffleFormatEntry(FormatEntry): + """ + The Shuffle masking format randomly shuffles values within a column. It + can also be used to shuffle column data within discrete units, or groups, + where there is a relationship among the members of each group. To learn more, + check Shuffle in the Data Safe documentation. The Shuffle masking format + randomly shuffles values within a column. It can also be used to shuffle + column data within discrete units, or groups, where there is a relationship + among the members of each group. To learn more, check Shuffle in the + Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ShuffleFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.ShuffleFormatEntry.type` attribute + of this class is ``SHUFFLE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this ShuffleFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this ShuffleFormatEntry. + :type description: str + + :param grouping_columns: + The value to assign to the grouping_columns property of this ShuffleFormatEntry. + :type grouping_columns: list[str] + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'grouping_columns': 'list[str]' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'grouping_columns': 'groupingColumns' + } + + self._type = None + self._description = None + self._grouping_columns = None + self._type = 'SHUFFLE' + + @property + def grouping_columns(self): + """ + Gets the grouping_columns of this ShuffleFormatEntry. + One or more reference columns to be used to group column values so that + they can be shuffled within their own group. The grouping columns and + the column to be masked must belong to the same table. + + + :return: The grouping_columns of this ShuffleFormatEntry. + :rtype: list[str] + """ + return self._grouping_columns + + @grouping_columns.setter + def grouping_columns(self, grouping_columns): + """ + Sets the grouping_columns of this ShuffleFormatEntry. + One or more reference columns to be used to group column values so that + they can be shuffled within their own group. The grouping columns and + the column to be masked must belong to the same table. + + + :param grouping_columns: The grouping_columns of this ShuffleFormatEntry. + :type: list[str] + """ + self._grouping_columns = grouping_columns + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/sql_expression_format_entry.py b/src/oci/data_safe/models/sql_expression_format_entry.py new file mode 100644 index 0000000000..79b465e395 --- /dev/null +++ b/src/oci/data_safe/models/sql_expression_format_entry.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SQLExpressionFormatEntry(FormatEntry): + """ + The SQL Expression masking format uses a SQL expression to generate values + that are used to replace the original data values. SQL expressions with + dbms_lob and other user-defined functions can be used to mask columns of + Large Object data type (LOB). To learn more, check SQL Expression in the + Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SQLExpressionFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.SQLExpressionFormatEntry.type` attribute + of this class is ``SQL_EXPRESSION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this SQLExpressionFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this SQLExpressionFormatEntry. + :type description: str + + :param sql_expression: + The value to assign to the sql_expression property of this SQLExpressionFormatEntry. + :type sql_expression: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'sql_expression': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'sql_expression': 'sqlExpression' + } + + self._type = None + self._description = None + self._sql_expression = None + self._type = 'SQL_EXPRESSION' + + @property + def sql_expression(self): + """ + **[Required]** Gets the sql_expression of this SQLExpressionFormatEntry. + The SQL expression to be used to generate the masked values. It can + consist of one or more values, operators, and SQL functions that + evaluate to a value. It can also contain substitution columns from + the same table. Specify the substitution columns within percent (%) + symbols. + + + :return: The sql_expression of this SQLExpressionFormatEntry. + :rtype: str + """ + return self._sql_expression + + @sql_expression.setter + def sql_expression(self, sql_expression): + """ + Sets the sql_expression of this SQLExpressionFormatEntry. + The SQL expression to be used to generate the masked values. It can + consist of one or more values, operators, and SQL functions that + evaluate to a value. It can also contain substitution columns from + the same table. Specify the substitution columns within percent (%) + symbols. + + + :param sql_expression: The sql_expression of this SQLExpressionFormatEntry. + :type: str + """ + self._sql_expression = sql_expression + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/start_audit_trail_details.py b/src/oci/data_safe/models/start_audit_trail_details.py new file mode 100644 index 0000000000..a6446474a4 --- /dev/null +++ b/src/oci/data_safe/models/start_audit_trail_details.py @@ -0,0 +1,103 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class StartAuditTrailDetails(object): + """ + The details used to start an audit trail. + """ + + def __init__(self, **kwargs): + """ + Initializes a new StartAuditTrailDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param audit_collection_start_time: + The value to assign to the audit_collection_start_time property of this StartAuditTrailDetails. + :type audit_collection_start_time: datetime + + :param is_auto_purge_enabled: + The value to assign to the is_auto_purge_enabled property of this StartAuditTrailDetails. + :type is_auto_purge_enabled: bool + + """ + self.swagger_types = { + 'audit_collection_start_time': 'datetime', + 'is_auto_purge_enabled': 'bool' + } + + self.attribute_map = { + 'audit_collection_start_time': 'auditCollectionStartTime', + 'is_auto_purge_enabled': 'isAutoPurgeEnabled' + } + + self._audit_collection_start_time = None + self._is_auto_purge_enabled = None + + @property + def audit_collection_start_time(self): + """ + **[Required]** Gets the audit_collection_start_time of this StartAuditTrailDetails. + The date from which the audit trail must start collecting data, in the format defined by RFC3339. + + + :return: The audit_collection_start_time of this StartAuditTrailDetails. + :rtype: datetime + """ + return self._audit_collection_start_time + + @audit_collection_start_time.setter + def audit_collection_start_time(self, audit_collection_start_time): + """ + Sets the audit_collection_start_time of this StartAuditTrailDetails. + The date from which the audit trail must start collecting data, in the format defined by RFC3339. + + + :param audit_collection_start_time: The audit_collection_start_time of this StartAuditTrailDetails. + :type: datetime + """ + self._audit_collection_start_time = audit_collection_start_time + + @property + def is_auto_purge_enabled(self): + """ + Gets the is_auto_purge_enabled of this StartAuditTrailDetails. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :return: The is_auto_purge_enabled of this StartAuditTrailDetails. + :rtype: bool + """ + return self._is_auto_purge_enabled + + @is_auto_purge_enabled.setter + def is_auto_purge_enabled(self, is_auto_purge_enabled): + """ + Sets the is_auto_purge_enabled of this StartAuditTrailDetails. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :param is_auto_purge_enabled: The is_auto_purge_enabled of this StartAuditTrailDetails. + :type: bool + """ + self._is_auto_purge_enabled = is_auto_purge_enabled + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/substring_format_entry.py b/src/oci/data_safe/models/substring_format_entry.py new file mode 100644 index 0000000000..9195c952c3 --- /dev/null +++ b/src/oci/data_safe/models/substring_format_entry.py @@ -0,0 +1,129 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class SubstringFormatEntry(FormatEntry): + """ + The Substring masking format extracts a portion of the original column + value and uses it to replace the original value. It internally uses the + Oracle SUBSTR function. It takes the start position and length as input, + extracts substring from the original value using SUBSTR, and uses the + substring to replace the original value. To learn more, check Substring + in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new SubstringFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.SubstringFormatEntry.type` attribute + of this class is ``SUBSTRING`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this SubstringFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this SubstringFormatEntry. + :type description: str + + :param start_position: + The value to assign to the start_position property of this SubstringFormatEntry. + :type start_position: int + + :param length: + The value to assign to the length property of this SubstringFormatEntry. + :type length: int + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'start_position': 'int', + 'length': 'int' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'start_position': 'startPosition', + 'length': 'length' + } + + self._type = None + self._description = None + self._start_position = None + self._length = None + self._type = 'SUBSTRING' + + @property + def start_position(self): + """ + **[Required]** Gets the start_position of this SubstringFormatEntry. + The starting position in the original string from where the substring + should be extracted. It can be either a positive or a negative integer. + If It's negative, the counting starts from the end of the string. + + + :return: The start_position of this SubstringFormatEntry. + :rtype: int + """ + return self._start_position + + @start_position.setter + def start_position(self, start_position): + """ + Sets the start_position of this SubstringFormatEntry. + The starting position in the original string from where the substring + should be extracted. It can be either a positive or a negative integer. + If It's negative, the counting starts from the end of the string. + + + :param start_position: The start_position of this SubstringFormatEntry. + :type: int + """ + self._start_position = start_position + + @property + def length(self): + """ + **[Required]** Gets the length of this SubstringFormatEntry. + The number of characters that should be there in the substring. It should + be an integer and greater than zero. + + + :return: The length of this SubstringFormatEntry. + :rtype: int + """ + return self._length + + @length.setter + def length(self, length): + """ + Sets the length of this SubstringFormatEntry. + The number of characters that should be there in the substring. It should + be an integer and greater than zero. + + + :param length: The length of this SubstringFormatEntry. + :type: int + """ + self._length = length + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/summary.py b/src/oci/data_safe/models/summary.py new file mode 100644 index 0000000000..190db24b36 --- /dev/null +++ b/src/oci/data_safe/models/summary.py @@ -0,0 +1,225 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Summary(object): + """ + Summary of the audit report. + """ + + def __init__(self, **kwargs): + """ + Initializes a new Summary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this Summary. + :type name: str + + :param is_hidden: + The value to assign to the is_hidden property of this Summary. + :type is_hidden: bool + + :param display_order: + The value to assign to the display_order property of this Summary. + :type display_order: int + + :param group_by_field_name: + The value to assign to the group_by_field_name property of this Summary. + :type group_by_field_name: str + + :param count_of: + The value to assign to the count_of property of this Summary. + :type count_of: str + + :param scim_filter: + The value to assign to the scim_filter property of this Summary. + :type scim_filter: str + + """ + self.swagger_types = { + 'name': 'str', + 'is_hidden': 'bool', + 'display_order': 'int', + 'group_by_field_name': 'str', + 'count_of': 'str', + 'scim_filter': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'is_hidden': 'isHidden', + 'display_order': 'displayOrder', + 'group_by_field_name': 'groupByFieldName', + 'count_of': 'countOf', + 'scim_filter': 'scimFilter' + } + + self._name = None + self._is_hidden = None + self._display_order = None + self._group_by_field_name = None + self._count_of = None + self._scim_filter = None + + @property + def name(self): + """ + **[Required]** Gets the name of this Summary. + Name of the report summary. + + + :return: The name of this Summary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this Summary. + Name of the report summary. + + + :param name: The name of this Summary. + :type: str + """ + self._name = name + + @property + def is_hidden(self): + """ + Gets the is_hidden of this Summary. + Indicates if the summary is hidden. Values can either be 'true' or 'false'. + + + :return: The is_hidden of this Summary. + :rtype: bool + """ + return self._is_hidden + + @is_hidden.setter + def is_hidden(self, is_hidden): + """ + Sets the is_hidden of this Summary. + Indicates if the summary is hidden. Values can either be 'true' or 'false'. + + + :param is_hidden: The is_hidden of this Summary. + :type: bool + """ + self._is_hidden = is_hidden + + @property + def display_order(self): + """ + **[Required]** Gets the display_order of this Summary. + Specifies the order in which the summary must be displayed. + + + :return: The display_order of this Summary. + :rtype: int + """ + return self._display_order + + @display_order.setter + def display_order(self, display_order): + """ + Sets the display_order of this Summary. + Specifies the order in which the summary must be displayed. + + + :param display_order: The display_order of this Summary. + :type: int + """ + self._display_order = display_order + + @property + def group_by_field_name(self): + """ + Gets the group_by_field_name of this Summary. + A comma-delimited string that specifies the names of the fields by which the records must be aggregated to get the summary. + + + :return: The group_by_field_name of this Summary. + :rtype: str + """ + return self._group_by_field_name + + @group_by_field_name.setter + def group_by_field_name(self, group_by_field_name): + """ + Sets the group_by_field_name of this Summary. + A comma-delimited string that specifies the names of the fields by which the records must be aggregated to get the summary. + + + :param group_by_field_name: The group_by_field_name of this Summary. + :type: str + """ + self._group_by_field_name = group_by_field_name + + @property + def count_of(self): + """ + Gets the count_of of this Summary. + Name of the key or count of object. + + + :return: The count_of of this Summary. + :rtype: str + """ + return self._count_of + + @count_of.setter + def count_of(self, count_of): + """ + Sets the count_of of this Summary. + Name of the key or count of object. + + + :param count_of: The count_of of this Summary. + :type: str + """ + self._count_of = count_of + + @property + def scim_filter(self): + """ + Gets the scim_filter of this Summary. + Additional scim filters used to get the specific summary. + + + :return: The scim_filter of this Summary. + :rtype: str + """ + return self._scim_filter + + @scim_filter.setter + def scim_filter(self, scim_filter): + """ + Sets the scim_filter of this Summary. + Additional scim filters used to get the specific summary. + + + :param scim_filter: The scim_filter of this Summary. + :type: str + """ + self._scim_filter = scim_filter + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/table_summary.py b/src/oci/data_safe/models/table_summary.py new file mode 100644 index 0000000000..df38b782d8 --- /dev/null +++ b/src/oci/data_safe/models/table_summary.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TableSummary(object): + """ + Details of a table fetched from the database. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TableSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param table_name: + The value to assign to the table_name property of this TableSummary. + :type table_name: str + + :param schema_name: + The value to assign to the schema_name property of this TableSummary. + :type schema_name: str + + """ + self.swagger_types = { + 'table_name': 'str', + 'schema_name': 'str' + } + + self.attribute_map = { + 'table_name': 'tableName', + 'schema_name': 'schemaName' + } + + self._table_name = None + self._schema_name = None + + @property + def table_name(self): + """ + **[Required]** Gets the table_name of this TableSummary. + Name of the table. + + + :return: The table_name of this TableSummary. + :rtype: str + """ + return self._table_name + + @table_name.setter + def table_name(self, table_name): + """ + Sets the table_name of this TableSummary. + Name of the table. + + + :param table_name: The table_name of this TableSummary. + :type: str + """ + self._table_name = table_name + + @property + def schema_name(self): + """ + **[Required]** Gets the schema_name of this TableSummary. + Name of the schema. + + + :return: The schema_name of this TableSummary. + :rtype: str + """ + return self._schema_name + + @schema_name.setter + def schema_name(self, schema_name): + """ + Sets the schema_name of this TableSummary. + Name of the schema. + + + :param schema_name: The schema_name of this TableSummary. + :type: str + """ + self._schema_name = schema_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/data_safe/models/target_alert_policy_association.py b/src/oci/data_safe/models/target_alert_policy_association.py new file mode 100644 index 0000000000..f14f294751 --- /dev/null +++ b/src/oci/data_safe/models/target_alert_policy_association.py @@ -0,0 +1,500 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TargetAlertPolicyAssociation(object): + """ + An association of target to alert policy + """ + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociation. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociation. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociation. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociation. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociation. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociation. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new TargetAlertPolicyAssociation 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 TargetAlertPolicyAssociation. + :type id: str + + :param display_name: + The value to assign to the display_name property of this TargetAlertPolicyAssociation. + :type display_name: str + + :param description: + The value to assign to the description property of this TargetAlertPolicyAssociation. + :type description: str + + :param policy_id: + The value to assign to the policy_id property of this TargetAlertPolicyAssociation. + :type policy_id: str + + :param target_id: + The value to assign to the target_id property of this TargetAlertPolicyAssociation. + :type target_id: str + + :param is_enabled: + The value to assign to the is_enabled property of this TargetAlertPolicyAssociation. + :type is_enabled: bool + + :param compartment_id: + The value to assign to the compartment_id property of this TargetAlertPolicyAssociation. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this TargetAlertPolicyAssociation. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this TargetAlertPolicyAssociation. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this TargetAlertPolicyAssociation. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this TargetAlertPolicyAssociation. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this TargetAlertPolicyAssociation. + :type defined_tags: dict(str, dict(str, object)) + + :param system_tags: + The value to assign to the system_tags property of this TargetAlertPolicyAssociation. + :type system_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'policy_id': 'str', + 'target_id': 'str', + 'is_enabled': 'bool', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'system_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'policy_id': 'policyId', + 'target_id': 'targetId', + 'is_enabled': 'isEnabled', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'system_tags': 'systemTags' + } + + self._id = None + self._display_name = None + self._description = None + self._policy_id = None + self._target_id = None + self._is_enabled = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + self._system_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this TargetAlertPolicyAssociation. + The OCID of the target-alert policy association. + + + :return: The id of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this TargetAlertPolicyAssociation. + The OCID of the target-alert policy association. + + + :param id: The id of this TargetAlertPolicyAssociation. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this TargetAlertPolicyAssociation. + The display name of the target-alert policy association. + + + :return: The display_name of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this TargetAlertPolicyAssociation. + The display name of the target-alert policy association. + + + :param display_name: The display_name of this TargetAlertPolicyAssociation. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this TargetAlertPolicyAssociation. + Describes the target-alert policy association. + + + :return: The description of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this TargetAlertPolicyAssociation. + Describes the target-alert policy association. + + + :param description: The description of this TargetAlertPolicyAssociation. + :type: str + """ + self._description = description + + @property + def policy_id(self): + """ + Gets the policy_id of this TargetAlertPolicyAssociation. + The OCID of the alert policy. + + + :return: The policy_id of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._policy_id + + @policy_id.setter + def policy_id(self, policy_id): + """ + Sets the policy_id of this TargetAlertPolicyAssociation. + The OCID of the alert policy. + + + :param policy_id: The policy_id of this TargetAlertPolicyAssociation. + :type: str + """ + self._policy_id = policy_id + + @property + def target_id(self): + """ + Gets the target_id of this TargetAlertPolicyAssociation. + The OCID of the target on which alert policy is to be applied. + + + :return: The target_id of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this TargetAlertPolicyAssociation. + The OCID of the target on which alert policy is to be applied. + + + :param target_id: The target_id of this TargetAlertPolicyAssociation. + :type: str + """ + self._target_id = target_id + + @property + def is_enabled(self): + """ + Gets the is_enabled of this TargetAlertPolicyAssociation. + Indicates if the target-alert policy association is enabled or disabled. + + + :return: The is_enabled of this TargetAlertPolicyAssociation. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this TargetAlertPolicyAssociation. + Indicates if the target-alert policy association is enabled or disabled. + + + :param is_enabled: The is_enabled of this TargetAlertPolicyAssociation. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this TargetAlertPolicyAssociation. + The OCID of the compartment that contains the policy. + + + :return: The compartment_id of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this TargetAlertPolicyAssociation. + The OCID of the compartment that contains the policy. + + + :param compartment_id: The compartment_id of this TargetAlertPolicyAssociation. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this TargetAlertPolicyAssociation. + Creation date and time of the alert policy, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this TargetAlertPolicyAssociation. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this TargetAlertPolicyAssociation. + Creation date and time of the alert policy, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this TargetAlertPolicyAssociation. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this TargetAlertPolicyAssociation. + Last date and time the alert policy was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this TargetAlertPolicyAssociation. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this TargetAlertPolicyAssociation. + Last date and time the alert policy was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this TargetAlertPolicyAssociation. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this TargetAlertPolicyAssociation. + The current state of the target-alert policy association. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this TargetAlertPolicyAssociation. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this TargetAlertPolicyAssociation. + The current state of the target-alert policy association. + + + :param lifecycle_state: The lifecycle_state of this TargetAlertPolicyAssociation. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this TargetAlertPolicyAssociation. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this TargetAlertPolicyAssociation. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this TargetAlertPolicyAssociation. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this TargetAlertPolicyAssociation. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this TargetAlertPolicyAssociation. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this TargetAlertPolicyAssociation. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this TargetAlertPolicyAssociation. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this TargetAlertPolicyAssociation. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + @property + def system_tags(self): + """ + Gets the system_tags of this TargetAlertPolicyAssociation. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :return: The system_tags of this TargetAlertPolicyAssociation. + :rtype: dict(str, dict(str, object)) + """ + return self._system_tags + + @system_tags.setter + def system_tags(self, system_tags): + """ + Sets the system_tags of this TargetAlertPolicyAssociation. + System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. + Example: `{\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}` + + + :param system_tags: The system_tags of this TargetAlertPolicyAssociation. + :type: dict(str, dict(str, object)) + """ + self._system_tags = system_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/target_alert_policy_association_collection.py b/src/oci/data_safe/models/target_alert_policy_association_collection.py new file mode 100644 index 0000000000..6093fa3030 --- /dev/null +++ b/src/oci/data_safe/models/target_alert_policy_association_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TargetAlertPolicyAssociationCollection(object): + """ + Collection of target to alert policy summary. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TargetAlertPolicyAssociationCollection 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 TargetAlertPolicyAssociationCollection. + :type items: list[oci.data_safe.models.TargetAlertPolicyAssociationSummary] + + """ + self.swagger_types = { + 'items': 'list[TargetAlertPolicyAssociationSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this TargetAlertPolicyAssociationCollection. + Array of target to alert policy summary + + + :return: The items of this TargetAlertPolicyAssociationCollection. + :rtype: list[oci.data_safe.models.TargetAlertPolicyAssociationSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this TargetAlertPolicyAssociationCollection. + Array of target to alert policy summary + + + :param items: The items of this TargetAlertPolicyAssociationCollection. + :type: list[oci.data_safe.models.TargetAlertPolicyAssociationSummary] + """ + self._items = items + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/target_alert_policy_association_summary.py b/src/oci/data_safe/models/target_alert_policy_association_summary.py new file mode 100644 index 0000000000..387525f59a --- /dev/null +++ b/src/oci/data_safe/models/target_alert_policy_association_summary.py @@ -0,0 +1,467 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TargetAlertPolicyAssociationSummary(object): + """ + A summary of target to alert policy association. + """ + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociationSummary. + #: This constant has a value of "CREATING" + LIFECYCLE_STATE_CREATING = "CREATING" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociationSummary. + #: This constant has a value of "UPDATING" + LIFECYCLE_STATE_UPDATING = "UPDATING" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociationSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociationSummary. + #: This constant has a value of "DELETING" + LIFECYCLE_STATE_DELETING = "DELETING" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociationSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + #: A constant which can be used with the lifecycle_state property of a TargetAlertPolicyAssociationSummary. + #: This constant has a value of "FAILED" + LIFECYCLE_STATE_FAILED = "FAILED" + + def __init__(self, **kwargs): + """ + Initializes a new TargetAlertPolicyAssociationSummary 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 TargetAlertPolicyAssociationSummary. + :type id: str + + :param display_name: + The value to assign to the display_name property of this TargetAlertPolicyAssociationSummary. + :type display_name: str + + :param description: + The value to assign to the description property of this TargetAlertPolicyAssociationSummary. + :type description: str + + :param policy_id: + The value to assign to the policy_id property of this TargetAlertPolicyAssociationSummary. + :type policy_id: str + + :param target_id: + The value to assign to the target_id property of this TargetAlertPolicyAssociationSummary. + :type target_id: str + + :param is_enabled: + The value to assign to the is_enabled property of this TargetAlertPolicyAssociationSummary. + :type is_enabled: bool + + :param compartment_id: + The value to assign to the compartment_id property of this TargetAlertPolicyAssociationSummary. + :type compartment_id: str + + :param time_created: + The value to assign to the time_created property of this TargetAlertPolicyAssociationSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this TargetAlertPolicyAssociationSummary. + :type time_updated: datetime + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this TargetAlertPolicyAssociationSummary. + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this TargetAlertPolicyAssociationSummary. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this TargetAlertPolicyAssociationSummary. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'id': 'str', + 'display_name': 'str', + 'description': 'str', + 'policy_id': 'str', + 'target_id': 'str', + 'is_enabled': 'bool', + 'compartment_id': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime', + 'lifecycle_state': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'id': 'id', + 'display_name': 'displayName', + 'description': 'description', + 'policy_id': 'policyId', + 'target_id': 'targetId', + 'is_enabled': 'isEnabled', + 'compartment_id': 'compartmentId', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated', + 'lifecycle_state': 'lifecycleState', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._id = None + self._display_name = None + self._description = None + self._policy_id = None + self._target_id = None + self._is_enabled = None + self._compartment_id = None + self._time_created = None + self._time_updated = None + self._lifecycle_state = None + self._freeform_tags = None + self._defined_tags = None + + @property + def id(self): + """ + **[Required]** Gets the id of this TargetAlertPolicyAssociationSummary. + The OCID of the target-alert policy association. + + + :return: The id of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this TargetAlertPolicyAssociationSummary. + The OCID of the target-alert policy association. + + + :param id: The id of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._id = id + + @property + def display_name(self): + """ + Gets the display_name of this TargetAlertPolicyAssociationSummary. + The display name of the target-alert policy association. + + + :return: The display_name of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this TargetAlertPolicyAssociationSummary. + The display name of the target-alert policy association. + + + :param display_name: The display_name of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this TargetAlertPolicyAssociationSummary. + Describes the target-alert policy association. + + + :return: The description of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this TargetAlertPolicyAssociationSummary. + Describes the target-alert policy association. + + + :param description: The description of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._description = description + + @property + def policy_id(self): + """ + Gets the policy_id of this TargetAlertPolicyAssociationSummary. + The OCID of the alert policy. + + + :return: The policy_id of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._policy_id + + @policy_id.setter + def policy_id(self, policy_id): + """ + Sets the policy_id of this TargetAlertPolicyAssociationSummary. + The OCID of the alert policy. + + + :param policy_id: The policy_id of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._policy_id = policy_id + + @property + def target_id(self): + """ + Gets the target_id of this TargetAlertPolicyAssociationSummary. + The OCID of the target on which alert policy is to be applied. + + + :return: The target_id of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this TargetAlertPolicyAssociationSummary. + The OCID of the target on which alert policy is to be applied. + + + :param target_id: The target_id of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._target_id = target_id + + @property + def is_enabled(self): + """ + Gets the is_enabled of this TargetAlertPolicyAssociationSummary. + Indicates if the target-alert policy association is enabled or disabled. + + + :return: The is_enabled of this TargetAlertPolicyAssociationSummary. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this TargetAlertPolicyAssociationSummary. + Indicates if the target-alert policy association is enabled or disabled. + + + :param is_enabled: The is_enabled of this TargetAlertPolicyAssociationSummary. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def compartment_id(self): + """ + **[Required]** Gets the compartment_id of this TargetAlertPolicyAssociationSummary. + The OCID of the compartment that contains the target-alert policy association. + + + :return: The compartment_id of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this TargetAlertPolicyAssociationSummary. + The OCID of the compartment that contains the target-alert policy association. + + + :param compartment_id: The compartment_id of this TargetAlertPolicyAssociationSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def time_created(self): + """ + **[Required]** Gets the time_created of this TargetAlertPolicyAssociationSummary. + Creation date and time of the target-alert policy association, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_created of this TargetAlertPolicyAssociationSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this TargetAlertPolicyAssociationSummary. + Creation date and time of the target-alert policy association, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_created: The time_created of this TargetAlertPolicyAssociationSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this TargetAlertPolicyAssociationSummary. + Last date and time the target-alert policy association was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :return: The time_updated of this TargetAlertPolicyAssociationSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this TargetAlertPolicyAssociationSummary. + Last date and time the target-alert policy association was updated, in the format defined by `RFC3339`__. + + __ https://tools.ietf.org/html/rfc3339 + + + :param time_updated: The time_updated of this TargetAlertPolicyAssociationSummary. + :type: datetime + """ + self._time_updated = time_updated + + @property + def lifecycle_state(self): + """ + **[Required]** Gets the lifecycle_state of this TargetAlertPolicyAssociationSummary. + The current state of the target-alert policy association. + + Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this TargetAlertPolicyAssociationSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this TargetAlertPolicyAssociationSummary. + The current state of the target-alert policy association. + + + :param lifecycle_state: The lifecycle_state of this TargetAlertPolicyAssociationSummary. + :type: str + """ + allowed_values = ["CREATING", "UPDATING", "ACTIVE", "DELETING", "DELETED", "FAILED"] + if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values): + lifecycle_state = 'UNKNOWN_ENUM_VALUE' + self._lifecycle_state = lifecycle_state + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this TargetAlertPolicyAssociationSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this TargetAlertPolicyAssociationSummary. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this TargetAlertPolicyAssociationSummary. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this TargetAlertPolicyAssociationSummary. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this TargetAlertPolicyAssociationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this TargetAlertPolicyAssociationSummary. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this TargetAlertPolicyAssociationSummary. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this TargetAlertPolicyAssociationSummary. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/target_database.py b/src/oci/data_safe/models/target_database.py index c5f14af627..4bc12b726a 100644 --- a/src/oci/data_safe/models/target_database.py +++ b/src/oci/data_safe/models/target_database.py @@ -82,6 +82,10 @@ def __init__(self, **kwargs): The value to assign to the connection_option property of this TargetDatabase. :type connection_option: oci.data_safe.models.ConnectionOption + :param associated_resource_ids: + The value to assign to the associated_resource_ids property of this TargetDatabase. + :type associated_resource_ids: list[str] + :param lifecycle_state: The value to assign to the lifecycle_state property of this TargetDatabase. Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. @@ -122,6 +126,7 @@ def __init__(self, **kwargs): 'credentials': 'Credentials', 'tls_config': 'TlsConfig', 'connection_option': 'ConnectionOption', + 'associated_resource_ids': 'list[str]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'time_created': 'datetime', @@ -140,6 +145,7 @@ def __init__(self, **kwargs): 'credentials': 'credentials', 'tls_config': 'tlsConfig', 'connection_option': 'connectionOption', + 'associated_resource_ids': 'associatedResourceIds', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'time_created': 'timeCreated', @@ -157,6 +163,7 @@ def __init__(self, **kwargs): self._credentials = None self._tls_config = None self._connection_option = None + self._associated_resource_ids = None self._lifecycle_state = None self._lifecycle_details = None self._time_created = None @@ -341,6 +348,30 @@ def connection_option(self, connection_option): """ self._connection_option = connection_option + @property + def associated_resource_ids(self): + """ + Gets the associated_resource_ids of this TargetDatabase. + The OCIDs of associated resources like Database, Data Safe private endpoint etc. + + + :return: The associated_resource_ids of this TargetDatabase. + :rtype: list[str] + """ + return self._associated_resource_ids + + @associated_resource_ids.setter + def associated_resource_ids(self, associated_resource_ids): + """ + Sets the associated_resource_ids of this TargetDatabase. + The OCIDs of associated resources like Database, Data Safe private endpoint etc. + + + :param associated_resource_ids: The associated_resource_ids of this TargetDatabase. + :type: list[str] + """ + self._associated_resource_ids = associated_resource_ids + @property def lifecycle_state(self): """ diff --git a/src/oci/data_safe/models/target_database_summary.py b/src/oci/data_safe/models/target_database_summary.py index 827b8e4f07..09d41adc05 100644 --- a/src/oci/data_safe/models/target_database_summary.py +++ b/src/oci/data_safe/models/target_database_summary.py @@ -106,6 +106,10 @@ def __init__(self, **kwargs): Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type database_type: str + :param associated_resource_ids: + The value to assign to the associated_resource_ids property of this TargetDatabaseSummary. + :type associated_resource_ids: list[str] + :param lifecycle_state: The value to assign to the lifecycle_state property of this TargetDatabaseSummary. Allowed values for this property are: "CREATING", "UPDATING", "ACTIVE", "INACTIVE", "DELETING", "DELETED", "NEEDS_ATTENTION", "FAILED", 'UNKNOWN_ENUM_VALUE'. @@ -136,6 +140,7 @@ def __init__(self, **kwargs): 'description': 'str', 'infrastructure_type': 'str', 'database_type': 'str', + 'associated_resource_ids': 'list[str]', 'lifecycle_state': 'str', 'lifecycle_details': 'str', 'time_created': 'datetime', @@ -150,6 +155,7 @@ def __init__(self, **kwargs): 'description': 'description', 'infrastructure_type': 'infrastructureType', 'database_type': 'databaseType', + 'associated_resource_ids': 'associatedResourceIds', 'lifecycle_state': 'lifecycleState', 'lifecycle_details': 'lifecycleDetails', 'time_created': 'timeCreated', @@ -163,6 +169,7 @@ def __init__(self, **kwargs): self._description = None self._infrastructure_type = None self._database_type = None + self._associated_resource_ids = None self._lifecycle_state = None self._lifecycle_details = None self._time_created = None @@ -325,6 +332,30 @@ def database_type(self, database_type): database_type = 'UNKNOWN_ENUM_VALUE' self._database_type = database_type + @property + def associated_resource_ids(self): + """ + Gets the associated_resource_ids of this TargetDatabaseSummary. + The OCIDs of associated resources like Database, Data Safe private endpoint etc. + + + :return: The associated_resource_ids of this TargetDatabaseSummary. + :rtype: list[str] + """ + return self._associated_resource_ids + + @associated_resource_ids.setter + def associated_resource_ids(self, associated_resource_ids): + """ + Sets the associated_resource_ids of this TargetDatabaseSummary. + The OCIDs of associated resources like Database, Data Safe private endpoint etc. + + + :param associated_resource_ids: The associated_resource_ids of this TargetDatabaseSummary. + :type: list[str] + """ + self._associated_resource_ids = associated_resource_ids + @property def lifecycle_state(self): """ diff --git a/src/oci/data_safe/models/truncate_table_format_entry.py b/src/oci/data_safe/models/truncate_table_format_entry.py new file mode 100644 index 0000000000..693ff12de0 --- /dev/null +++ b/src/oci/data_safe/models/truncate_table_format_entry.py @@ -0,0 +1,60 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class TruncateTableFormatEntry(FormatEntry): + """ + The Truncate Table masking format drops all the rows in a table. If one of the + columns in a table is masked using Truncate Table, the entire table is truncated, + so no other masking format can be used for any of the other columns in that table. + If a table is being truncated, it cannot be referred to by a foreign key constraint + or a dependent column. To learn more, check Truncate Table in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new TruncateTableFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.TruncateTableFormatEntry.type` attribute + of this class is ``TRUNCATE_TABLE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this TruncateTableFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this TruncateTableFormatEntry. + :type description: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description' + } + + self._type = None + self._description = None + self._type = 'TRUNCATE_TABLE' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/udf_format_entry.py b/src/oci/data_safe/models/udf_format_entry.py new file mode 100644 index 0000000000..993b88dc6b --- /dev/null +++ b/src/oci/data_safe/models/udf_format_entry.py @@ -0,0 +1,93 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .format_entry import FormatEntry +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UDFFormatEntry(FormatEntry): + """ + The User Defined Function masking format lets you define your own logic to + mask column data. The return value of the user-defined function is used to + replace the original values. The user-defined function has a fixed signature + and is a PL/SQL function that can be invoked in a SELECT statement. To learn + more, check User Defined Function in the Data Safe documentation. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UDFFormatEntry object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.UDFFormatEntry.type` attribute + of this class is ``USER_DEFINED_FUNCTION`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this UDFFormatEntry. + Allowed values for this property are: "DELETE_ROWS", "DETERMINISTIC_SUBSTITUTION", "DETERMINISTIC_ENCRYPTION", "DETERMINISTIC_ENCRYPTION_DATE", "FIXED_NUMBER", "FIXED_STRING", "LIBRARY_MASKING_FORMAT", "NULL_VALUE", "POST_PROCESSING_FUNCTION", "PRESERVE_ORIGINAL_DATA", "RANDOM_DATE", "RANDOM_DECIMAL_NUMBER", "RANDOM_DIGITS", "RANDOM_LIST", "RANDOM_NUMBER", "RANDOM_STRING", "RANDOM_SUBSTITUTION", "REGULAR_EXPRESSION", "SHUFFLE", "SQL_EXPRESSION", "SUBSTRING", "TRUNCATE_TABLE", "USER_DEFINED_FUNCTION" + :type type: str + + :param description: + The value to assign to the description property of this UDFFormatEntry. + :type description: str + + :param user_defined_function: + The value to assign to the user_defined_function property of this UDFFormatEntry. + :type user_defined_function: str + + """ + self.swagger_types = { + 'type': 'str', + 'description': 'str', + 'user_defined_function': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'description': 'description', + 'user_defined_function': 'userDefinedFunction' + } + + self._type = None + self._description = None + self._user_defined_function = None + self._type = 'USER_DEFINED_FUNCTION' + + @property + def user_defined_function(self): + """ + **[Required]** Gets the user_defined_function of this UDFFormatEntry. + The user-defined function in SCHEMA_NAME.PACKAGE_NAME.FUNCTION_NAME format. + It can be a standalone or packaged function, so PACKAGE_NAME is optional. + + + :return: The user_defined_function of this UDFFormatEntry. + :rtype: str + """ + return self._user_defined_function + + @user_defined_function.setter + def user_defined_function(self, user_defined_function): + """ + Sets the user_defined_function of this UDFFormatEntry. + The user-defined function in SCHEMA_NAME.PACKAGE_NAME.FUNCTION_NAME format. + It can be a standalone or packaged function, so PACKAGE_NAME is optional. + + + :param user_defined_function: The user_defined_function of this UDFFormatEntry. + :type: str + """ + self._user_defined_function = user_defined_function + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_alert_details.py b/src/oci/data_safe/models/update_alert_details.py new file mode 100644 index 0000000000..a9c664e4d4 --- /dev/null +++ b/src/oci/data_safe/models/update_alert_details.py @@ -0,0 +1,196 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAlertDetails(object): + """ + The details used to update an alert. + """ + + #: A constant which can be used with the status property of a UpdateAlertDetails. + #: This constant has a value of "OPEN" + STATUS_OPEN = "OPEN" + + #: A constant which can be used with the status property of a UpdateAlertDetails. + #: This constant has a value of "CLOSED" + STATUS_CLOSED = "CLOSED" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAlertDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param comment: + The value to assign to the comment property of this UpdateAlertDetails. + :type comment: str + + :param status: + The value to assign to the status property of this UpdateAlertDetails. + Allowed values for this property are: "OPEN", "CLOSED" + :type status: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAlertDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAlertDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'comment': 'str', + 'status': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'comment': 'comment', + 'status': 'status', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._comment = None + self._status = None + self._freeform_tags = None + self._defined_tags = None + + @property + def comment(self): + """ + Gets the comment of this UpdateAlertDetails. + A comment can be entered to track the alert changes done by the user. + + + :return: The comment of this UpdateAlertDetails. + :rtype: str + """ + return self._comment + + @comment.setter + def comment(self, comment): + """ + Sets the comment of this UpdateAlertDetails. + A comment can be entered to track the alert changes done by the user. + + + :param comment: The comment of this UpdateAlertDetails. + :type: str + """ + self._comment = comment + + @property + def status(self): + """ + Gets the status of this UpdateAlertDetails. + The status of the alert. + + Allowed values for this property are: "OPEN", "CLOSED" + + + :return: The status of this UpdateAlertDetails. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this UpdateAlertDetails. + The status of the alert. + + + :param status: The status of this UpdateAlertDetails. + :type: str + """ + allowed_values = ["OPEN", "CLOSED"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + raise ValueError( + "Invalid value for `status`, must be None or one of {0}" + .format(allowed_values) + ) + self._status = status + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAlertDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateAlertDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAlertDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateAlertDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAlertDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateAlertDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAlertDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateAlertDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_alert_policy_rule_details.py b/src/oci/data_safe/models/update_alert_policy_rule_details.py new file mode 100644 index 0000000000..f15664a075 --- /dev/null +++ b/src/oci/data_safe/models/update_alert_policy_rule_details.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAlertPolicyRuleDetails(object): + """ + The details used to update a alert policy rule. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAlertPolicyRuleDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateAlertPolicyRuleDetails. + :type description: str + + :param expression: + The value to assign to the expression property of this UpdateAlertPolicyRuleDetails. + :type expression: str + + """ + self.swagger_types = { + 'description': 'str', + 'expression': 'str' + } + + self.attribute_map = { + 'description': 'description', + 'expression': 'expression' + } + + self._description = None + self._expression = None + + @property + def description(self): + """ + Gets the description of this UpdateAlertPolicyRuleDetails. + Describes the alert policy rule. + + + :return: The description of this UpdateAlertPolicyRuleDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAlertPolicyRuleDetails. + Describes the alert policy rule. + + + :param description: The description of this UpdateAlertPolicyRuleDetails. + :type: str + """ + self._description = description + + @property + def expression(self): + """ + Gets the expression of this UpdateAlertPolicyRuleDetails. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :return: The expression of this UpdateAlertPolicyRuleDetails. + :rtype: str + """ + return self._expression + + @expression.setter + def expression(self, expression): + """ + Sets the expression of this UpdateAlertPolicyRuleDetails. + The conditional expression of the alert policy rule which evaluates to boolean value. + + + :param expression: The expression of this UpdateAlertPolicyRuleDetails. + :type: str + """ + self._expression = expression + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_audit_archive_retrieval_details.py b/src/oci/data_safe/models/update_audit_archive_retrieval_details.py new file mode 100644 index 0000000000..5e53b10911 --- /dev/null +++ b/src/oci/data_safe/models/update_audit_archive_retrieval_details.py @@ -0,0 +1,179 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAuditArchiveRetrievalDetails(object): + """ + Details to update the audit archive retrieval. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAuditArchiveRetrievalDetails 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 UpdateAuditArchiveRetrievalDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateAuditArchiveRetrievalDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAuditArchiveRetrievalDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAuditArchiveRetrievalDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateAuditArchiveRetrievalDetails. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :return: The display_name of this UpdateAuditArchiveRetrievalDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAuditArchiveRetrievalDetails. + The display name of the archive retrieval. The name does not have to be unique, and is changeable. + + + :param display_name: The display_name of this UpdateAuditArchiveRetrievalDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateAuditArchiveRetrievalDetails. + Description of the archive retrieval. + + + :return: The description of this UpdateAuditArchiveRetrievalDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAuditArchiveRetrievalDetails. + Description of the archive retrieval. + + + :param description: The description of this UpdateAuditArchiveRetrievalDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAuditArchiveRetrievalDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateAuditArchiveRetrievalDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAuditArchiveRetrievalDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateAuditArchiveRetrievalDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAuditArchiveRetrievalDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateAuditArchiveRetrievalDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAuditArchiveRetrievalDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateAuditArchiveRetrievalDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_audit_policy_details.py b/src/oci/data_safe/models/update_audit_policy_details.py new file mode 100644 index 0000000000..86a54acfc0 --- /dev/null +++ b/src/oci/data_safe/models/update_audit_policy_details.py @@ -0,0 +1,179 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAuditPolicyDetails(object): + """ + Details to update the audit policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAuditPolicyDetails 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 UpdateAuditPolicyDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateAuditPolicyDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAuditPolicyDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAuditPolicyDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateAuditPolicyDetails. + The display name of the audit policy. The name does not have to be unique, and it is changeable. + + + :return: The display_name of this UpdateAuditPolicyDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAuditPolicyDetails. + The display name of the audit policy. The name does not have to be unique, and it is changeable. + + + :param display_name: The display_name of this UpdateAuditPolicyDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateAuditPolicyDetails. + The description of the audit policy. + + + :return: The description of this UpdateAuditPolicyDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAuditPolicyDetails. + The description of the audit policy. + + + :param description: The description of this UpdateAuditPolicyDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAuditPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateAuditPolicyDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAuditPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateAuditPolicyDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAuditPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateAuditPolicyDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAuditPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateAuditPolicyDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_audit_profile_details.py b/src/oci/data_safe/models/update_audit_profile_details.py new file mode 100644 index 0000000000..a47d9fdce2 --- /dev/null +++ b/src/oci/data_safe/models/update_audit_profile_details.py @@ -0,0 +1,214 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAuditProfileDetails(object): + """ + The details used to update a audit profile. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAuditProfileDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateAuditProfileDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this UpdateAuditProfileDetails. + :type display_name: str + + :param is_paid_usage_enabled: + The value to assign to the is_paid_usage_enabled property of this UpdateAuditProfileDetails. + :type is_paid_usage_enabled: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAuditProfileDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAuditProfileDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'is_paid_usage_enabled': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'is_paid_usage_enabled': 'isPaidUsageEnabled', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._display_name = None + self._is_paid_usage_enabled = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this UpdateAuditProfileDetails. + The description of the audit profile. + + + :return: The description of this UpdateAuditProfileDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAuditProfileDetails. + The description of the audit profile. + + + :param description: The description of this UpdateAuditProfileDetails. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this UpdateAuditProfileDetails. + The display name of the audit profile. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateAuditProfileDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAuditProfileDetails. + The display name of the audit profile. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateAuditProfileDetails. + :type: str + """ + self._display_name = display_name + + @property + def is_paid_usage_enabled(self): + """ + Gets the is_paid_usage_enabled of this UpdateAuditProfileDetails. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :return: The is_paid_usage_enabled of this UpdateAuditProfileDetails. + :rtype: bool + """ + return self._is_paid_usage_enabled + + @is_paid_usage_enabled.setter + def is_paid_usage_enabled(self, is_paid_usage_enabled): + """ + Sets the is_paid_usage_enabled of this UpdateAuditProfileDetails. + Indicates if you want to continue collecting audit records beyond the free limit of one million audit records per month per target database, + potentially incurring additional charges. The default value is inherited from the global settings. + You can change at the global level or at the target level. + + + :param is_paid_usage_enabled: The is_paid_usage_enabled of this UpdateAuditProfileDetails. + :type: bool + """ + self._is_paid_usage_enabled = is_paid_usage_enabled + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAuditProfileDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateAuditProfileDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAuditProfileDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateAuditProfileDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAuditProfileDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateAuditProfileDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAuditProfileDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateAuditProfileDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_audit_trail_details.py b/src/oci/data_safe/models/update_audit_trail_details.py new file mode 100644 index 0000000000..a0f370dbd7 --- /dev/null +++ b/src/oci/data_safe/models/update_audit_trail_details.py @@ -0,0 +1,212 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateAuditTrailDetails(object): + """ + The details used to update an audit trail. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateAuditTrailDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param description: + The value to assign to the description property of this UpdateAuditTrailDetails. + :type description: str + + :param display_name: + The value to assign to the display_name property of this UpdateAuditTrailDetails. + :type display_name: str + + :param is_auto_purge_enabled: + The value to assign to the is_auto_purge_enabled property of this UpdateAuditTrailDetails. + :type is_auto_purge_enabled: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateAuditTrailDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateAuditTrailDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'description': 'str', + 'display_name': 'str', + 'is_auto_purge_enabled': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'description': 'description', + 'display_name': 'displayName', + 'is_auto_purge_enabled': 'isAutoPurgeEnabled', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._description = None + self._display_name = None + self._is_auto_purge_enabled = None + self._freeform_tags = None + self._defined_tags = None + + @property + def description(self): + """ + Gets the description of this UpdateAuditTrailDetails. + The description of the audit trail. + + + :return: The description of this UpdateAuditTrailDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateAuditTrailDetails. + The description of the audit trail. + + + :param description: The description of this UpdateAuditTrailDetails. + :type: str + """ + self._description = description + + @property + def display_name(self): + """ + Gets the display_name of this UpdateAuditTrailDetails. + The display name of the audit trail. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateAuditTrailDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateAuditTrailDetails. + The display name of the audit trail. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateAuditTrailDetails. + :type: str + """ + self._display_name = display_name + + @property + def is_auto_purge_enabled(self): + """ + Gets the is_auto_purge_enabled of this UpdateAuditTrailDetails. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :return: The is_auto_purge_enabled of this UpdateAuditTrailDetails. + :rtype: bool + """ + return self._is_auto_purge_enabled + + @is_auto_purge_enabled.setter + def is_auto_purge_enabled(self, is_auto_purge_enabled): + """ + Sets the is_auto_purge_enabled of this UpdateAuditTrailDetails. + Indicates if auto purge is enabled on the target database, which helps delete audit data in the + target database every seven days so that the database's audit trail does not become too large. + + + :param is_auto_purge_enabled: The is_auto_purge_enabled of this UpdateAuditTrailDetails. + :type: bool + """ + self._is_auto_purge_enabled = is_auto_purge_enabled + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateAuditTrailDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateAuditTrailDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateAuditTrailDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateAuditTrailDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateAuditTrailDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateAuditTrailDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateAuditTrailDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateAuditTrailDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_column_source_details.py b/src/oci/data_safe/models/update_column_source_details.py new file mode 100644 index 0000000000..dda7a6c755 --- /dev/null +++ b/src/oci/data_safe/models/update_column_source_details.py @@ -0,0 +1,108 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateColumnSourceDetails(object): + """ + Details to update the column source of a masking policy. + """ + + #: A constant which can be used with the column_source property of a UpdateColumnSourceDetails. + #: This constant has a value of "TARGET" + COLUMN_SOURCE_TARGET = "TARGET" + + #: A constant which can be used with the column_source property of a UpdateColumnSourceDetails. + #: This constant has a value of "SENSITIVE_DATA_MODEL" + COLUMN_SOURCE_SENSITIVE_DATA_MODEL = "SENSITIVE_DATA_MODEL" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateColumnSourceDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.UpdateColumnSourceSdmDetails` + * :class:`~oci.data_safe.models.UpdateColumnSourceTargetDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this UpdateColumnSourceDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + """ + self.swagger_types = { + 'column_source': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource' + } + + self._column_source = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['columnSource'] + + if type == 'SENSITIVE_DATA_MODEL': + return 'UpdateColumnSourceSdmDetails' + + if type == 'TARGET': + return 'UpdateColumnSourceTargetDetails' + else: + return 'UpdateColumnSourceDetails' + + @property + def column_source(self): + """ + **[Required]** Gets the column_source of this UpdateColumnSourceDetails. + The source of masking columns. + + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + + + :return: The column_source of this UpdateColumnSourceDetails. + :rtype: str + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this UpdateColumnSourceDetails. + The source of masking columns. + + + :param column_source: The column_source of this UpdateColumnSourceDetails. + :type: str + """ + allowed_values = ["TARGET", "SENSITIVE_DATA_MODEL"] + if not value_allowed_none_or_none_sentinel(column_source, allowed_values): + raise ValueError( + "Invalid value for `column_source`, must be None or one of {0}" + .format(allowed_values) + ) + self._column_source = column_source + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_column_source_sdm_details.py b/src/oci/data_safe/models/update_column_source_sdm_details.py new file mode 100644 index 0000000000..6fe71d92ca --- /dev/null +++ b/src/oci/data_safe/models/update_column_source_sdm_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_column_source_details import UpdateColumnSourceDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateColumnSourceSdmDetails(UpdateColumnSourceDetails): + """ + Details of the sensitive data model to be associated as the column source with a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateColumnSourceSdmDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.UpdateColumnSourceSdmDetails.column_source` attribute + of this class is ``SENSITIVE_DATA_MODEL`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this UpdateColumnSourceSdmDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + :param sensitive_data_model_id: + The value to assign to the sensitive_data_model_id property of this UpdateColumnSourceSdmDetails. + :type sensitive_data_model_id: str + + """ + self.swagger_types = { + 'column_source': 'str', + 'sensitive_data_model_id': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource', + 'sensitive_data_model_id': 'sensitiveDataModelId' + } + + self._column_source = None + self._sensitive_data_model_id = None + self._column_source = 'SENSITIVE_DATA_MODEL' + + @property + def sensitive_data_model_id(self): + """ + **[Required]** Gets the sensitive_data_model_id of this UpdateColumnSourceSdmDetails. + The OCID of the sensitive data model to be associated as the column source with the masking policy. + + + :return: The sensitive_data_model_id of this UpdateColumnSourceSdmDetails. + :rtype: str + """ + return self._sensitive_data_model_id + + @sensitive_data_model_id.setter + def sensitive_data_model_id(self, sensitive_data_model_id): + """ + Sets the sensitive_data_model_id of this UpdateColumnSourceSdmDetails. + The OCID of the sensitive data model to be associated as the column source with the masking policy. + + + :param sensitive_data_model_id: The sensitive_data_model_id of this UpdateColumnSourceSdmDetails. + :type: str + """ + self._sensitive_data_model_id = sensitive_data_model_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_column_source_target_details.py b/src/oci/data_safe/models/update_column_source_target_details.py new file mode 100644 index 0000000000..c5da60b3b7 --- /dev/null +++ b/src/oci/data_safe/models/update_column_source_target_details.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_column_source_details import UpdateColumnSourceDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateColumnSourceTargetDetails(UpdateColumnSourceDetails): + """ + Details of the target database to be associated as the column source with a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateColumnSourceTargetDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.UpdateColumnSourceTargetDetails.column_source` attribute + of this class is ``TARGET`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param column_source: + The value to assign to the column_source property of this UpdateColumnSourceTargetDetails. + Allowed values for this property are: "TARGET", "SENSITIVE_DATA_MODEL" + :type column_source: str + + :param target_id: + The value to assign to the target_id property of this UpdateColumnSourceTargetDetails. + :type target_id: str + + """ + self.swagger_types = { + 'column_source': 'str', + 'target_id': 'str' + } + + self.attribute_map = { + 'column_source': 'columnSource', + 'target_id': 'targetId' + } + + self._column_source = None + self._target_id = None + self._column_source = 'TARGET' + + @property + def target_id(self): + """ + **[Required]** Gets the target_id of this UpdateColumnSourceTargetDetails. + The OCID of the target database to be associated as the column source with the masking policy. + + + :return: The target_id of this UpdateColumnSourceTargetDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this UpdateColumnSourceTargetDetails. + The OCID of the target database to be associated as the column source with the masking policy. + + + :param target_id: The target_id of this UpdateColumnSourceTargetDetails. + :type: str + """ + self._target_id = target_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_library_masking_format_details.py b/src/oci/data_safe/models/update_library_masking_format_details.py new file mode 100644 index 0000000000..8db74b9e66 --- /dev/null +++ b/src/oci/data_safe/models/update_library_masking_format_details.py @@ -0,0 +1,242 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateLibraryMaskingFormatDetails(object): + """ + Details to update a library masking format. Note that updating the formatEntries attribute replaces all the existing masking format + entries with the specified format entries. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateLibraryMaskingFormatDetails 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 UpdateLibraryMaskingFormatDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateLibraryMaskingFormatDetails. + :type description: str + + :param sensitive_type_ids: + The value to assign to the sensitive_type_ids property of this UpdateLibraryMaskingFormatDetails. + :type sensitive_type_ids: list[str] + + :param format_entries: + The value to assign to the format_entries property of this UpdateLibraryMaskingFormatDetails. + :type format_entries: list[oci.data_safe.models.FormatEntry] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateLibraryMaskingFormatDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateLibraryMaskingFormatDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'sensitive_type_ids': 'list[str]', + 'format_entries': 'list[FormatEntry]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'sensitive_type_ids': 'sensitiveTypeIds', + 'format_entries': 'formatEntries', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._sensitive_type_ids = None + self._format_entries = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateLibraryMaskingFormatDetails. + The display name of the library masking format. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateLibraryMaskingFormatDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateLibraryMaskingFormatDetails. + The display name of the library masking format. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateLibraryMaskingFormatDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateLibraryMaskingFormatDetails. + The description of the library masking format. + + + :return: The description of this UpdateLibraryMaskingFormatDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateLibraryMaskingFormatDetails. + The description of the library masking format. + + + :param description: The description of this UpdateLibraryMaskingFormatDetails. + :type: str + """ + self._description = description + + @property + def sensitive_type_ids(self): + """ + Gets the sensitive_type_ids of this UpdateLibraryMaskingFormatDetails. + An array of OCIDs of the sensitive types compatible with the library masking format. + + + :return: The sensitive_type_ids of this UpdateLibraryMaskingFormatDetails. + :rtype: list[str] + """ + return self._sensitive_type_ids + + @sensitive_type_ids.setter + def sensitive_type_ids(self, sensitive_type_ids): + """ + Sets the sensitive_type_ids of this UpdateLibraryMaskingFormatDetails. + An array of OCIDs of the sensitive types compatible with the library masking format. + + + :param sensitive_type_ids: The sensitive_type_ids of this UpdateLibraryMaskingFormatDetails. + :type: list[str] + """ + self._sensitive_type_ids = sensitive_type_ids + + @property + def format_entries(self): + """ + Gets the format_entries of this UpdateLibraryMaskingFormatDetails. + An array of format entries. The combined output of all the format entries is used for masking. + + + :return: The format_entries of this UpdateLibraryMaskingFormatDetails. + :rtype: list[oci.data_safe.models.FormatEntry] + """ + return self._format_entries + + @format_entries.setter + def format_entries(self, format_entries): + """ + Sets the format_entries of this UpdateLibraryMaskingFormatDetails. + An array of format entries. The combined output of all the format entries is used for masking. + + + :param format_entries: The format_entries of this UpdateLibraryMaskingFormatDetails. + :type: list[oci.data_safe.models.FormatEntry] + """ + self._format_entries = format_entries + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateLibraryMaskingFormatDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateLibraryMaskingFormatDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateLibraryMaskingFormatDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateLibraryMaskingFormatDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateLibraryMaskingFormatDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateLibraryMaskingFormatDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateLibraryMaskingFormatDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateLibraryMaskingFormatDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_masking_column_details.py b/src/oci/data_safe/models/update_masking_column_details.py new file mode 100644 index 0000000000..cdd101f8cc --- /dev/null +++ b/src/oci/data_safe/models/update_masking_column_details.py @@ -0,0 +1,237 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateMaskingColumnDetails(object): + """ + Details to update a masking column. + """ + + #: A constant which can be used with the object_type property of a UpdateMaskingColumnDetails. + #: This constant has a value of "TABLE" + OBJECT_TYPE_TABLE = "TABLE" + + #: A constant which can be used with the object_type property of a UpdateMaskingColumnDetails. + #: This constant has a value of "EDITIONING_VIEW" + OBJECT_TYPE_EDITIONING_VIEW = "EDITIONING_VIEW" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateMaskingColumnDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param object_type: + The value to assign to the object_type property of this UpdateMaskingColumnDetails. + Allowed values for this property are: "TABLE", "EDITIONING_VIEW" + :type object_type: str + + :param masking_column_group: + The value to assign to the masking_column_group property of this UpdateMaskingColumnDetails. + :type masking_column_group: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this UpdateMaskingColumnDetails. + :type sensitive_type_id: str + + :param is_masking_enabled: + The value to assign to the is_masking_enabled property of this UpdateMaskingColumnDetails. + :type is_masking_enabled: bool + + :param masking_formats: + The value to assign to the masking_formats property of this UpdateMaskingColumnDetails. + :type masking_formats: list[oci.data_safe.models.MaskingFormat] + + """ + self.swagger_types = { + 'object_type': 'str', + 'masking_column_group': 'str', + 'sensitive_type_id': 'str', + 'is_masking_enabled': 'bool', + 'masking_formats': 'list[MaskingFormat]' + } + + self.attribute_map = { + 'object_type': 'objectType', + 'masking_column_group': 'maskingColumnGroup', + 'sensitive_type_id': 'sensitiveTypeId', + 'is_masking_enabled': 'isMaskingEnabled', + 'masking_formats': 'maskingFormats' + } + + self._object_type = None + self._masking_column_group = None + self._sensitive_type_id = None + self._is_masking_enabled = None + self._masking_formats = None + + @property + def object_type(self): + """ + Gets the object_type of this UpdateMaskingColumnDetails. + The type of the object that contains the database column. + + Allowed values for this property are: "TABLE", "EDITIONING_VIEW" + + + :return: The object_type of this UpdateMaskingColumnDetails. + :rtype: str + """ + return self._object_type + + @object_type.setter + def object_type(self, object_type): + """ + Sets the object_type of this UpdateMaskingColumnDetails. + The type of the object that contains the database column. + + + :param object_type: The object_type of this UpdateMaskingColumnDetails. + :type: str + """ + allowed_values = ["TABLE", "EDITIONING_VIEW"] + if not value_allowed_none_or_none_sentinel(object_type, allowed_values): + raise ValueError( + "Invalid value for `object_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._object_type = object_type + + @property + def masking_column_group(self): + """ + Gets the masking_column_group of this UpdateMaskingColumnDetails. + The group of the masking column. It's a masking group identifier and can be any + string of acceptable length. All the columns in a group are masked together to + ensure that the masked data across these columns continue to retain the same + logical relationship. For more details, check + Group Masking in the Data Safe documentation. + + + :return: The masking_column_group of this UpdateMaskingColumnDetails. + :rtype: str + """ + return self._masking_column_group + + @masking_column_group.setter + def masking_column_group(self, masking_column_group): + """ + Sets the masking_column_group of this UpdateMaskingColumnDetails. + The group of the masking column. It's a masking group identifier and can be any + string of acceptable length. All the columns in a group are masked together to + ensure that the masked data across these columns continue to retain the same + logical relationship. For more details, check + Group Masking in the Data Safe documentation. + + + :param masking_column_group: The masking_column_group of this UpdateMaskingColumnDetails. + :type: str + """ + self._masking_column_group = masking_column_group + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this UpdateMaskingColumnDetails. + The OCID of the sensitive type to be associated with the masking column. + + + :return: The sensitive_type_id of this UpdateMaskingColumnDetails. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this UpdateMaskingColumnDetails. + The OCID of the sensitive type to be associated with the masking column. + + + :param sensitive_type_id: The sensitive_type_id of this UpdateMaskingColumnDetails. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def is_masking_enabled(self): + """ + Gets the is_masking_enabled of this UpdateMaskingColumnDetails. + Indicates if data masking is enabled for the masking column. Set it to false + if you don't want to mask the column. + + + :return: The is_masking_enabled of this UpdateMaskingColumnDetails. + :rtype: bool + """ + return self._is_masking_enabled + + @is_masking_enabled.setter + def is_masking_enabled(self, is_masking_enabled): + """ + Sets the is_masking_enabled of this UpdateMaskingColumnDetails. + Indicates if data masking is enabled for the masking column. Set it to false + if you don't want to mask the column. + + + :param is_masking_enabled: The is_masking_enabled of this UpdateMaskingColumnDetails. + :type: bool + """ + self._is_masking_enabled = is_masking_enabled + + @property + def masking_formats(self): + """ + Gets the masking_formats of this UpdateMaskingColumnDetails. + The masking formats to be assigned to the masking column. You can specify a + condition as part of each masking format. It enables you to do + conditional masking + so that you can mask the column data values differently using different + masking formats and the associated conditions. A masking format can have + one or more format entries. The combined output of all the format entries is + used for masking. It provides the flexibility to define a masking format that + can generate different parts of a data value separately and then combine them + to get the final data value for masking. + + + :return: The masking_formats of this UpdateMaskingColumnDetails. + :rtype: list[oci.data_safe.models.MaskingFormat] + """ + return self._masking_formats + + @masking_formats.setter + def masking_formats(self, masking_formats): + """ + Sets the masking_formats of this UpdateMaskingColumnDetails. + The masking formats to be assigned to the masking column. You can specify a + condition as part of each masking format. It enables you to do + conditional masking + so that you can mask the column data values differently using different + masking formats and the associated conditions. A masking format can have + one or more format entries. The combined output of all the format entries is + used for masking. It provides the flexibility to define a masking format that + can generate different parts of a data value separately and then combine them + to get the final data value for masking. + + + :param masking_formats: The masking_formats of this UpdateMaskingColumnDetails. + :type: list[oci.data_safe.models.MaskingFormat] + """ + self._masking_formats = masking_formats + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_masking_policy_details.py b/src/oci/data_safe/models/update_masking_policy_details.py new file mode 100644 index 0000000000..5226e456a3 --- /dev/null +++ b/src/oci/data_safe/models/update_masking_policy_details.py @@ -0,0 +1,457 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateMaskingPolicyDetails(object): + """ + Details to update a masking policy. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateMaskingPolicyDetails 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 UpdateMaskingPolicyDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateMaskingPolicyDetails. + :type description: str + + :param is_drop_temp_tables_enabled: + The value to assign to the is_drop_temp_tables_enabled property of this UpdateMaskingPolicyDetails. + :type is_drop_temp_tables_enabled: bool + + :param is_redo_logging_enabled: + The value to assign to the is_redo_logging_enabled property of this UpdateMaskingPolicyDetails. + :type is_redo_logging_enabled: bool + + :param is_refresh_stats_enabled: + The value to assign to the is_refresh_stats_enabled property of this UpdateMaskingPolicyDetails. + :type is_refresh_stats_enabled: bool + + :param parallel_degree: + The value to assign to the parallel_degree property of this UpdateMaskingPolicyDetails. + :type parallel_degree: str + + :param recompile: + The value to assign to the recompile property of this UpdateMaskingPolicyDetails. + :type recompile: str + + :param pre_masking_script: + The value to assign to the pre_masking_script property of this UpdateMaskingPolicyDetails. + :type pre_masking_script: str + + :param post_masking_script: + The value to assign to the post_masking_script property of this UpdateMaskingPolicyDetails. + :type post_masking_script: str + + :param column_source: + The value to assign to the column_source property of this UpdateMaskingPolicyDetails. + :type column_source: oci.data_safe.models.UpdateColumnSourceDetails + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateMaskingPolicyDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateMaskingPolicyDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'is_drop_temp_tables_enabled': 'bool', + 'is_redo_logging_enabled': 'bool', + 'is_refresh_stats_enabled': 'bool', + 'parallel_degree': 'str', + 'recompile': 'str', + 'pre_masking_script': 'str', + 'post_masking_script': 'str', + 'column_source': 'UpdateColumnSourceDetails', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'is_drop_temp_tables_enabled': 'isDropTempTablesEnabled', + 'is_redo_logging_enabled': 'isRedoLoggingEnabled', + 'is_refresh_stats_enabled': 'isRefreshStatsEnabled', + 'parallel_degree': 'parallelDegree', + 'recompile': 'recompile', + 'pre_masking_script': 'preMaskingScript', + 'post_masking_script': 'postMaskingScript', + 'column_source': 'columnSource', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._is_drop_temp_tables_enabled = None + self._is_redo_logging_enabled = None + self._is_refresh_stats_enabled = None + self._parallel_degree = None + self._recompile = None + self._pre_masking_script = None + self._post_masking_script = None + self._column_source = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateMaskingPolicyDetails. + The display name of the masking policy. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateMaskingPolicyDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateMaskingPolicyDetails. + The display name of the masking policy. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateMaskingPolicyDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateMaskingPolicyDetails. + The description of the masking policy. + + + :return: The description of this UpdateMaskingPolicyDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateMaskingPolicyDetails. + The description of the masking policy. + + + :param description: The description of this UpdateMaskingPolicyDetails. + :type: str + """ + self._description = description + + @property + def is_drop_temp_tables_enabled(self): + """ + Gets the is_drop_temp_tables_enabled of this UpdateMaskingPolicyDetails. + Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. + Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want + to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + must be dropped before the database is available for unprivileged users. + + + :return: The is_drop_temp_tables_enabled of this UpdateMaskingPolicyDetails. + :rtype: bool + """ + return self._is_drop_temp_tables_enabled + + @is_drop_temp_tables_enabled.setter + def is_drop_temp_tables_enabled(self, is_drop_temp_tables_enabled): + """ + Sets the is_drop_temp_tables_enabled of this UpdateMaskingPolicyDetails. + Indicates if the temporary tables created during a masking operation should be dropped after masking. It's enabled by default. + Set this attribute to false to preserve the temporary tables. Masking creates temporary tables that map the original sensitive + data values to mask values. By default, these temporary tables are dropped after masking. But, in some cases, you may want + to preserve this information to track how masking changed your data. Note that doing so compromises security. These tables + must be dropped before the database is available for unprivileged users. + + + :param is_drop_temp_tables_enabled: The is_drop_temp_tables_enabled of this UpdateMaskingPolicyDetails. + :type: bool + """ + self._is_drop_temp_tables_enabled = is_drop_temp_tables_enabled + + @property + def is_redo_logging_enabled(self): + """ + Gets the is_redo_logging_enabled of this UpdateMaskingPolicyDetails. + Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to + enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked + data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + + + :return: The is_redo_logging_enabled of this UpdateMaskingPolicyDetails. + :rtype: bool + """ + return self._is_redo_logging_enabled + + @is_redo_logging_enabled.setter + def is_redo_logging_enabled(self, is_redo_logging_enabled): + """ + Sets the is_redo_logging_enabled of this UpdateMaskingPolicyDetails. + Indicates if redo logging is enabled during a masking operation. It's disabled by default. Set this attribute to true to + enable redo logging. By default, masking disables redo logging and flashback logging to purge any original unmasked + data from logs. However, in certain circumstances when you only want to test masking, rollback changes, and retry masking, + you could enable logging and use a flashback database to retrieve the original unmasked data after it has been masked. + + + :param is_redo_logging_enabled: The is_redo_logging_enabled of this UpdateMaskingPolicyDetails. + :type: bool + """ + self._is_redo_logging_enabled = is_redo_logging_enabled + + @property + def is_refresh_stats_enabled(self): + """ + Gets the is_refresh_stats_enabled of this UpdateMaskingPolicyDetails. + Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics + gathering. The masking process gathers statistics on masked database tables after masking completes. + + + :return: The is_refresh_stats_enabled of this UpdateMaskingPolicyDetails. + :rtype: bool + """ + return self._is_refresh_stats_enabled + + @is_refresh_stats_enabled.setter + def is_refresh_stats_enabled(self, is_refresh_stats_enabled): + """ + Sets the is_refresh_stats_enabled of this UpdateMaskingPolicyDetails. + Indicates if statistics gathering is enabled. It's enabled by default. Set this attribute to false to disable statistics + gathering. The masking process gathers statistics on masked database tables after masking completes. + + + :param is_refresh_stats_enabled: The is_refresh_stats_enabled of this UpdateMaskingPolicyDetails. + :type: bool + """ + self._is_refresh_stats_enabled = is_refresh_stats_enabled + + @property + def parallel_degree(self): + """ + Gets the parallel_degree of this UpdateMaskingPolicyDetails. + Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + + + :return: The parallel_degree of this UpdateMaskingPolicyDetails. + :rtype: str + """ + return self._parallel_degree + + @parallel_degree.setter + def parallel_degree(self, parallel_degree): + """ + Sets the parallel_degree of this UpdateMaskingPolicyDetails. + Specifies options to enable parallel execution when running data masking. Allowed values are 'NONE' (no parallelism), + 'DEFAULT' (the Oracle Database computes the optimum degree of parallelism) or an integer value to be used as the degree + of parallelism. Parallel execution helps effectively use multiple CPUsi and improve masking performance. Refer to the + Oracle Database parallel execution framework when choosing an explicit degree of parallelism. + + + :param parallel_degree: The parallel_degree of this UpdateMaskingPolicyDetails. + :type: str + """ + self._parallel_degree = parallel_degree + + @property + def recompile(self): + """ + Gets the recompile of this UpdateMaskingPolicyDetails. + Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + attribute is used. + + + :return: The recompile of this UpdateMaskingPolicyDetails. + :rtype: str + """ + return self._recompile + + @recompile.setter + def recompile(self, recompile): + """ + Sets the recompile of this UpdateMaskingPolicyDetails. + Specifies how to recompile invalid objects post data masking. Allowed values are 'SERIAL' (recompile in serial), + 'PARALLEL' (recompile in parallel), 'NONE' (do not recompile). If it's set to PARALLEL, the value of parallelDegree + attribute is used. + + + :param recompile: The recompile of this UpdateMaskingPolicyDetails. + :type: str + """ + self._recompile = recompile + + @property + def pre_masking_script(self): + """ + Gets the pre_masking_script of this UpdateMaskingPolicyDetails. + A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before + the core masking script generated using the masking policy. It's usually used to perform + any preparation or prerequisite work before masking data. + + + :return: The pre_masking_script of this UpdateMaskingPolicyDetails. + :rtype: str + """ + return self._pre_masking_script + + @pre_masking_script.setter + def pre_masking_script(self, pre_masking_script): + """ + Sets the pre_masking_script of this UpdateMaskingPolicyDetails. + A pre-masking script, which can contain SQL and PL/SQL statements. It's executed before + the core masking script generated using the masking policy. It's usually used to perform + any preparation or prerequisite work before masking data. + + + :param pre_masking_script: The pre_masking_script of this UpdateMaskingPolicyDetails. + :type: str + """ + self._pre_masking_script = pre_masking_script + + @property + def post_masking_script(self): + """ + Gets the post_masking_script of this UpdateMaskingPolicyDetails. + A post-masking script, which can contain SQL and PL/SQL statements. It's executed after + the core masking script generated using the masking policy. It's usually used to perform + additional transformation or cleanup work after masking. + + + :return: The post_masking_script of this UpdateMaskingPolicyDetails. + :rtype: str + """ + return self._post_masking_script + + @post_masking_script.setter + def post_masking_script(self, post_masking_script): + """ + Sets the post_masking_script of this UpdateMaskingPolicyDetails. + A post-masking script, which can contain SQL and PL/SQL statements. It's executed after + the core masking script generated using the masking policy. It's usually used to perform + additional transformation or cleanup work after masking. + + + :param post_masking_script: The post_masking_script of this UpdateMaskingPolicyDetails. + :type: str + """ + self._post_masking_script = post_masking_script + + @property + def column_source(self): + """ + Gets the column_source of this UpdateMaskingPolicyDetails. + + :return: The column_source of this UpdateMaskingPolicyDetails. + :rtype: oci.data_safe.models.UpdateColumnSourceDetails + """ + return self._column_source + + @column_source.setter + def column_source(self, column_source): + """ + Sets the column_source of this UpdateMaskingPolicyDetails. + + :param column_source: The column_source of this UpdateMaskingPolicyDetails. + :type: oci.data_safe.models.UpdateColumnSourceDetails + """ + self._column_source = column_source + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateMaskingPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateMaskingPolicyDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateMaskingPolicyDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateMaskingPolicyDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateMaskingPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateMaskingPolicyDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateMaskingPolicyDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateMaskingPolicyDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_report_definition_details.py b/src/oci/data_safe/models/update_report_definition_details.py new file mode 100644 index 0000000000..29f551fae4 --- /dev/null +++ b/src/oci/data_safe/models/update_report_definition_details.py @@ -0,0 +1,303 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateReportDefinitionDetails(object): + """ + Description of a new report definition. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateReportDefinitionDetails 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 UpdateReportDefinitionDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateReportDefinitionDetails. + :type description: str + + :param column_info: + The value to assign to the column_info property of this UpdateReportDefinitionDetails. + :type column_info: list[oci.data_safe.models.Column] + + :param column_filters: + The value to assign to the column_filters property of this UpdateReportDefinitionDetails. + :type column_filters: list[oci.data_safe.models.ColumnFilter] + + :param column_sortings: + The value to assign to the column_sortings property of this UpdateReportDefinitionDetails. + :type column_sortings: list[oci.data_safe.models.ColumnSorting] + + :param summary: + The value to assign to the summary property of this UpdateReportDefinitionDetails. + :type summary: list[oci.data_safe.models.Summary] + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateReportDefinitionDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateReportDefinitionDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'description': 'str', + 'column_info': 'list[Column]', + 'column_filters': 'list[ColumnFilter]', + 'column_sortings': 'list[ColumnSorting]', + 'summary': 'list[Summary]', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'description': 'description', + 'column_info': 'columnInfo', + 'column_filters': 'columnFilters', + 'column_sortings': 'columnSortings', + 'summary': 'summary', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._description = None + self._column_info = None + self._column_filters = None + self._column_sortings = None + self._summary = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + **[Required]** Gets the display_name of this UpdateReportDefinitionDetails. + Specifies the name of the report definition. + + + :return: The display_name of this UpdateReportDefinitionDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateReportDefinitionDetails. + Specifies the name of the report definition. + + + :param display_name: The display_name of this UpdateReportDefinitionDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateReportDefinitionDetails. + A description of the report definition. + + + :return: The description of this UpdateReportDefinitionDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateReportDefinitionDetails. + A description of the report definition. + + + :param description: The description of this UpdateReportDefinitionDetails. + :type: str + """ + self._description = description + + @property + def column_info(self): + """ + **[Required]** Gets the column_info of this UpdateReportDefinitionDetails. + An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). + + + :return: The column_info of this UpdateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.Column] + """ + return self._column_info + + @column_info.setter + def column_info(self, column_info): + """ + Sets the column_info of this UpdateReportDefinitionDetails. + An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user). + + + :param column_info: The column_info of this UpdateReportDefinitionDetails. + :type: list[oci.data_safe.models.Column] + """ + self._column_info = column_info + + @property + def column_filters(self): + """ + **[Required]** Gets the column_filters of this UpdateReportDefinitionDetails. + An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + + + :return: The column_filters of this UpdateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.ColumnFilter] + """ + return self._column_filters + + @column_filters.setter + def column_filters(self, column_filters): + """ + Sets the column_filters of this UpdateReportDefinitionDetails. + An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden. + + + :param column_filters: The column_filters of this UpdateReportDefinitionDetails. + :type: list[oci.data_safe.models.ColumnFilter] + """ + self._column_filters = column_filters + + @property + def column_sortings(self): + """ + **[Required]** Gets the column_sortings of this UpdateReportDefinitionDetails. + An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. + + + :return: The column_sortings of this UpdateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.ColumnSorting] + """ + return self._column_sortings + + @column_sortings.setter + def column_sortings(self, column_sortings): + """ + Sets the column_sortings of this UpdateReportDefinitionDetails. + An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc. + + + :param column_sortings: The column_sortings of this UpdateReportDefinitionDetails. + :type: list[oci.data_safe.models.ColumnSorting] + """ + self._column_sortings = column_sortings + + @property + def summary(self): + """ + **[Required]** Gets the summary of this UpdateReportDefinitionDetails. + An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). + + + :return: The summary of this UpdateReportDefinitionDetails. + :rtype: list[oci.data_safe.models.Summary] + """ + return self._summary + + @summary.setter + def summary(self, summary): + """ + Sets the summary of this UpdateReportDefinitionDetails. + An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user). + + + :param summary: The summary of this UpdateReportDefinitionDetails. + :type: list[oci.data_safe.models.Summary] + """ + self._summary = summary + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateReportDefinitionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateReportDefinitionDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateReportDefinitionDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateReportDefinitionDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateReportDefinitionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateReportDefinitionDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateReportDefinitionDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateReportDefinitionDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_sensitive_category_details.py b/src/oci/data_safe/models/update_sensitive_category_details.py new file mode 100644 index 0000000000..bdb3f37ce0 --- /dev/null +++ b/src/oci/data_safe/models/update_sensitive_category_details.py @@ -0,0 +1,91 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_sensitive_type_details import UpdateSensitiveTypeDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateSensitiveCategoryDetails(UpdateSensitiveTypeDetails): + """ + Details to update a sensitive category. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSensitiveCategoryDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.UpdateSensitiveCategoryDetails.entity_type` attribute + of this class is ``SENSITIVE_CATEGORY`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this UpdateSensitiveCategoryDetails. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this UpdateSensitiveCategoryDetails. + :type display_name: str + + :param short_name: + The value to assign to the short_name property of this UpdateSensitiveCategoryDetails. + :type short_name: str + + :param description: + The value to assign to the description property of this UpdateSensitiveCategoryDetails. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this UpdateSensitiveCategoryDetails. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateSensitiveCategoryDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateSensitiveCategoryDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_type': 'str', + 'display_name': 'str', + 'short_name': 'str', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'short_name': 'shortName', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_type = None + self._display_name = None + self._short_name = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._entity_type = 'SENSITIVE_CATEGORY' + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_sensitive_column_details.py b/src/oci/data_safe/models/update_sensitive_column_details.py new file mode 100644 index 0000000000..d3d84e4681 --- /dev/null +++ b/src/oci/data_safe/models/update_sensitive_column_details.py @@ -0,0 +1,322 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateSensitiveColumnDetails(object): + """ + Details to update a sensitive column in a sensitive data model. + """ + + #: A constant which can be used with the status property of a UpdateSensitiveColumnDetails. + #: This constant has a value of "VALID" + STATUS_VALID = "VALID" + + #: A constant which can be used with the status property of a UpdateSensitiveColumnDetails. + #: This constant has a value of "INVALID" + STATUS_INVALID = "INVALID" + + #: A constant which can be used with the relation_type property of a UpdateSensitiveColumnDetails. + #: This constant has a value of "NONE" + RELATION_TYPE_NONE = "NONE" + + #: A constant which can be used with the relation_type property of a UpdateSensitiveColumnDetails. + #: This constant has a value of "APP_DEFINED" + RELATION_TYPE_APP_DEFINED = "APP_DEFINED" + + #: A constant which can be used with the relation_type property of a UpdateSensitiveColumnDetails. + #: This constant has a value of "DB_DEFINED" + RELATION_TYPE_DB_DEFINED = "DB_DEFINED" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSensitiveColumnDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param data_type: + The value to assign to the data_type property of this UpdateSensitiveColumnDetails. + :type data_type: str + + :param status: + The value to assign to the status property of this UpdateSensitiveColumnDetails. + Allowed values for this property are: "VALID", "INVALID" + :type status: str + + :param sensitive_type_id: + The value to assign to the sensitive_type_id property of this UpdateSensitiveColumnDetails. + :type sensitive_type_id: str + + :param parent_column_keys: + The value to assign to the parent_column_keys property of this UpdateSensitiveColumnDetails. + :type parent_column_keys: list[str] + + :param relation_type: + The value to assign to the relation_type property of this UpdateSensitiveColumnDetails. + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED" + :type relation_type: str + + :param app_defined_child_column_keys: + The value to assign to the app_defined_child_column_keys property of this UpdateSensitiveColumnDetails. + :type app_defined_child_column_keys: list[str] + + :param db_defined_child_column_keys: + The value to assign to the db_defined_child_column_keys property of this UpdateSensitiveColumnDetails. + :type db_defined_child_column_keys: list[str] + + """ + self.swagger_types = { + 'data_type': 'str', + 'status': 'str', + 'sensitive_type_id': 'str', + 'parent_column_keys': 'list[str]', + 'relation_type': 'str', + 'app_defined_child_column_keys': 'list[str]', + 'db_defined_child_column_keys': 'list[str]' + } + + self.attribute_map = { + 'data_type': 'dataType', + 'status': 'status', + 'sensitive_type_id': 'sensitiveTypeId', + 'parent_column_keys': 'parentColumnKeys', + 'relation_type': 'relationType', + 'app_defined_child_column_keys': 'appDefinedChildColumnKeys', + 'db_defined_child_column_keys': 'dbDefinedChildColumnKeys' + } + + self._data_type = None + self._status = None + self._sensitive_type_id = None + self._parent_column_keys = None + self._relation_type = None + self._app_defined_child_column_keys = None + self._db_defined_child_column_keys = None + + @property + def data_type(self): + """ + Gets the data_type of this UpdateSensitiveColumnDetails. + The data type of the sensitive column. + + + :return: The data_type of this UpdateSensitiveColumnDetails. + :rtype: str + """ + return self._data_type + + @data_type.setter + def data_type(self, data_type): + """ + Sets the data_type of this UpdateSensitiveColumnDetails. + The data type of the sensitive column. + + + :param data_type: The data_type of this UpdateSensitiveColumnDetails. + :type: str + """ + self._data_type = data_type + + @property + def status(self): + """ + Gets the status of this UpdateSensitiveColumnDetails. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an incremental + data discovery job does not identify these columns as sensitive. + + Allowed values for this property are: "VALID", "INVALID" + + + :return: The status of this UpdateSensitiveColumnDetails. + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """ + Sets the status of this UpdateSensitiveColumnDetails. + The status of the sensitive column. VALID means the column is considered sensitive. INVALID means the column + is not considered sensitive. Tracking invalid columns in a sensitive data model helps ensure that an incremental + data discovery job does not identify these columns as sensitive. + + + :param status: The status of this UpdateSensitiveColumnDetails. + :type: str + """ + allowed_values = ["VALID", "INVALID"] + if not value_allowed_none_or_none_sentinel(status, allowed_values): + raise ValueError( + "Invalid value for `status`, must be None or one of {0}" + .format(allowed_values) + ) + self._status = status + + @property + def sensitive_type_id(self): + """ + Gets the sensitive_type_id of this UpdateSensitiveColumnDetails. + The OCID of the sensitive type to be associated with the sensitive column. + + + :return: The sensitive_type_id of this UpdateSensitiveColumnDetails. + :rtype: str + """ + return self._sensitive_type_id + + @sensitive_type_id.setter + def sensitive_type_id(self, sensitive_type_id): + """ + Sets the sensitive_type_id of this UpdateSensitiveColumnDetails. + The OCID of the sensitive type to be associated with the sensitive column. + + + :param sensitive_type_id: The sensitive_type_id of this UpdateSensitiveColumnDetails. + :type: str + """ + self._sensitive_type_id = sensitive_type_id + + @property + def parent_column_keys(self): + """ + Gets the parent_column_keys of this UpdateSensitiveColumnDetails. + Unique keys identifying the columns that are parents of the sensitive column. At present, it accepts only one + parent column key. This attribute can be used to establish relationship between columns in a sensitive data model. + Note that the parent column must be added to the sensitive data model before its key can be specified here. + If this attribute is provided, the appDefinedChildColumnKeys or dbDefinedChildColumnKeys attribute of the + parent column is automatically updated to reflect the relationship. + + + :return: The parent_column_keys of this UpdateSensitiveColumnDetails. + :rtype: list[str] + """ + return self._parent_column_keys + + @parent_column_keys.setter + def parent_column_keys(self, parent_column_keys): + """ + Sets the parent_column_keys of this UpdateSensitiveColumnDetails. + Unique keys identifying the columns that are parents of the sensitive column. At present, it accepts only one + parent column key. This attribute can be used to establish relationship between columns in a sensitive data model. + Note that the parent column must be added to the sensitive data model before its key can be specified here. + If this attribute is provided, the appDefinedChildColumnKeys or dbDefinedChildColumnKeys attribute of the + parent column is automatically updated to reflect the relationship. + + + :param parent_column_keys: The parent_column_keys of this UpdateSensitiveColumnDetails. + :type: list[str] + """ + self._parent_column_keys = parent_column_keys + + @property + def relation_type(self): + """ + Gets the relation_type of this UpdateSensitiveColumnDetails. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + Allowed values for this property are: "NONE", "APP_DEFINED", "DB_DEFINED" + + + :return: The relation_type of this UpdateSensitiveColumnDetails. + :rtype: str + """ + return self._relation_type + + @relation_type.setter + def relation_type(self, relation_type): + """ + Sets the relation_type of this UpdateSensitiveColumnDetails. + The type of referential relationship the sensitive column has with its parent. NONE indicates that the sensitive + column does not have a parent. DB_DEFINED indicates that the relationship is defined in the database dictionary. + APP_DEFINED indicates that the relationship is defined at the application level and not in the database dictionary. + + + :param relation_type: The relation_type of this UpdateSensitiveColumnDetails. + :type: str + """ + allowed_values = ["NONE", "APP_DEFINED", "DB_DEFINED"] + if not value_allowed_none_or_none_sentinel(relation_type, allowed_values): + raise ValueError( + "Invalid value for `relation_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._relation_type = relation_type + + @property + def app_defined_child_column_keys(self): + """ + Gets the app_defined_child_column_keys of this UpdateSensitiveColumnDetails. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :return: The app_defined_child_column_keys of this UpdateSensitiveColumnDetails. + :rtype: list[str] + """ + return self._app_defined_child_column_keys + + @app_defined_child_column_keys.setter + def app_defined_child_column_keys(self, app_defined_child_column_keys): + """ + Sets the app_defined_child_column_keys of this UpdateSensitiveColumnDetails. + Unique keys identifying the columns that are application-level (non-dictionary) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :param app_defined_child_column_keys: The app_defined_child_column_keys of this UpdateSensitiveColumnDetails. + :type: list[str] + """ + self._app_defined_child_column_keys = app_defined_child_column_keys + + @property + def db_defined_child_column_keys(self): + """ + Gets the db_defined_child_column_keys of this UpdateSensitiveColumnDetails. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :return: The db_defined_child_column_keys of this UpdateSensitiveColumnDetails. + :rtype: list[str] + """ + return self._db_defined_child_column_keys + + @db_defined_child_column_keys.setter + def db_defined_child_column_keys(self, db_defined_child_column_keys): + """ + Sets the db_defined_child_column_keys of this UpdateSensitiveColumnDetails. + Unique keys identifying the columns that are database-level (dictionary-defined) children of the sensitive column. + This attribute can be used to establish relationship between columns in a sensitive data model. Note that the + child columns must be added to the sensitive data model before their keys can be specified here. If this attribute + is provided, the parentColumnKeys and relationType attributes of the child columns are automatically updated to reflect the relationship. + + + :param db_defined_child_column_keys: The db_defined_child_column_keys of this UpdateSensitiveColumnDetails. + :type: list[str] + """ + self._db_defined_child_column_keys = db_defined_child_column_keys + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_sensitive_data_model_details.py b/src/oci/data_safe/models/update_sensitive_data_model_details.py new file mode 100644 index 0000000000..7b03df2538 --- /dev/null +++ b/src/oci/data_safe/models/update_sensitive_data_model_details.py @@ -0,0 +1,389 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateSensitiveDataModelDetails(object): + """ + Details to update a sensitive data model. Note that updating any attribute of a sensitive data model does not perform data discovery. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSensitiveDataModelDetails 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 UpdateSensitiveDataModelDetails. + :type display_name: str + + :param target_id: + The value to assign to the target_id property of this UpdateSensitiveDataModelDetails. + :type target_id: str + + :param app_suite_name: + The value to assign to the app_suite_name property of this UpdateSensitiveDataModelDetails. + :type app_suite_name: str + + :param description: + The value to assign to the description property of this UpdateSensitiveDataModelDetails. + :type description: str + + :param schemas_for_discovery: + The value to assign to the schemas_for_discovery property of this UpdateSensitiveDataModelDetails. + :type schemas_for_discovery: list[str] + + :param sensitive_type_ids_for_discovery: + The value to assign to the sensitive_type_ids_for_discovery property of this UpdateSensitiveDataModelDetails. + :type sensitive_type_ids_for_discovery: list[str] + + :param is_sample_data_collection_enabled: + The value to assign to the is_sample_data_collection_enabled property of this UpdateSensitiveDataModelDetails. + :type is_sample_data_collection_enabled: bool + + :param is_app_defined_relation_discovery_enabled: + The value to assign to the is_app_defined_relation_discovery_enabled property of this UpdateSensitiveDataModelDetails. + :type is_app_defined_relation_discovery_enabled: bool + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateSensitiveDataModelDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateSensitiveDataModelDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'display_name': 'str', + 'target_id': 'str', + 'app_suite_name': 'str', + 'description': 'str', + 'schemas_for_discovery': 'list[str]', + 'sensitive_type_ids_for_discovery': 'list[str]', + 'is_sample_data_collection_enabled': 'bool', + 'is_app_defined_relation_discovery_enabled': 'bool', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'display_name': 'displayName', + 'target_id': 'targetId', + 'app_suite_name': 'appSuiteName', + 'description': 'description', + 'schemas_for_discovery': 'schemasForDiscovery', + 'sensitive_type_ids_for_discovery': 'sensitiveTypeIdsForDiscovery', + 'is_sample_data_collection_enabled': 'isSampleDataCollectionEnabled', + 'is_app_defined_relation_discovery_enabled': 'isAppDefinedRelationDiscoveryEnabled', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._display_name = None + self._target_id = None + self._app_suite_name = None + self._description = None + self._schemas_for_discovery = None + self._sensitive_type_ids_for_discovery = None + self._is_sample_data_collection_enabled = None + self._is_app_defined_relation_discovery_enabled = None + self._freeform_tags = None + self._defined_tags = None + + @property + def display_name(self): + """ + Gets the display_name of this UpdateSensitiveDataModelDetails. + The display name of the sensitive data model. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateSensitiveDataModelDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateSensitiveDataModelDetails. + The display name of the sensitive data model. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateSensitiveDataModelDetails. + :type: str + """ + self._display_name = display_name + + @property + def target_id(self): + """ + Gets the target_id of this UpdateSensitiveDataModelDetails. + The OCID of the reference target database to be associated with the sensitive data model. All operations such as + performing data discovery and adding columns manually are done in the context of the associated target database. + Note that updating the targetId attribute does not perform data discovery automatically. + + + :return: The target_id of this UpdateSensitiveDataModelDetails. + :rtype: str + """ + return self._target_id + + @target_id.setter + def target_id(self, target_id): + """ + Sets the target_id of this UpdateSensitiveDataModelDetails. + The OCID of the reference target database to be associated with the sensitive data model. All operations such as + performing data discovery and adding columns manually are done in the context of the associated target database. + Note that updating the targetId attribute does not perform data discovery automatically. + + + :param target_id: The target_id of this UpdateSensitiveDataModelDetails. + :type: str + """ + self._target_id = target_id + + @property + def app_suite_name(self): + """ + Gets the app_suite_name of this UpdateSensitiveDataModelDetails. + The application suite name identifying a collection of applications. It's useful only if maintaining a sensitive data model for a suite of applications. + + + :return: The app_suite_name of this UpdateSensitiveDataModelDetails. + :rtype: str + """ + return self._app_suite_name + + @app_suite_name.setter + def app_suite_name(self, app_suite_name): + """ + Sets the app_suite_name of this UpdateSensitiveDataModelDetails. + The application suite name identifying a collection of applications. It's useful only if maintaining a sensitive data model for a suite of applications. + + + :param app_suite_name: The app_suite_name of this UpdateSensitiveDataModelDetails. + :type: str + """ + self._app_suite_name = app_suite_name + + @property + def description(self): + """ + Gets the description of this UpdateSensitiveDataModelDetails. + The description of the sensitive data model. + + + :return: The description of this UpdateSensitiveDataModelDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateSensitiveDataModelDetails. + The description of the sensitive data model. + + + :param description: The description of this UpdateSensitiveDataModelDetails. + :type: str + """ + self._description = description + + @property + def schemas_for_discovery(self): + """ + Gets the schemas_for_discovery of this UpdateSensitiveDataModelDetails. + The schemas to be used for future data discovery jobs. + + + :return: The schemas_for_discovery of this UpdateSensitiveDataModelDetails. + :rtype: list[str] + """ + return self._schemas_for_discovery + + @schemas_for_discovery.setter + def schemas_for_discovery(self, schemas_for_discovery): + """ + Sets the schemas_for_discovery of this UpdateSensitiveDataModelDetails. + The schemas to be used for future data discovery jobs. + + + :param schemas_for_discovery: The schemas_for_discovery of this UpdateSensitiveDataModelDetails. + :type: list[str] + """ + self._schemas_for_discovery = schemas_for_discovery + + @property + def sensitive_type_ids_for_discovery(self): + """ + Gets the sensitive_type_ids_for_discovery of this UpdateSensitiveDataModelDetails. + The OCIDs of the sensitive types to be used for future data discovery jobs. If OCID of a sensitive category is + provided, all its child sensitive types are used for data discovery. + + + :return: The sensitive_type_ids_for_discovery of this UpdateSensitiveDataModelDetails. + :rtype: list[str] + """ + return self._sensitive_type_ids_for_discovery + + @sensitive_type_ids_for_discovery.setter + def sensitive_type_ids_for_discovery(self, sensitive_type_ids_for_discovery): + """ + Sets the sensitive_type_ids_for_discovery of this UpdateSensitiveDataModelDetails. + The OCIDs of the sensitive types to be used for future data discovery jobs. If OCID of a sensitive category is + provided, all its child sensitive types are used for data discovery. + + + :param sensitive_type_ids_for_discovery: The sensitive_type_ids_for_discovery of this UpdateSensitiveDataModelDetails. + :type: list[str] + """ + self._sensitive_type_ids_for_discovery = sensitive_type_ids_for_discovery + + @property + def is_sample_data_collection_enabled(self): + """ + Gets the is_sample_data_collection_enabled of this UpdateSensitiveDataModelDetails. + Indicates if data discovery jobs should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only + if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data + values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :return: The is_sample_data_collection_enabled of this UpdateSensitiveDataModelDetails. + :rtype: bool + """ + return self._is_sample_data_collection_enabled + + @is_sample_data_collection_enabled.setter + def is_sample_data_collection_enabled(self, is_sample_data_collection_enabled): + """ + Sets the is_sample_data_collection_enabled of this UpdateSensitiveDataModelDetails. + Indicates if data discovery jobs should collect and store sample data values for the discovered columns. + Sample data helps review the discovered columns and ensure that they actually contain sensitive data. + As it collects original data from the target database, it's disabled by default and should be used only + if it's acceptable to store sample data in Data Safe's repository in Oracle Cloud. Note that sample data + values are not collected for columns with the following data types: LONG, LOB, RAW, XMLTYPE and BFILE. + + + :param is_sample_data_collection_enabled: The is_sample_data_collection_enabled of this UpdateSensitiveDataModelDetails. + :type: bool + """ + self._is_sample_data_collection_enabled = is_sample_data_collection_enabled + + @property + def is_app_defined_relation_discovery_enabled(self): + """ + Gets the is_app_defined_relation_discovery_enabled of this UpdateSensitiveDataModelDetails. + Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential + relationships between columns. Note that data discovery automatically identifies and adds database-level + (dictionary-defined) relationships. This option helps identify application-level relationships that are not + defined in the database dictionary, which in turn, helps identify additional sensitive columns and preserve + referential integrity during data masking. It's disabled by default and should be used only if there is a + need to identify application-level relationships. + + + :return: The is_app_defined_relation_discovery_enabled of this UpdateSensitiveDataModelDetails. + :rtype: bool + """ + return self._is_app_defined_relation_discovery_enabled + + @is_app_defined_relation_discovery_enabled.setter + def is_app_defined_relation_discovery_enabled(self, is_app_defined_relation_discovery_enabled): + """ + Sets the is_app_defined_relation_discovery_enabled of this UpdateSensitiveDataModelDetails. + Indicates if data discovery jobs should identify potential application-level (non-dictionary) referential + relationships between columns. Note that data discovery automatically identifies and adds database-level + (dictionary-defined) relationships. This option helps identify application-level relationships that are not + defined in the database dictionary, which in turn, helps identify additional sensitive columns and preserve + referential integrity during data masking. It's disabled by default and should be used only if there is a + need to identify application-level relationships. + + + :param is_app_defined_relation_discovery_enabled: The is_app_defined_relation_discovery_enabled of this UpdateSensitiveDataModelDetails. + :type: bool + """ + self._is_app_defined_relation_discovery_enabled = is_app_defined_relation_discovery_enabled + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateSensitiveDataModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateSensitiveDataModelDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateSensitiveDataModelDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateSensitiveDataModelDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateSensitiveDataModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateSensitiveDataModelDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateSensitiveDataModelDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateSensitiveDataModelDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_sensitive_type_details.py b/src/oci/data_safe/models/update_sensitive_type_details.py new file mode 100644 index 0000000000..79c24f29d9 --- /dev/null +++ b/src/oci/data_safe/models/update_sensitive_type_details.py @@ -0,0 +1,312 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateSensitiveTypeDetails(object): + """ + Details to update a sensitive type. + """ + + #: A constant which can be used with the entity_type property of a UpdateSensitiveTypeDetails. + #: This constant has a value of "SENSITIVE_TYPE" + ENTITY_TYPE_SENSITIVE_TYPE = "SENSITIVE_TYPE" + + #: A constant which can be used with the entity_type property of a UpdateSensitiveTypeDetails. + #: This constant has a value of "SENSITIVE_CATEGORY" + ENTITY_TYPE_SENSITIVE_CATEGORY = "SENSITIVE_CATEGORY" + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSensitiveTypeDetails object with values from keyword arguments. This class has the following subclasses and if you are using this class as input + to a service operations then you should favor using a subclass over the base class: + + * :class:`~oci.data_safe.models.UpdateSensitiveCategoryDetails` + * :class:`~oci.data_safe.models.UpdateSensitiveTypePatternDetails` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this UpdateSensitiveTypeDetails. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this UpdateSensitiveTypeDetails. + :type display_name: str + + :param short_name: + The value to assign to the short_name property of this UpdateSensitiveTypeDetails. + :type short_name: str + + :param description: + The value to assign to the description property of this UpdateSensitiveTypeDetails. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this UpdateSensitiveTypeDetails. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateSensitiveTypeDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateSensitiveTypeDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'entity_type': 'str', + 'display_name': 'str', + 'short_name': 'str', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'short_name': 'shortName', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._entity_type = None + self._display_name = None + self._short_name = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + + @staticmethod + def get_subtype(object_dictionary): + """ + Given the hash representation of a subtype of this class, + use the info in the hash to return the class of the subtype. + """ + type = object_dictionary['entityType'] + + if type == 'SENSITIVE_CATEGORY': + return 'UpdateSensitiveCategoryDetails' + + if type == 'SENSITIVE_TYPE': + return 'UpdateSensitiveTypePatternDetails' + else: + return 'UpdateSensitiveTypeDetails' + + @property + def entity_type(self): + """ + **[Required]** Gets the entity_type of this UpdateSensitiveTypeDetails. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + + + :return: The entity_type of this UpdateSensitiveTypeDetails. + :rtype: str + """ + return self._entity_type + + @entity_type.setter + def entity_type(self, entity_type): + """ + Sets the entity_type of this UpdateSensitiveTypeDetails. + The entity type. It can be either a sensitive type with regular expressions or a sensitive category used for + grouping similar sensitive types. + + + :param entity_type: The entity_type of this UpdateSensitiveTypeDetails. + :type: str + """ + allowed_values = ["SENSITIVE_TYPE", "SENSITIVE_CATEGORY"] + if not value_allowed_none_or_none_sentinel(entity_type, allowed_values): + raise ValueError( + "Invalid value for `entity_type`, must be None or one of {0}" + .format(allowed_values) + ) + self._entity_type = entity_type + + @property + def display_name(self): + """ + Gets the display_name of this UpdateSensitiveTypeDetails. + The display name of the sensitive type. The name does not have to be unique, and it's changeable. + + + :return: The display_name of this UpdateSensitiveTypeDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateSensitiveTypeDetails. + The display name of the sensitive type. The name does not have to be unique, and it's changeable. + + + :param display_name: The display_name of this UpdateSensitiveTypeDetails. + :type: str + """ + self._display_name = display_name + + @property + def short_name(self): + """ + Gets the short_name of this UpdateSensitiveTypeDetails. + The short name of the sensitive type. + + + :return: The short_name of this UpdateSensitiveTypeDetails. + :rtype: str + """ + return self._short_name + + @short_name.setter + def short_name(self, short_name): + """ + Sets the short_name of this UpdateSensitiveTypeDetails. + The short name of the sensitive type. + + + :param short_name: The short_name of this UpdateSensitiveTypeDetails. + :type: str + """ + self._short_name = short_name + + @property + def description(self): + """ + Gets the description of this UpdateSensitiveTypeDetails. + The description of the sensitive type. + + + :return: The description of this UpdateSensitiveTypeDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateSensitiveTypeDetails. + The description of the sensitive type. + + + :param description: The description of this UpdateSensitiveTypeDetails. + :type: str + """ + self._description = description + + @property + def parent_category_id(self): + """ + Gets the parent_category_id of this UpdateSensitiveTypeDetails. + The OCID of the parent sensitive category. + + + :return: The parent_category_id of this UpdateSensitiveTypeDetails. + :rtype: str + """ + return self._parent_category_id + + @parent_category_id.setter + def parent_category_id(self, parent_category_id): + """ + Sets the parent_category_id of this UpdateSensitiveTypeDetails. + The OCID of the parent sensitive category. + + + :param parent_category_id: The parent_category_id of this UpdateSensitiveTypeDetails. + :type: str + """ + self._parent_category_id = parent_category_id + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateSensitiveTypeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateSensitiveTypeDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateSensitiveTypeDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateSensitiveTypeDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateSensitiveTypeDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateSensitiveTypeDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateSensitiveTypeDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateSensitiveTypeDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_sensitive_type_pattern_details.py b/src/oci/data_safe/models/update_sensitive_type_pattern_details.py new file mode 100644 index 0000000000..2e838f5acf --- /dev/null +++ b/src/oci/data_safe/models/update_sensitive_type_pattern_details.py @@ -0,0 +1,252 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .update_sensitive_type_details import UpdateSensitiveTypeDetails +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateSensitiveTypePatternDetails(UpdateSensitiveTypeDetails): + """ + Details to update a sensitive type with regular expressions. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateSensitiveTypePatternDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.data_safe.models.UpdateSensitiveTypePatternDetails.entity_type` attribute + of this class is ``SENSITIVE_TYPE`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param entity_type: + The value to assign to the entity_type property of this UpdateSensitiveTypePatternDetails. + Allowed values for this property are: "SENSITIVE_TYPE", "SENSITIVE_CATEGORY" + :type entity_type: str + + :param display_name: + The value to assign to the display_name property of this UpdateSensitiveTypePatternDetails. + :type display_name: str + + :param short_name: + The value to assign to the short_name property of this UpdateSensitiveTypePatternDetails. + :type short_name: str + + :param description: + The value to assign to the description property of this UpdateSensitiveTypePatternDetails. + :type description: str + + :param parent_category_id: + The value to assign to the parent_category_id property of this UpdateSensitiveTypePatternDetails. + :type parent_category_id: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateSensitiveTypePatternDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateSensitiveTypePatternDetails. + :type defined_tags: dict(str, dict(str, object)) + + :param name_pattern: + The value to assign to the name_pattern property of this UpdateSensitiveTypePatternDetails. + :type name_pattern: str + + :param comment_pattern: + The value to assign to the comment_pattern property of this UpdateSensitiveTypePatternDetails. + :type comment_pattern: str + + :param data_pattern: + The value to assign to the data_pattern property of this UpdateSensitiveTypePatternDetails. + :type data_pattern: str + + :param search_type: + The value to assign to the search_type property of this UpdateSensitiveTypePatternDetails. + :type search_type: str + + :param default_masking_format_id: + The value to assign to the default_masking_format_id property of this UpdateSensitiveTypePatternDetails. + :type default_masking_format_id: str + + """ + self.swagger_types = { + 'entity_type': 'str', + 'display_name': 'str', + 'short_name': 'str', + 'description': 'str', + 'parent_category_id': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))', + 'name_pattern': 'str', + 'comment_pattern': 'str', + 'data_pattern': 'str', + 'search_type': 'str', + 'default_masking_format_id': 'str' + } + + self.attribute_map = { + 'entity_type': 'entityType', + 'display_name': 'displayName', + 'short_name': 'shortName', + 'description': 'description', + 'parent_category_id': 'parentCategoryId', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags', + 'name_pattern': 'namePattern', + 'comment_pattern': 'commentPattern', + 'data_pattern': 'dataPattern', + 'search_type': 'searchType', + 'default_masking_format_id': 'defaultMaskingFormatId' + } + + self._entity_type = None + self._display_name = None + self._short_name = None + self._description = None + self._parent_category_id = None + self._freeform_tags = None + self._defined_tags = None + self._name_pattern = None + self._comment_pattern = None + self._data_pattern = None + self._search_type = None + self._default_masking_format_id = None + self._entity_type = 'SENSITIVE_TYPE' + + @property + def name_pattern(self): + """ + Gets the name_pattern of this UpdateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column names. + + + :return: The name_pattern of this UpdateSensitiveTypePatternDetails. + :rtype: str + """ + return self._name_pattern + + @name_pattern.setter + def name_pattern(self, name_pattern): + """ + Sets the name_pattern of this UpdateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column names. + + + :param name_pattern: The name_pattern of this UpdateSensitiveTypePatternDetails. + :type: str + """ + self._name_pattern = name_pattern + + @property + def comment_pattern(self): + """ + Gets the comment_pattern of this UpdateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column comments. + + + :return: The comment_pattern of this UpdateSensitiveTypePatternDetails. + :rtype: str + """ + return self._comment_pattern + + @comment_pattern.setter + def comment_pattern(self, comment_pattern): + """ + Sets the comment_pattern of this UpdateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column comments. + + + :param comment_pattern: The comment_pattern of this UpdateSensitiveTypePatternDetails. + :type: str + """ + self._comment_pattern = comment_pattern + + @property + def data_pattern(self): + """ + Gets the data_pattern of this UpdateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column data values. + + + :return: The data_pattern of this UpdateSensitiveTypePatternDetails. + :rtype: str + """ + return self._data_pattern + + @data_pattern.setter + def data_pattern(self, data_pattern): + """ + Sets the data_pattern of this UpdateSensitiveTypePatternDetails. + A regular expression to be used by data discovery for matching column data values. + + + :param data_pattern: The data_pattern of this UpdateSensitiveTypePatternDetails. + :type: str + """ + self._data_pattern = data_pattern + + @property + def search_type(self): + """ + Gets the search_type of this UpdateSensitiveTypePatternDetails. + The search type indicating how the column name, comment and data patterns should be used by data discovery. + `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC + + + :return: The search_type of this UpdateSensitiveTypePatternDetails. + :rtype: str + """ + return self._search_type + + @search_type.setter + def search_type(self, search_type): + """ + Sets the search_type of this UpdateSensitiveTypePatternDetails. + The search type indicating how the column name, comment and data patterns should be used by data discovery. + `Learn more`__. + + __ https://docs.oracle.com/en/cloud/paas/data-safe/udscs/sensitive-types.html#GUID-1D1AD98E-B93F-4FF2-80AE-CB7D8A14F6CC + + + :param search_type: The search_type of this UpdateSensitiveTypePatternDetails. + :type: str + """ + self._search_type = search_type + + @property + def default_masking_format_id(self): + """ + Gets the default_masking_format_id of this UpdateSensitiveTypePatternDetails. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :return: The default_masking_format_id of this UpdateSensitiveTypePatternDetails. + :rtype: str + """ + return self._default_masking_format_id + + @default_masking_format_id.setter + def default_masking_format_id(self, default_masking_format_id): + """ + Sets the default_masking_format_id of this UpdateSensitiveTypePatternDetails. + The OCID of the library masking format that should be used to mask the sensitive columns associated with the sensitive type. + + + :param default_masking_format_id: The default_masking_format_id of this UpdateSensitiveTypePatternDetails. + :type: str + """ + self._default_masking_format_id = default_masking_format_id + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/update_target_alert_policy_association_details.py b/src/oci/data_safe/models/update_target_alert_policy_association_details.py new file mode 100644 index 0000000000..e6603e2ede --- /dev/null +++ b/src/oci/data_safe/models/update_target_alert_policy_association_details.py @@ -0,0 +1,210 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class UpdateTargetAlertPolicyAssociationDetails(object): + """ + The details used to update a target-alert policy association. + """ + + def __init__(self, **kwargs): + """ + Initializes a new UpdateTargetAlertPolicyAssociationDetails object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param is_enabled: + The value to assign to the is_enabled property of this UpdateTargetAlertPolicyAssociationDetails. + :type is_enabled: bool + + :param display_name: + The value to assign to the display_name property of this UpdateTargetAlertPolicyAssociationDetails. + :type display_name: str + + :param description: + The value to assign to the description property of this UpdateTargetAlertPolicyAssociationDetails. + :type description: str + + :param freeform_tags: + The value to assign to the freeform_tags property of this UpdateTargetAlertPolicyAssociationDetails. + :type freeform_tags: dict(str, str) + + :param defined_tags: + The value to assign to the defined_tags property of this UpdateTargetAlertPolicyAssociationDetails. + :type defined_tags: dict(str, dict(str, object)) + + """ + self.swagger_types = { + 'is_enabled': 'bool', + 'display_name': 'str', + 'description': 'str', + 'freeform_tags': 'dict(str, str)', + 'defined_tags': 'dict(str, dict(str, object))' + } + + self.attribute_map = { + 'is_enabled': 'isEnabled', + 'display_name': 'displayName', + 'description': 'description', + 'freeform_tags': 'freeformTags', + 'defined_tags': 'definedTags' + } + + self._is_enabled = None + self._display_name = None + self._description = None + self._freeform_tags = None + self._defined_tags = None + + @property + def is_enabled(self): + """ + Gets the is_enabled of this UpdateTargetAlertPolicyAssociationDetails. + Indicates if the target-alert policy association is enabled or disabled. + + + :return: The is_enabled of this UpdateTargetAlertPolicyAssociationDetails. + :rtype: bool + """ + return self._is_enabled + + @is_enabled.setter + def is_enabled(self, is_enabled): + """ + Sets the is_enabled of this UpdateTargetAlertPolicyAssociationDetails. + Indicates if the target-alert policy association is enabled or disabled. + + + :param is_enabled: The is_enabled of this UpdateTargetAlertPolicyAssociationDetails. + :type: bool + """ + self._is_enabled = is_enabled + + @property + def display_name(self): + """ + Gets the display_name of this UpdateTargetAlertPolicyAssociationDetails. + The display name of the target-alert policy association. + + + :return: The display_name of this UpdateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._display_name + + @display_name.setter + def display_name(self, display_name): + """ + Sets the display_name of this UpdateTargetAlertPolicyAssociationDetails. + The display name of the target-alert policy association. + + + :param display_name: The display_name of this UpdateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._display_name = display_name + + @property + def description(self): + """ + Gets the description of this UpdateTargetAlertPolicyAssociationDetails. + Describes the target-alert policy association. + + + :return: The description of this UpdateTargetAlertPolicyAssociationDetails. + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """ + Sets the description of this UpdateTargetAlertPolicyAssociationDetails. + Describes the target-alert policy association. + + + :param description: The description of this UpdateTargetAlertPolicyAssociationDetails. + :type: str + """ + self._description = description + + @property + def freeform_tags(self): + """ + Gets the freeform_tags of this UpdateTargetAlertPolicyAssociationDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The freeform_tags of this UpdateTargetAlertPolicyAssociationDetails. + :rtype: dict(str, str) + """ + return self._freeform_tags + + @freeform_tags.setter + def freeform_tags(self, freeform_tags): + """ + Sets the freeform_tags of this UpdateTargetAlertPolicyAssociationDetails. + Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see `Resource Tags`__ + + Example: `{\"Department\": \"Finance\"}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param freeform_tags: The freeform_tags of this UpdateTargetAlertPolicyAssociationDetails. + :type: dict(str, str) + """ + self._freeform_tags = freeform_tags + + @property + def defined_tags(self): + """ + Gets the defined_tags of this UpdateTargetAlertPolicyAssociationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :return: The defined_tags of this UpdateTargetAlertPolicyAssociationDetails. + :rtype: dict(str, dict(str, object)) + """ + return self._defined_tags + + @defined_tags.setter + def defined_tags(self, defined_tags): + """ + Sets the defined_tags of this UpdateTargetAlertPolicyAssociationDetails. + Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see `Resource Tags`__ + + Example: `{\"Operations\": {\"CostCenter\": \"42\"}}` + + __ https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm + + + :param defined_tags: The defined_tags of this UpdateTargetAlertPolicyAssociationDetails. + :type: dict(str, dict(str, object)) + """ + self._defined_tags = defined_tags + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/data_safe/models/work_request.py b/src/oci/data_safe/models/work_request.py index cc2ff3fddf..e7e214fe18 100644 --- a/src/oci/data_safe/models/work_request.py +++ b/src/oci/data_safe/models/work_request.py @@ -77,6 +77,22 @@ class WorkRequest(object): #: This constant has a value of "CHANGE_TARGET_DATABASE_COMPARTMENT" OPERATION_TYPE_CHANGE_TARGET_DATABASE_COMPARTMENT = "CHANGE_TARGET_DATABASE_COMPARTMENT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "PROVISION_POLICY" + OPERATION_TYPE_PROVISION_POLICY = "PROVISION_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "RETRIEVE_POLICY" + OPERATION_TYPE_RETRIEVE_POLICY = "RETRIEVE_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_POLICY" + OPERATION_TYPE_UPDATE_POLICY = "UPDATE_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_POLICY_COMPARTMENT" + OPERATION_TYPE_CHANGE_POLICY_COMPARTMENT = "CHANGE_POLICY_COMPARTMENT" + #: A constant which can be used with the operation_type property of a WorkRequest. #: This constant has a value of "CREATE_USER_ASSESSMENT" OPERATION_TYPE_CREATE_USER_ASSESSMENT = "CREATE_USER_ASSESSMENT" @@ -169,6 +185,202 @@ class WorkRequest(object): #: This constant has a value of "GENERATE_SECURITY_ASSESSMENT_REPORT" OPERATION_TYPE_GENERATE_SECURITY_ASSESSMENT_REPORT = "GENERATE_SECURITY_ASSESSMENT_REPORT" + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_AUDIT_PROFILE" + OPERATION_TYPE_CREATE_AUDIT_PROFILE = "CREATE_AUDIT_PROFILE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CALCULATE_VOLUME" + OPERATION_TYPE_CALCULATE_VOLUME = "CALCULATE_VOLUME" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CALCULATE_COLLECTED_VOLUME" + OPERATION_TYPE_CALCULATE_COLLECTED_VOLUME = "CALCULATE_COLLECTED_VOLUME" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "AUDIT_TRAIL" + OPERATION_TYPE_AUDIT_TRAIL = "AUDIT_TRAIL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_AUDIT_TRAIL" + OPERATION_TYPE_DELETE_AUDIT_TRAIL = "DELETE_AUDIT_TRAIL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DISCOVER_AUDIT_TRAILS" + OPERATION_TYPE_DISCOVER_AUDIT_TRAILS = "DISCOVER_AUDIT_TRAILS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_AUDIT_TRAIL" + OPERATION_TYPE_UPDATE_AUDIT_TRAIL = "UPDATE_AUDIT_TRAIL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_AUDIT_PROFILE" + OPERATION_TYPE_UPDATE_AUDIT_PROFILE = "UPDATE_AUDIT_PROFILE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "AUDIT_CHANGE_COMPARTMENT" + OPERATION_TYPE_AUDIT_CHANGE_COMPARTMENT = "AUDIT_CHANGE_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_REPORT_DEFINITION" + OPERATION_TYPE_CREATE_REPORT_DEFINITION = "CREATE_REPORT_DEFINITION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_REPORT_DEFINITION" + OPERATION_TYPE_UPDATE_REPORT_DEFINITION = "UPDATE_REPORT_DEFINITION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_REPORT_DEFINITION_COMPARTMENT" + OPERATION_TYPE_CHANGE_REPORT_DEFINITION_COMPARTMENT = "CHANGE_REPORT_DEFINITION_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_REPORT_DEFINITION" + OPERATION_TYPE_DELETE_REPORT_DEFINITION = "DELETE_REPORT_DEFINITION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "GENERATE_REPORT" + OPERATION_TYPE_GENERATE_REPORT = "GENERATE_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_REPORT_COMPARTMENT" + OPERATION_TYPE_CHANGE_REPORT_COMPARTMENT = "CHANGE_REPORT_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_ARCHIVE_RETRIEVAL" + OPERATION_TYPE_DELETE_ARCHIVE_RETRIEVAL = "DELETE_ARCHIVE_RETRIEVAL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_ARCHIVE_RETRIEVAL" + OPERATION_TYPE_CREATE_ARCHIVE_RETRIEVAL = "CREATE_ARCHIVE_RETRIEVAL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_ARCHIVE_RETRIEVAL" + OPERATION_TYPE_UPDATE_ARCHIVE_RETRIEVAL = "UPDATE_ARCHIVE_RETRIEVAL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT" + OPERATION_TYPE_CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT = "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_ALERT" + OPERATION_TYPE_UPDATE_ALERT = "UPDATE_ALERT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "TARGET_ALERT_POLICY_ASSOCIATION" + OPERATION_TYPE_TARGET_ALERT_POLICY_ASSOCIATION = "TARGET_ALERT_POLICY_ASSOCIATION" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_CREATE_SENSITIVE_DATA_MODEL = "CREATE_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_UPDATE_SENSITIVE_DATA_MODEL = "UPDATE_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_DELETE_SENSITIVE_DATA_MODEL = "DELETE_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPLOAD_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_UPLOAD_SENSITIVE_DATA_MODEL = "UPLOAD_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD" + OPERATION_TYPE_GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD = "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_SENSITIVE_COLUMN" + OPERATION_TYPE_CREATE_SENSITIVE_COLUMN = "CREATE_SENSITIVE_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_SENSITIVE_COLUMN" + OPERATION_TYPE_UPDATE_SENSITIVE_COLUMN = "UPDATE_SENSITIVE_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "PATCH_SENSITIVE_COLUMNS" + OPERATION_TYPE_PATCH_SENSITIVE_COLUMNS = "PATCH_SENSITIVE_COLUMNS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_DISCOVERY_JOB" + OPERATION_TYPE_CREATE_DISCOVERY_JOB = "CREATE_DISCOVERY_JOB" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_DISCOVERY_JOB" + OPERATION_TYPE_DELETE_DISCOVERY_JOB = "DELETE_DISCOVERY_JOB" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "PATCH_DISCOVERY_JOB_RESULT" + OPERATION_TYPE_PATCH_DISCOVERY_JOB_RESULT = "PATCH_DISCOVERY_JOB_RESULT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "APPLY_DISCOVERY_JOB_RESULT" + OPERATION_TYPE_APPLY_DISCOVERY_JOB_RESULT = "APPLY_DISCOVERY_JOB_RESULT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "GENERATE_DISCOVERY_REPORT" + OPERATION_TYPE_GENERATE_DISCOVERY_REPORT = "GENERATE_DISCOVERY_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_SENSITIVE_TYPE" + OPERATION_TYPE_CREATE_SENSITIVE_TYPE = "CREATE_SENSITIVE_TYPE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_SENSITIVE_TYPE" + OPERATION_TYPE_UPDATE_SENSITIVE_TYPE = "UPDATE_SENSITIVE_TYPE" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_MASKING_POLICY" + OPERATION_TYPE_CREATE_MASKING_POLICY = "CREATE_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_MASKING_POLICY" + OPERATION_TYPE_UPDATE_MASKING_POLICY = "UPDATE_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "DELETE_MASKING_POLICY" + OPERATION_TYPE_DELETE_MASKING_POLICY = "DELETE_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPLOAD_MASKING_POLICY" + OPERATION_TYPE_UPLOAD_MASKING_POLICY = "UPLOAD_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "GENERATE_MASKING_POLICY_FOR_DOWNLOAD" + OPERATION_TYPE_GENERATE_MASKING_POLICY_FOR_DOWNLOAD = "GENERATE_MASKING_POLICY_FOR_DOWNLOAD" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_MASKING_COLUMN" + OPERATION_TYPE_CREATE_MASKING_COLUMN = "CREATE_MASKING_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_MASKING_COLUMN" + OPERATION_TYPE_UPDATE_MASKING_COLUMN = "UPDATE_MASKING_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "PATCH_MASKING_COLUMNS" + OPERATION_TYPE_PATCH_MASKING_COLUMNS = "PATCH_MASKING_COLUMNS" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "GENERATE_MASKING_REPORT" + OPERATION_TYPE_GENERATE_MASKING_REPORT = "GENERATE_MASKING_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "CREATE_LIBRARY_MASKING_FORMAT" + OPERATION_TYPE_CREATE_LIBRARY_MASKING_FORMAT = "CREATE_LIBRARY_MASKING_FORMAT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "UPDATE_LIBRARY_MASKING_FORMAT" + OPERATION_TYPE_UPDATE_LIBRARY_MASKING_FORMAT = "UPDATE_LIBRARY_MASKING_FORMAT" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "ADD_COLUMNS_FROM_SDM" + OPERATION_TYPE_ADD_COLUMNS_FROM_SDM = "ADD_COLUMNS_FROM_SDM" + + #: A constant which can be used with the operation_type property of a WorkRequest. + #: This constant has a value of "MASKING_JOB" + OPERATION_TYPE_MASKING_JOB = "MASKING_JOB" + #: A constant which can be used with the status property of a WorkRequest. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -185,6 +397,22 @@ class WorkRequest(object): #: This constant has a value of "SUCCEEDED" STATUS_SUCCEEDED = "SUCCEEDED" + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "SUSPENDING" + STATUS_SUSPENDING = "SUSPENDING" + + #: A constant which can be used with the status property of a WorkRequest. + #: This constant has a value of "SUSPENDED" + STATUS_SUSPENDED = "SUSPENDED" + def __init__(self, **kwargs): """ Initializes a new WorkRequest object with values from keyword arguments. @@ -192,13 +420,13 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequest. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str :param status: The value to assign to the status property of this WorkRequest. - Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type status: str @@ -271,7 +499,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequest. The resources that are affected by the work request. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -290,7 +518,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequest. :type: str """ - allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT"] + allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CREATE_AUDIT_PROFILE", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type @@ -301,7 +529,7 @@ def status(self): **[Required]** Gets the status of this WorkRequest. The current status of the work request. - Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -320,7 +548,7 @@ def status(self, status): :param status: The status of this WorkRequest. :type: str """ - allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"] + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"] if not value_allowed_none_or_none_sentinel(status, allowed_values): status = 'UNKNOWN_ENUM_VALUE' self._status = status diff --git a/src/oci/data_safe/models/work_request_summary.py b/src/oci/data_safe/models/work_request_summary.py index a738d0a29d..6cd54f7f0d 100644 --- a/src/oci/data_safe/models/work_request_summary.py +++ b/src/oci/data_safe/models/work_request_summary.py @@ -53,6 +53,22 @@ class WorkRequestSummary(object): #: This constant has a value of "CHANGE_ONPREM_CONNECTOR_COMPARTMENT" OPERATION_TYPE_CHANGE_ONPREM_CONNECTOR_COMPARTMENT = "CHANGE_ONPREM_CONNECTOR_COMPARTMENT" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "PROVISION_POLICY" + OPERATION_TYPE_PROVISION_POLICY = "PROVISION_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "RETRIEVE_POLICY" + OPERATION_TYPE_RETRIEVE_POLICY = "RETRIEVE_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_POLICY" + OPERATION_TYPE_UPDATE_POLICY = "UPDATE_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CHANGE_POLICY_COMPARTMENT" + OPERATION_TYPE_CHANGE_POLICY_COMPARTMENT = "CHANGE_POLICY_COMPARTMENT" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. #: This constant has a value of "CREATE_TARGET_DATABASE" OPERATION_TYPE_CREATE_TARGET_DATABASE = "CREATE_TARGET_DATABASE" @@ -169,6 +185,198 @@ class WorkRequestSummary(object): #: This constant has a value of "GENERATE_SECURITY_ASSESSMENT_REPORT" OPERATION_TYPE_GENERATE_SECURITY_ASSESSMENT_REPORT = "GENERATE_SECURITY_ASSESSMENT_REPORT" + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CALCULATE_VOLUME" + OPERATION_TYPE_CALCULATE_VOLUME = "CALCULATE_VOLUME" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CALCULATE_COLLECTED_VOLUME" + OPERATION_TYPE_CALCULATE_COLLECTED_VOLUME = "CALCULATE_COLLECTED_VOLUME" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "AUDIT_TRAIL" + OPERATION_TYPE_AUDIT_TRAIL = "AUDIT_TRAIL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_AUDIT_TRAIL" + OPERATION_TYPE_DELETE_AUDIT_TRAIL = "DELETE_AUDIT_TRAIL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DISCOVER_AUDIT_TRAILS" + OPERATION_TYPE_DISCOVER_AUDIT_TRAILS = "DISCOVER_AUDIT_TRAILS" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_AUDIT_TRAIL" + OPERATION_TYPE_UPDATE_AUDIT_TRAIL = "UPDATE_AUDIT_TRAIL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_AUDIT_PROFILE" + OPERATION_TYPE_UPDATE_AUDIT_PROFILE = "UPDATE_AUDIT_PROFILE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "AUDIT_CHANGE_COMPARTMENT" + OPERATION_TYPE_AUDIT_CHANGE_COMPARTMENT = "AUDIT_CHANGE_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_REPORT_DEFINITION" + OPERATION_TYPE_CREATE_REPORT_DEFINITION = "CREATE_REPORT_DEFINITION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_REPORT_DEFINITION" + OPERATION_TYPE_UPDATE_REPORT_DEFINITION = "UPDATE_REPORT_DEFINITION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CHANGE_REPORT_DEFINITION_COMPARTMENT" + OPERATION_TYPE_CHANGE_REPORT_DEFINITION_COMPARTMENT = "CHANGE_REPORT_DEFINITION_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_REPORT_DEFINITION" + OPERATION_TYPE_DELETE_REPORT_DEFINITION = "DELETE_REPORT_DEFINITION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "GENERATE_REPORT" + OPERATION_TYPE_GENERATE_REPORT = "GENERATE_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CHANGE_REPORT_COMPARTMENT" + OPERATION_TYPE_CHANGE_REPORT_COMPARTMENT = "CHANGE_REPORT_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_ARCHIVE_RETRIEVAL" + OPERATION_TYPE_DELETE_ARCHIVE_RETRIEVAL = "DELETE_ARCHIVE_RETRIEVAL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_ARCHIVE_RETRIEVAL" + OPERATION_TYPE_CREATE_ARCHIVE_RETRIEVAL = "CREATE_ARCHIVE_RETRIEVAL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_ARCHIVE_RETRIEVAL" + OPERATION_TYPE_UPDATE_ARCHIVE_RETRIEVAL = "UPDATE_ARCHIVE_RETRIEVAL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT" + OPERATION_TYPE_CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT = "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_ALERT" + OPERATION_TYPE_UPDATE_ALERT = "UPDATE_ALERT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "TARGET_ALERT_POLICY_ASSOCIATION" + OPERATION_TYPE_TARGET_ALERT_POLICY_ASSOCIATION = "TARGET_ALERT_POLICY_ASSOCIATION" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_CREATE_SENSITIVE_DATA_MODEL = "CREATE_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_UPDATE_SENSITIVE_DATA_MODEL = "UPDATE_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_DELETE_SENSITIVE_DATA_MODEL = "DELETE_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPLOAD_SENSITIVE_DATA_MODEL" + OPERATION_TYPE_UPLOAD_SENSITIVE_DATA_MODEL = "UPLOAD_SENSITIVE_DATA_MODEL" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD" + OPERATION_TYPE_GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD = "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_SENSITIVE_COLUMN" + OPERATION_TYPE_CREATE_SENSITIVE_COLUMN = "CREATE_SENSITIVE_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_SENSITIVE_COLUMN" + OPERATION_TYPE_UPDATE_SENSITIVE_COLUMN = "UPDATE_SENSITIVE_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "PATCH_SENSITIVE_COLUMNS" + OPERATION_TYPE_PATCH_SENSITIVE_COLUMNS = "PATCH_SENSITIVE_COLUMNS" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_DISCOVERY_JOB" + OPERATION_TYPE_CREATE_DISCOVERY_JOB = "CREATE_DISCOVERY_JOB" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_DISCOVERY_JOB" + OPERATION_TYPE_DELETE_DISCOVERY_JOB = "DELETE_DISCOVERY_JOB" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "PATCH_DISCOVERY_JOB_RESULT" + OPERATION_TYPE_PATCH_DISCOVERY_JOB_RESULT = "PATCH_DISCOVERY_JOB_RESULT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "APPLY_DISCOVERY_JOB_RESULT" + OPERATION_TYPE_APPLY_DISCOVERY_JOB_RESULT = "APPLY_DISCOVERY_JOB_RESULT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "GENERATE_DISCOVERY_REPORT" + OPERATION_TYPE_GENERATE_DISCOVERY_REPORT = "GENERATE_DISCOVERY_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_SENSITIVE_TYPE" + OPERATION_TYPE_CREATE_SENSITIVE_TYPE = "CREATE_SENSITIVE_TYPE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_SENSITIVE_TYPE" + OPERATION_TYPE_UPDATE_SENSITIVE_TYPE = "UPDATE_SENSITIVE_TYPE" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_MASKING_POLICY" + OPERATION_TYPE_CREATE_MASKING_POLICY = "CREATE_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_MASKING_POLICY" + OPERATION_TYPE_UPDATE_MASKING_POLICY = "UPDATE_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "DELETE_MASKING_POLICY" + OPERATION_TYPE_DELETE_MASKING_POLICY = "DELETE_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPLOAD_MASKING_POLICY" + OPERATION_TYPE_UPLOAD_MASKING_POLICY = "UPLOAD_MASKING_POLICY" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "GENERATE_MASKING_POLICY_FOR_DOWNLOAD" + OPERATION_TYPE_GENERATE_MASKING_POLICY_FOR_DOWNLOAD = "GENERATE_MASKING_POLICY_FOR_DOWNLOAD" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_MASKING_COLUMN" + OPERATION_TYPE_CREATE_MASKING_COLUMN = "CREATE_MASKING_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_MASKING_COLUMN" + OPERATION_TYPE_UPDATE_MASKING_COLUMN = "UPDATE_MASKING_COLUMN" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "PATCH_MASKING_COLUMNS" + OPERATION_TYPE_PATCH_MASKING_COLUMNS = "PATCH_MASKING_COLUMNS" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "GENERATE_MASKING_REPORT" + OPERATION_TYPE_GENERATE_MASKING_REPORT = "GENERATE_MASKING_REPORT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "CREATE_LIBRARY_MASKING_FORMAT" + OPERATION_TYPE_CREATE_LIBRARY_MASKING_FORMAT = "CREATE_LIBRARY_MASKING_FORMAT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "UPDATE_LIBRARY_MASKING_FORMAT" + OPERATION_TYPE_UPDATE_LIBRARY_MASKING_FORMAT = "UPDATE_LIBRARY_MASKING_FORMAT" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "ADD_COLUMNS_FROM_SDM" + OPERATION_TYPE_ADD_COLUMNS_FROM_SDM = "ADD_COLUMNS_FROM_SDM" + + #: A constant which can be used with the operation_type property of a WorkRequestSummary. + #: This constant has a value of "MASKING_JOB" + OPERATION_TYPE_MASKING_JOB = "MASKING_JOB" + #: A constant which can be used with the status property of a WorkRequestSummary. #: This constant has a value of "ACCEPTED" STATUS_ACCEPTED = "ACCEPTED" @@ -185,6 +393,22 @@ class WorkRequestSummary(object): #: This constant has a value of "SUCCEEDED" STATUS_SUCCEEDED = "SUCCEEDED" + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELING" + STATUS_CANCELING = "CANCELING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "CANCELED" + STATUS_CANCELED = "CANCELED" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "SUSPENDING" + STATUS_SUSPENDING = "SUSPENDING" + + #: A constant which can be used with the status property of a WorkRequestSummary. + #: This constant has a value of "SUSPENDED" + STATUS_SUSPENDED = "SUSPENDED" + def __init__(self, **kwargs): """ Initializes a new WorkRequestSummary object with values from keyword arguments. @@ -192,13 +416,13 @@ def __init__(self, **kwargs): :param operation_type: The value to assign to the operation_type property of this WorkRequestSummary. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type operation_type: str :param status: The value to assign to the status property of this WorkRequestSummary. - Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. :type status: str @@ -271,7 +495,7 @@ def operation_type(self): **[Required]** Gets the operation_type of this WorkRequestSummary. The asynchronous operation tracked by this work request. - Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -290,7 +514,7 @@ def operation_type(self, operation_type): :param operation_type: The operation_type of this WorkRequestSummary. :type: str """ - allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT"] + allowed_values = ["ENABLE_DATA_SAFE_CONFIGURATION", "CREATE_PRIVATE_ENDPOINT", "UPDATE_PRIVATE_ENDPOINT", "DELETE_PRIVATE_ENDPOINT", "CHANGE_PRIVATE_ENDPOINT_COMPARTMENT", "CREATE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR", "DELETE_ONPREM_CONNECTOR", "UPDATE_ONPREM_CONNECTOR_WALLET", "CHANGE_ONPREM_CONNECTOR_COMPARTMENT", "PROVISION_POLICY", "RETRIEVE_POLICY", "UPDATE_POLICY", "CHANGE_POLICY_COMPARTMENT", "CREATE_TARGET_DATABASE", "UPDATE_TARGET_DATABASE", "ACTIVATE_TARGET_DATABASE", "DEACTIVATE_TARGET_DATABASE", "DELETE_TARGET_DATABASE", "CHANGE_TARGET_DATABASE_COMPARTMENT", "CREATE_USER_ASSESSMENT", "ASSESS_USER_ASSESSMENT", "CREATE_SNAPSHOT_USER_ASSESSMENT", "CREATE_SCHEDULE_USER_ASSESSMENT", "COMPARE_WITH_BASELINE_USER_ASSESSMENT", "DELETE_USER_ASSESSMENT", "UPDATE_USER_ASSESSMENT", "CHANGE_USER_ASSESSMENT_COMPARTMENT", "SET_USER_ASSESSMENT_BASELINE", "UNSET_USER_ASSESSMENT_BASELINE", "GENERATE_USER_ASSESSMENT_REPORT", "CREATE_SECURITY_ASSESSMENT", "CREATE_SECURITY_ASSESSMENT_NOW", "ASSESS_SECURITY_ASSESSMENT", "CREATE_SNAPSHOT_SECURITY_ASSESSMENT", "CREATE_SCHEDULE_SECURITY_ASSESSMENT", "COMPARE_WITH_BASELINE_SECURITY_ASSESSMENT", "DELETE_SECURITY_ASSESSMENT", "UPDATE_SECURITY_ASSESSMENT", "CHANGE_SECURITY_ASSESSMENT_COMPARTMENT", "SET_SECURITY_ASSESSMENT_BASELINE", "UNSET_SECURITY_ASSESSMENT_BASELINE", "GENERATE_SECURITY_ASSESSMENT_REPORT", "CALCULATE_VOLUME", "CALCULATE_COLLECTED_VOLUME", "AUDIT_TRAIL", "DELETE_AUDIT_TRAIL", "DISCOVER_AUDIT_TRAILS", "UPDATE_AUDIT_TRAIL", "UPDATE_AUDIT_PROFILE", "AUDIT_CHANGE_COMPARTMENT", "CREATE_REPORT_DEFINITION", "UPDATE_REPORT_DEFINITION", "CHANGE_REPORT_DEFINITION_COMPARTMENT", "DELETE_REPORT_DEFINITION", "GENERATE_REPORT", "CHANGE_REPORT_COMPARTMENT", "DELETE_ARCHIVE_RETRIEVAL", "CREATE_ARCHIVE_RETRIEVAL", "UPDATE_ARCHIVE_RETRIEVAL", "CHANGE_ARCHIVE_RETRIEVAL_COMPARTMENT", "UPDATE_ALERT", "TARGET_ALERT_POLICY_ASSOCIATION", "CREATE_SENSITIVE_DATA_MODEL", "UPDATE_SENSITIVE_DATA_MODEL", "DELETE_SENSITIVE_DATA_MODEL", "UPLOAD_SENSITIVE_DATA_MODEL", "GENERATE_SENSITIVE_DATA_MODEL_FOR_DOWNLOAD", "CREATE_SENSITIVE_COLUMN", "UPDATE_SENSITIVE_COLUMN", "PATCH_SENSITIVE_COLUMNS", "CREATE_DISCOVERY_JOB", "DELETE_DISCOVERY_JOB", "PATCH_DISCOVERY_JOB_RESULT", "APPLY_DISCOVERY_JOB_RESULT", "GENERATE_DISCOVERY_REPORT", "CREATE_SENSITIVE_TYPE", "UPDATE_SENSITIVE_TYPE", "CREATE_MASKING_POLICY", "UPDATE_MASKING_POLICY", "DELETE_MASKING_POLICY", "UPLOAD_MASKING_POLICY", "GENERATE_MASKING_POLICY_FOR_DOWNLOAD", "CREATE_MASKING_COLUMN", "UPDATE_MASKING_COLUMN", "PATCH_MASKING_COLUMNS", "GENERATE_MASKING_REPORT", "CREATE_LIBRARY_MASKING_FORMAT", "UPDATE_LIBRARY_MASKING_FORMAT", "ADD_COLUMNS_FROM_SDM", "MASKING_JOB"] if not value_allowed_none_or_none_sentinel(operation_type, allowed_values): operation_type = 'UNKNOWN_ENUM_VALUE' self._operation_type = operation_type @@ -301,7 +525,7 @@ def status(self): **[Required]** Gets the status of this WorkRequestSummary. The current status of the work request. - Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", 'UNKNOWN_ENUM_VALUE'. + Allowed values for this property are: "ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED", 'UNKNOWN_ENUM_VALUE'. Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. @@ -320,7 +544,7 @@ def status(self, status): :param status: The status of this WorkRequestSummary. :type: str """ - allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED"] + allowed_values = ["ACCEPTED", "IN_PROGRESS", "FAILED", "SUCCEEDED", "CANCELING", "CANCELED", "SUSPENDING", "SUSPENDED"] if not value_allowed_none_or_none_sentinel(status, allowed_values): status = 'UNKNOWN_ENUM_VALUE' self._status = status diff --git a/src/oci/loggingsearch/log_search_client.py b/src/oci/loggingsearch/log_search_client.py index 789e911dd8..c04e7e6449 100644 --- a/src/oci/loggingsearch/log_search_client.py +++ b/src/oci/loggingsearch/log_search_client.py @@ -108,6 +108,10 @@ def search_logs(self, search_logs_details, **kwargs): """ Submit a query to search logs. + See `Using the API`__ for SDK examples. + + __ https://docs.cloud.oracle.com/Content/Logging/Concepts/using_the_api_searchlogs.htm + :param oci.loggingsearch.models.SearchLogsDetails search_logs_details: (required) Search request. @@ -120,7 +124,10 @@ def search_logs(self, search_logs_details, **kwargs): The maximum number of items to return in a response. Pagination is not supported in this API. :param str page: (optional) - Reserved for future use. Pagination is not supported in this API. + For list pagination. The value of the opc-next-page response header from the previous \"Search\" call. + For important details about how pagination works, see `List Pagination`__. + + __ https://docs.cloud.oracle.com/Content/API/Concepts/usingapi.htm#nine :param obj retry_strategy: (optional) A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. diff --git a/src/oci/nosql/models/table_collection.py b/src/oci/nosql/models/table_collection.py index 217944d405..6fa1bfac1a 100644 --- a/src/oci/nosql/models/table_collection.py +++ b/src/oci/nosql/models/table_collection.py @@ -30,22 +30,36 @@ def __init__(self, **kwargs): The value to assign to the auto_reclaimable_tables property of this TableCollection. :type auto_reclaimable_tables: int + :param on_demand_capacity_tables: + The value to assign to the on_demand_capacity_tables property of this TableCollection. + :type on_demand_capacity_tables: int + + :param max_on_demand_capacity_tables: + The value to assign to the max_on_demand_capacity_tables property of this TableCollection. + :type max_on_demand_capacity_tables: int + """ self.swagger_types = { 'items': 'list[TableSummary]', 'max_auto_reclaimable_tables': 'int', - 'auto_reclaimable_tables': 'int' + 'auto_reclaimable_tables': 'int', + 'on_demand_capacity_tables': 'int', + 'max_on_demand_capacity_tables': 'int' } self.attribute_map = { 'items': 'items', 'max_auto_reclaimable_tables': 'maxAutoReclaimableTables', - 'auto_reclaimable_tables': 'autoReclaimableTables' + 'auto_reclaimable_tables': 'autoReclaimableTables', + 'on_demand_capacity_tables': 'onDemandCapacityTables', + 'max_on_demand_capacity_tables': 'maxOnDemandCapacityTables' } self._items = None self._max_auto_reclaimable_tables = None self._auto_reclaimable_tables = None + self._on_demand_capacity_tables = None + self._max_on_demand_capacity_tables = None @property def items(self): @@ -119,6 +133,54 @@ def auto_reclaimable_tables(self, auto_reclaimable_tables): """ self._auto_reclaimable_tables = auto_reclaimable_tables + @property + def on_demand_capacity_tables(self): + """ + Gets the on_demand_capacity_tables of this TableCollection. + The current number of on demand capacity tables in the tenancy. + + + :return: The on_demand_capacity_tables of this TableCollection. + :rtype: int + """ + return self._on_demand_capacity_tables + + @on_demand_capacity_tables.setter + def on_demand_capacity_tables(self, on_demand_capacity_tables): + """ + Sets the on_demand_capacity_tables of this TableCollection. + The current number of on demand capacity tables in the tenancy. + + + :param on_demand_capacity_tables: The on_demand_capacity_tables of this TableCollection. + :type: int + """ + self._on_demand_capacity_tables = on_demand_capacity_tables + + @property + def max_on_demand_capacity_tables(self): + """ + Gets the max_on_demand_capacity_tables of this TableCollection. + The maximum number of on demand capacity tables allowed in the tenancy. + + + :return: The max_on_demand_capacity_tables of this TableCollection. + :rtype: int + """ + return self._max_on_demand_capacity_tables + + @max_on_demand_capacity_tables.setter + def max_on_demand_capacity_tables(self, max_on_demand_capacity_tables): + """ + Sets the max_on_demand_capacity_tables of this TableCollection. + The maximum number of on demand capacity tables allowed in the tenancy. + + + :param max_on_demand_capacity_tables: The max_on_demand_capacity_tables of this TableCollection. + :type: int + """ + self._max_on_demand_capacity_tables = max_on_demand_capacity_tables + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/nosql/models/table_limits.py b/src/oci/nosql/models/table_limits.py index 2ccf5f2b6a..980e09268e 100644 --- a/src/oci/nosql/models/table_limits.py +++ b/src/oci/nosql/models/table_limits.py @@ -13,6 +13,14 @@ class TableLimits(object): Throughput and storage limits configuration of a table. """ + #: A constant which can be used with the capacity_mode property of a TableLimits. + #: This constant has a value of "PROVISIONED" + CAPACITY_MODE_PROVISIONED = "PROVISIONED" + + #: A constant which can be used with the capacity_mode property of a TableLimits. + #: This constant has a value of "ON_DEMAND" + CAPACITY_MODE_ON_DEMAND = "ON_DEMAND" + def __init__(self, **kwargs): """ Initializes a new TableLimits object with values from keyword arguments. @@ -30,22 +38,31 @@ def __init__(self, **kwargs): The value to assign to the max_storage_in_g_bs property of this TableLimits. :type max_storage_in_g_bs: int + :param capacity_mode: + The value to assign to the capacity_mode property of this TableLimits. + Allowed values for this property are: "PROVISIONED", "ON_DEMAND", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type capacity_mode: str + """ self.swagger_types = { 'max_read_units': 'int', 'max_write_units': 'int', - 'max_storage_in_g_bs': 'int' + 'max_storage_in_g_bs': 'int', + 'capacity_mode': 'str' } self.attribute_map = { 'max_read_units': 'maxReadUnits', 'max_write_units': 'maxWriteUnits', - 'max_storage_in_g_bs': 'maxStorageInGBs' + 'max_storage_in_g_bs': 'maxStorageInGBs', + 'capacity_mode': 'capacityMode' } self._max_read_units = None self._max_write_units = None self._max_storage_in_g_bs = None + self._capacity_mode = None @property def max_read_units(self): @@ -119,6 +136,40 @@ def max_storage_in_g_bs(self, max_storage_in_g_bs): """ self._max_storage_in_g_bs = max_storage_in_g_bs + @property + def capacity_mode(self): + """ + Gets the capacity_mode of this TableLimits. + The capacity mode of the table. If capacityMode = ON_DEMAND, + maxReadUnits and maxWriteUnits are not used, and both will have + the value of zero. + + Allowed values for this property are: "PROVISIONED", "ON_DEMAND", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The capacity_mode of this TableLimits. + :rtype: str + """ + return self._capacity_mode + + @capacity_mode.setter + def capacity_mode(self, capacity_mode): + """ + Sets the capacity_mode of this TableLimits. + The capacity mode of the table. If capacityMode = ON_DEMAND, + maxReadUnits and maxWriteUnits are not used, and both will have + the value of zero. + + + :param capacity_mode: The capacity_mode of this TableLimits. + :type: str + """ + allowed_values = ["PROVISIONED", "ON_DEMAND"] + if not value_allowed_none_or_none_sentinel(capacity_mode, allowed_values): + capacity_mode = 'UNKNOWN_ENUM_VALUE' + self._capacity_mode = capacity_mode + def __repr__(self): return formatted_flat_dict(self) diff --git a/src/oci/service_endpoints.py b/src/oci/service_endpoints.py index d0ee889b7f..f553d51668 100644 --- a/src/oci/service_endpoints.py +++ b/src/oci/service_endpoints.py @@ -4,6 +4,7 @@ SERVICE_ENDPOINTS = { "announcement": "https://announcements.{domain}", + "announcement_subscription": "https://announcements.{domain}", "announcements_preferences": "https://announcements.{domain}", "audit": "https://audit.{domain}", "auto_scaling": "None", diff --git a/src/oci/threat_intelligence/__init__.py b/src/oci/threat_intelligence/__init__.py new file mode 100644 index 0000000000..9acd36a35c --- /dev/null +++ b/src/oci/threat_intelligence/__init__.py @@ -0,0 +1,12 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + + +from .threatintel_client import ThreatintelClient +from .threatintel_client_composite_operations import ThreatintelClientCompositeOperations +from . import models + +__all__ = ["ThreatintelClient", "ThreatintelClientCompositeOperations", "models"] diff --git a/src/oci/threat_intelligence/models/__init__.py b/src/oci/threat_intelligence/models/__init__.py new file mode 100644 index 0000000000..f37dba7a8d --- /dev/null +++ b/src/oci/threat_intelligence/models/__init__.py @@ -0,0 +1,42 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from .data_attribution import DataAttribution +from .data_visibility import DataVisibility +from .entity_reference import EntityReference +from .indicator import Indicator +from .indicator_attribute import IndicatorAttribute +from .indicator_count_collection import IndicatorCountCollection +from .indicator_count_dimensions import IndicatorCountDimensions +from .indicator_count_summary import IndicatorCountSummary +from .indicator_reference import IndicatorReference +from .indicator_relationship import IndicatorRelationship +from .indicator_source_summary import IndicatorSourceSummary +from .indicator_summary import IndicatorSummary +from .indicator_summary_collection import IndicatorSummaryCollection +from .threat_type import ThreatType +from .threat_type_summary import ThreatTypeSummary +from .threat_types_collection import ThreatTypesCollection + +# Maps type names to classes for threat_intelligence services. +threat_intelligence_type_mapping = { + "DataAttribution": DataAttribution, + "DataVisibility": DataVisibility, + "EntityReference": EntityReference, + "Indicator": Indicator, + "IndicatorAttribute": IndicatorAttribute, + "IndicatorCountCollection": IndicatorCountCollection, + "IndicatorCountDimensions": IndicatorCountDimensions, + "IndicatorCountSummary": IndicatorCountSummary, + "IndicatorReference": IndicatorReference, + "IndicatorRelationship": IndicatorRelationship, + "IndicatorSourceSummary": IndicatorSourceSummary, + "IndicatorSummary": IndicatorSummary, + "IndicatorSummaryCollection": IndicatorSummaryCollection, + "ThreatType": ThreatType, + "ThreatTypeSummary": ThreatTypeSummary, + "ThreatTypesCollection": ThreatTypesCollection +} diff --git a/src/oci/threat_intelligence/models/data_attribution.py b/src/oci/threat_intelligence/models/data_attribution.py new file mode 100644 index 0000000000..58e6995d08 --- /dev/null +++ b/src/oci/threat_intelligence/models/data_attribution.py @@ -0,0 +1,186 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DataAttribution(object): + """ + The confidence, source information, and visibility for a particular sighting or observation of some data associated with an indicator such as threat type, attribute or relationship. + """ + + def __init__(self, **kwargs): + """ + Initializes a new DataAttribution object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param confidence: + The value to assign to the confidence property of this DataAttribution. + :type confidence: int + + :param source: + The value to assign to the source property of this DataAttribution. + :type source: oci.threat_intelligence.models.IndicatorSourceSummary + + :param visibility: + The value to assign to the visibility property of this DataAttribution. + :type visibility: oci.threat_intelligence.models.DataVisibility + + :param time_first_seen: + The value to assign to the time_first_seen property of this DataAttribution. + :type time_first_seen: datetime + + :param time_last_seen: + The value to assign to the time_last_seen property of this DataAttribution. + :type time_last_seen: datetime + + """ + self.swagger_types = { + 'confidence': 'int', + 'source': 'IndicatorSourceSummary', + 'visibility': 'DataVisibility', + 'time_first_seen': 'datetime', + 'time_last_seen': 'datetime' + } + + self.attribute_map = { + 'confidence': 'confidence', + 'source': 'source', + 'visibility': 'visibility', + 'time_first_seen': 'timeFirstSeen', + 'time_last_seen': 'timeLastSeen' + } + + self._confidence = None + self._source = None + self._visibility = None + self._time_first_seen = None + self._time_last_seen = None + + @property + def confidence(self): + """ + **[Required]** Gets the confidence of this DataAttribution. + Confidence is an integer from 0 to 100 that provides a measure of our certainty in the maliciousness of data attributed to an indicator. For example, if the source of the data being attributed is the Tor Project, our confidence that the associated indicator is a tor exit node would be 100. + + + :return: The confidence of this DataAttribution. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this DataAttribution. + Confidence is an integer from 0 to 100 that provides a measure of our certainty in the maliciousness of data attributed to an indicator. For example, if the source of the data being attributed is the Tor Project, our confidence that the associated indicator is a tor exit node would be 100. + + + :param confidence: The confidence of this DataAttribution. + :type: int + """ + self._confidence = confidence + + @property + def source(self): + """ + **[Required]** Gets the source of this DataAttribution. + + :return: The source of this DataAttribution. + :rtype: oci.threat_intelligence.models.IndicatorSourceSummary + """ + return self._source + + @source.setter + def source(self, source): + """ + Sets the source of this DataAttribution. + + :param source: The source of this DataAttribution. + :type: oci.threat_intelligence.models.IndicatorSourceSummary + """ + self._source = source + + @property + def visibility(self): + """ + **[Required]** Gets the visibility of this DataAttribution. + + :return: The visibility of this DataAttribution. + :rtype: oci.threat_intelligence.models.DataVisibility + """ + return self._visibility + + @visibility.setter + def visibility(self, visibility): + """ + Sets the visibility of this DataAttribution. + + :param visibility: The visibility of this DataAttribution. + :type: oci.threat_intelligence.models.DataVisibility + """ + self._visibility = visibility + + @property + def time_first_seen(self): + """ + Gets the time_first_seen of this DataAttribution. + The time the data was first seen for this entity. Defaults to time last seen if no time first seen is provided from the data source. An RFC3339 formatted datetime string + + + :return: The time_first_seen of this DataAttribution. + :rtype: datetime + """ + return self._time_first_seen + + @time_first_seen.setter + def time_first_seen(self, time_first_seen): + """ + Sets the time_first_seen of this DataAttribution. + The time the data was first seen for this entity. Defaults to time last seen if no time first seen is provided from the data source. An RFC3339 formatted datetime string + + + :param time_first_seen: The time_first_seen of this DataAttribution. + :type: datetime + """ + self._time_first_seen = time_first_seen + + @property + def time_last_seen(self): + """ + **[Required]** Gets the time_last_seen of this DataAttribution. + The last time this data was seen for this entity. An RFC3339 formatted datetime string + + + :return: The time_last_seen of this DataAttribution. + :rtype: datetime + """ + return self._time_last_seen + + @time_last_seen.setter + def time_last_seen(self, time_last_seen): + """ + Sets the time_last_seen of this DataAttribution. + The last time this data was seen for this entity. An RFC3339 formatted datetime string + + + :param time_last_seen: The time_last_seen of this DataAttribution. + :type: datetime + """ + self._time_last_seen = time_last_seen + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/data_visibility.py b/src/oci/threat_intelligence/models/data_visibility.py new file mode 100644 index 0000000000..e430fea3a5 --- /dev/null +++ b/src/oci/threat_intelligence/models/data_visibility.py @@ -0,0 +1,129 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class DataVisibility(object): + """ + The visibility level associated with data and an associated TLP (https://www.cisa.gov/tlp) level. + """ + + #: A constant which can be used with the tlp_name property of a DataVisibility. + #: This constant has a value of "TLP_INTERNAL_AUDIT" + TLP_NAME_TLP_INTERNAL_AUDIT = "TLP_INTERNAL_AUDIT" + + #: A constant which can be used with the tlp_name property of a DataVisibility. + #: This constant has a value of "TLP_WHITE" + TLP_NAME_TLP_WHITE = "TLP_WHITE" + + #: A constant which can be used with the tlp_name property of a DataVisibility. + #: This constant has a value of "TLP_GREEN" + TLP_NAME_TLP_GREEN = "TLP_GREEN" + + #: A constant which can be used with the tlp_name property of a DataVisibility. + #: This constant has a value of "TLP_AMBER" + TLP_NAME_TLP_AMBER = "TLP_AMBER" + + #: A constant which can be used with the tlp_name property of a DataVisibility. + #: This constant has a value of "TLP_RED" + TLP_NAME_TLP_RED = "TLP_RED" + + def __init__(self, **kwargs): + """ + Initializes a new DataVisibility object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this DataVisibility. + :type name: str + + :param tlp_name: + The value to assign to the tlp_name property of this DataVisibility. + Allowed values for this property are: "TLP_INTERNAL_AUDIT", "TLP_WHITE", "TLP_GREEN", "TLP_AMBER", "TLP_RED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type tlp_name: str + + """ + self.swagger_types = { + 'name': 'str', + 'tlp_name': 'str' + } + + self.attribute_map = { + 'name': 'name', + 'tlp_name': 'tlpName' + } + + self._name = None + self._tlp_name = None + + @property + def name(self): + """ + **[Required]** Gets the name of this DataVisibility. + The name of the visibility level. + + + :return: The name of this DataVisibility. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this DataVisibility. + The name of the visibility level. + + + :param name: The name of this DataVisibility. + :type: str + """ + self._name = name + + @property + def tlp_name(self): + """ + **[Required]** Gets the tlp_name of this DataVisibility. + The Traffic Light Protocol (TLP) name of the visibility level. + + Allowed values for this property are: "TLP_INTERNAL_AUDIT", "TLP_WHITE", "TLP_GREEN", "TLP_AMBER", "TLP_RED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The tlp_name of this DataVisibility. + :rtype: str + """ + return self._tlp_name + + @tlp_name.setter + def tlp_name(self, tlp_name): + """ + Sets the tlp_name of this DataVisibility. + The Traffic Light Protocol (TLP) name of the visibility level. + + + :param tlp_name: The tlp_name of this DataVisibility. + :type: str + """ + allowed_values = ["TLP_INTERNAL_AUDIT", "TLP_WHITE", "TLP_GREEN", "TLP_AMBER", "TLP_RED"] + if not value_allowed_none_or_none_sentinel(tlp_name, allowed_values): + tlp_name = 'UNKNOWN_ENUM_VALUE' + self._tlp_name = tlp_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/threat_intelligence/models/entity_reference.py b/src/oci/threat_intelligence/models/entity_reference.py new file mode 100644 index 0000000000..97e711d6cd --- /dev/null +++ b/src/oci/threat_intelligence/models/entity_reference.py @@ -0,0 +1,99 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class EntityReference(object): + """ + a reference to a resource or other entity + """ + + #: A constant which can be used with the type property of a EntityReference. + #: This constant has a value of "INDICATOR" + TYPE_INDICATOR = "INDICATOR" + + def __init__(self, **kwargs): + """ + Initializes a new EntityReference 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.threat_intelligence.models.IndicatorReference` + + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this EntityReference. + Allowed values for this property are: "INDICATOR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + """ + self.swagger_types = { + 'type': 'str' + } + + self.attribute_map = { + 'type': 'type' + } + + self._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['type'] + + if type == 'INDICATOR': + return 'IndicatorReference' + else: + return 'EntityReference' + + @property + def type(self): + """ + **[Required]** Gets the type of this EntityReference. + the type of the referenced entity + + Allowed values for this property are: "INDICATOR", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this EntityReference. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this EntityReference. + the type of the referenced entity + + + :param type: The type of this EntityReference. + :type: str + """ + allowed_values = ["INDICATOR"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = 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/threat_intelligence/models/indicator.py b/src/oci/threat_intelligence/models/indicator.py new file mode 100644 index 0000000000..5d31b73669 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator.py @@ -0,0 +1,438 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class Indicator(object): + """ + A data signature observed on a network or host that indicates a potential security threat. Indicators can be plain text or computed (hashed) values. + """ + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "DOMAIN_NAME" + TYPE_DOMAIN_NAME = "DOMAIN_NAME" + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "FILE_NAME" + TYPE_FILE_NAME = "FILE_NAME" + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "MD5_HASH" + TYPE_MD5_HASH = "MD5_HASH" + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "SHA1_HASH" + TYPE_SHA1_HASH = "SHA1_HASH" + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "SHA256_HASH" + TYPE_SHA256_HASH = "SHA256_HASH" + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "IP_ADDRESS" + TYPE_IP_ADDRESS = "IP_ADDRESS" + + #: A constant which can be used with the type property of a Indicator. + #: This constant has a value of "URL" + TYPE_URL = "URL" + + #: A constant which can be used with the lifecycle_state property of a Indicator. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a Indicator. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new Indicator 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 Indicator. + :type id: str + + :param type: + The value to assign to the type property of this Indicator. + Allowed values for this property are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param value: + The value to assign to the value property of this Indicator. + :type value: str + + :param confidence: + The value to assign to the confidence property of this Indicator. + :type confidence: int + + :param compartment_id: + The value to assign to the compartment_id property of this Indicator. + :type compartment_id: str + + :param threat_types: + The value to assign to the threat_types property of this Indicator. + :type threat_types: list[oci.threat_intelligence.models.ThreatType] + + :param attributes: + The value to assign to the attributes property of this Indicator. + :type attributes: list[oci.threat_intelligence.models.IndicatorAttribute] + + :param relationships: + The value to assign to the relationships property of this Indicator. + :type relationships: list[oci.threat_intelligence.models.IndicatorRelationship] + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this Indicator. + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this Indicator. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this Indicator. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'type': 'str', + 'value': 'str', + 'confidence': 'int', + 'compartment_id': 'str', + 'threat_types': 'list[ThreatType]', + 'attributes': 'list[IndicatorAttribute]', + 'relationships': 'list[IndicatorRelationship]', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'type': 'type', + 'value': 'value', + 'confidence': 'confidence', + 'compartment_id': 'compartmentId', + 'threat_types': 'threatTypes', + 'attributes': 'attributes', + 'relationships': 'relationships', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._type = None + self._value = None + self._confidence = None + self._compartment_id = None + self._threat_types = None + self._attributes = None + self._relationships = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this Indicator. + The OCID of the indicator. + + + :return: The id of this Indicator. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this Indicator. + The OCID of the indicator. + + + :param id: The id of this Indicator. + :type: str + """ + self._id = id + + @property + def type(self): + """ + **[Required]** Gets the type of this Indicator. + Type of indicator + + Allowed values for this property are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this Indicator. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this Indicator. + Type of indicator + + + :param type: The type of this Indicator. + :type: str + """ + allowed_values = ["DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def value(self): + """ + **[Required]** Gets the value of this Indicator. + The value for this indicator. + Format is dependent upon `type`, e.g. DOMAIN_NAME \"evil.example.com\", MD5_HASH \"44d88612fea8a8f36de82e1278abb02f\", IP_ADDRESS \"2001:db8::1\". + + + :return: The value of this Indicator. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this Indicator. + The value for this indicator. + Format is dependent upon `type`, e.g. DOMAIN_NAME \"evil.example.com\", MD5_HASH \"44d88612fea8a8f36de82e1278abb02f\", IP_ADDRESS \"2001:db8::1\". + + + :param value: The value of this Indicator. + :type: str + """ + self._value = value + + @property + def confidence(self): + """ + Gets the confidence of this Indicator. + Confidence is an integer from 0 to 100 that provides a measure of our certainty in the maliciousness of the indicator. This confidence value is aggregated from the confidence in the threat types, attributes, and relationships to create an overall value for the indicator. + + + :return: The confidence of this Indicator. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this Indicator. + Confidence is an integer from 0 to 100 that provides a measure of our certainty in the maliciousness of the indicator. This confidence value is aggregated from the confidence in the threat types, attributes, and relationships to create an overall value for the indicator. + + + :param confidence: The confidence of this Indicator. + :type: int + """ + self._confidence = confidence + + @property + def compartment_id(self): + """ + Gets the compartment_id of this Indicator. + Compartment Identifier + + + :return: The compartment_id of this Indicator. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this Indicator. + Compartment Identifier + + + :param compartment_id: The compartment_id of this Indicator. + :type: str + """ + self._compartment_id = compartment_id + + @property + def threat_types(self): + """ + **[Required]** Gets the threat_types of this Indicator. + Characteristics of the threat indicator based on previous observations or behavior. May include related tactics, techniques, and procedures. + + + :return: The threat_types of this Indicator. + :rtype: list[oci.threat_intelligence.models.ThreatType] + """ + return self._threat_types + + @threat_types.setter + def threat_types(self, threat_types): + """ + Sets the threat_types of this Indicator. + Characteristics of the threat indicator based on previous observations or behavior. May include related tactics, techniques, and procedures. + + + :param threat_types: The threat_types of this Indicator. + :type: list[oci.threat_intelligence.models.ThreatType] + """ + self._threat_types = threat_types + + @property + def attributes(self): + """ + **[Required]** Gets the attributes of this Indicator. + A map of attribute name (string) to IndicatorAttribute (values and supporting data). + This provides generic storage for additional data about an indicator. + + + :return: The attributes of this Indicator. + :rtype: list[oci.threat_intelligence.models.IndicatorAttribute] + """ + return self._attributes + + @attributes.setter + def attributes(self, attributes): + """ + Sets the attributes of this Indicator. + A map of attribute name (string) to IndicatorAttribute (values and supporting data). + This provides generic storage for additional data about an indicator. + + + :param attributes: The attributes of this Indicator. + :type: list[oci.threat_intelligence.models.IndicatorAttribute] + """ + self._attributes = attributes + + @property + def relationships(self): + """ + **[Required]** Gets the relationships of this Indicator. + A map of relationship name (string) to IndicatorRelationship (related entities and supporting data). + This provides generic storage for relationships between indicators or other entities. + + + :return: The relationships of this Indicator. + :rtype: list[oci.threat_intelligence.models.IndicatorRelationship] + """ + return self._relationships + + @relationships.setter + def relationships(self, relationships): + """ + Sets the relationships of this Indicator. + A map of relationship name (string) to IndicatorRelationship (related entities and supporting data). + This provides generic storage for relationships between indicators or other entities. + + + :param relationships: The relationships of this Indicator. + :type: list[oci.threat_intelligence.models.IndicatorRelationship] + """ + self._relationships = relationships + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this Indicator. + The state of the indicator. It will always be ACTIVE. This field is added for consistency. + + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this Indicator. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this Indicator. + The state of the indicator. It will always be ACTIVE. This field is added for consistency. + + + :param lifecycle_state: The lifecycle_state of this Indicator. + :type: str + """ + allowed_values = ["ACTIVE", "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 time_created(self): + """ + **[Required]** Gets the time_created of this Indicator. + The time the data was first seen for this indicator. An RFC3339 formatted datetime string + + + :return: The time_created of this Indicator. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this Indicator. + The time the data was first seen for this indicator. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this Indicator. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this Indicator. + The last time this indicator was updated. It starts with the same value as timeCreated and is never empty. An RFC3339 formatted datetime string + + + :return: The time_updated of this Indicator. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this Indicator. + The last time this indicator was updated. It starts with the same value as timeCreated and is never empty. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this Indicator. + :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/threat_intelligence/models/indicator_attribute.py b/src/oci/threat_intelligence/models/indicator_attribute.py new file mode 100644 index 0000000000..5f6576c621 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_attribute.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorAttribute(object): + """ + An attribute name and list of values. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorAttribute object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this IndicatorAttribute. + :type name: str + + :param value: + The value to assign to the value property of this IndicatorAttribute. + :type value: str + + :param attribution: + The value to assign to the attribution property of this IndicatorAttribute. + :type attribution: list[oci.threat_intelligence.models.DataAttribution] + + """ + self.swagger_types = { + 'name': 'str', + 'value': 'str', + 'attribution': 'list[DataAttribution]' + } + + self.attribute_map = { + 'name': 'name', + 'value': 'value', + 'attribution': 'attribution' + } + + self._name = None + self._value = None + self._attribution = None + + @property + def name(self): + """ + **[Required]** Gets the name of this IndicatorAttribute. + The name of the attribute + + + :return: The name of this IndicatorAttribute. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this IndicatorAttribute. + The name of the attribute + + + :param name: The name of this IndicatorAttribute. + :type: str + """ + self._name = name + + @property + def value(self): + """ + **[Required]** Gets the value of this IndicatorAttribute. + The value of the attribute. + + + :return: The value of this IndicatorAttribute. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this IndicatorAttribute. + The value of the attribute. + + + :param value: The value of this IndicatorAttribute. + :type: str + """ + self._value = value + + @property + def attribution(self): + """ + **[Required]** Gets the attribution of this IndicatorAttribute. + The array of attribution data that support this attribute. + + + :return: The attribution of this IndicatorAttribute. + :rtype: list[oci.threat_intelligence.models.DataAttribution] + """ + return self._attribution + + @attribution.setter + def attribution(self, attribution): + """ + Sets the attribution of this IndicatorAttribute. + The array of attribution data that support this attribute. + + + :param attribution: The attribution of this IndicatorAttribute. + :type: list[oci.threat_intelligence.models.DataAttribution] + """ + self._attribution = attribution + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/indicator_count_collection.py b/src/oci/threat_intelligence/models/indicator_count_collection.py new file mode 100644 index 0000000000..9aaae7f480 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_count_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorCountCollection(object): + """ + A list of indicator counts by indicator type. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorCountCollection 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 IndicatorCountCollection. + :type items: list[oci.threat_intelligence.models.IndicatorCountSummary] + + """ + self.swagger_types = { + 'items': 'list[IndicatorCountSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this IndicatorCountCollection. + The list of aggregated indicator counts. + + + :return: The items of this IndicatorCountCollection. + :rtype: list[oci.threat_intelligence.models.IndicatorCountSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this IndicatorCountCollection. + The list of aggregated indicator counts. + + + :param items: The items of this IndicatorCountCollection. + :type: list[oci.threat_intelligence.models.IndicatorCountSummary] + """ + 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/threat_intelligence/models/indicator_count_dimensions.py b/src/oci/threat_intelligence/models/indicator_count_dimensions.py new file mode 100644 index 0000000000..08ab1f07ee --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_count_dimensions.py @@ -0,0 +1,137 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorCountDimensions(object): + """ + Dimensions characterizing the group + """ + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "DOMAIN_NAME" + TYPE_DOMAIN_NAME = "DOMAIN_NAME" + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "FILE_NAME" + TYPE_FILE_NAME = "FILE_NAME" + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "MD5_HASH" + TYPE_MD5_HASH = "MD5_HASH" + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "SHA1_HASH" + TYPE_SHA1_HASH = "SHA1_HASH" + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "SHA256_HASH" + TYPE_SHA256_HASH = "SHA256_HASH" + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "IP_ADDRESS" + TYPE_IP_ADDRESS = "IP_ADDRESS" + + #: A constant which can be used with the type property of a IndicatorCountDimensions. + #: This constant has a value of "URL" + TYPE_URL = "URL" + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorCountDimensions 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 IndicatorCountDimensions. + :type compartment_id: str + + :param type: + The value to assign to the type property of this IndicatorCountDimensions. + Allowed values for this property are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + """ + self.swagger_types = { + 'compartment_id': 'str', + 'type': 'str' + } + + self.attribute_map = { + 'compartment_id': 'compartmentId', + 'type': 'type' + } + + self._compartment_id = None + self._type = None + + @property + def compartment_id(self): + """ + Gets the compartment_id of this IndicatorCountDimensions. + Compartment Identifier + + + :return: The compartment_id of this IndicatorCountDimensions. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this IndicatorCountDimensions. + Compartment Identifier + + + :param compartment_id: The compartment_id of this IndicatorCountDimensions. + :type: str + """ + self._compartment_id = compartment_id + + @property + def type(self): + """ + Gets the type of this IndicatorCountDimensions. + The indicator type that corresponds to the count. + + Allowed values for this property are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this IndicatorCountDimensions. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this IndicatorCountDimensions. + The indicator type that corresponds to the count. + + + :param type: The type of this IndicatorCountDimensions. + :type: str + """ + allowed_values = ["DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = 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/threat_intelligence/models/indicator_count_summary.py b/src/oci/threat_intelligence/models/indicator_count_summary.py new file mode 100644 index 0000000000..40f8b4372e --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_count_summary.py @@ -0,0 +1,97 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorCountSummary(object): + """ + A group of indicators with the same dimensions + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorCountSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param dimensions: + The value to assign to the dimensions property of this IndicatorCountSummary. + :type dimensions: oci.threat_intelligence.models.IndicatorCountDimensions + + :param count: + The value to assign to the count property of this IndicatorCountSummary. + :type count: int + + """ + self.swagger_types = { + 'dimensions': 'IndicatorCountDimensions', + 'count': 'int' + } + + self.attribute_map = { + 'dimensions': 'dimensions', + 'count': 'count' + } + + self._dimensions = None + self._count = None + + @property + def dimensions(self): + """ + **[Required]** Gets the dimensions of this IndicatorCountSummary. + + :return: The dimensions of this IndicatorCountSummary. + :rtype: oci.threat_intelligence.models.IndicatorCountDimensions + """ + return self._dimensions + + @dimensions.setter + def dimensions(self, dimensions): + """ + Sets the dimensions of this IndicatorCountSummary. + + :param dimensions: The dimensions of this IndicatorCountSummary. + :type: oci.threat_intelligence.models.IndicatorCountDimensions + """ + self._dimensions = dimensions + + @property + def count(self): + """ + **[Required]** Gets the count of this IndicatorCountSummary. + The count of indicators in the group + + + :return: The count of this IndicatorCountSummary. + :rtype: int + """ + return self._count + + @count.setter + def count(self, count): + """ + Sets the count of this IndicatorCountSummary. + The count of indicators in the group + + + :param count: The count of this IndicatorCountSummary. + :type: int + """ + self._count = count + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/indicator_reference.py b/src/oci/threat_intelligence/models/indicator_reference.py new file mode 100644 index 0000000000..758d70ee99 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_reference.py @@ -0,0 +1,80 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from .entity_reference import EntityReference +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorReference(EntityReference): + """ + a reference to an Indicator resource + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorReference object with values from keyword arguments. The default value of the :py:attr:`~oci.threat_intelligence.models.IndicatorReference.type` attribute + of this class is ``INDICATOR`` and it should not be changed. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param type: + The value to assign to the type property of this IndicatorReference. + Allowed values for this property are: "INDICATOR" + :type type: str + + :param indicator_id: + The value to assign to the indicator_id property of this IndicatorReference. + :type indicator_id: str + + """ + self.swagger_types = { + 'type': 'str', + 'indicator_id': 'str' + } + + self.attribute_map = { + 'type': 'type', + 'indicator_id': 'indicatorId' + } + + self._type = None + self._indicator_id = None + self._type = 'INDICATOR' + + @property + def indicator_id(self): + """ + **[Required]** Gets the indicator_id of this IndicatorReference. + the OCID of the referenced Indicator + + + :return: The indicator_id of this IndicatorReference. + :rtype: str + """ + return self._indicator_id + + @indicator_id.setter + def indicator_id(self, indicator_id): + """ + Sets the indicator_id of this IndicatorReference. + the OCID of the referenced Indicator + + + :param indicator_id: The indicator_id of this IndicatorReference. + :type: str + """ + self._indicator_id = indicator_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/threat_intelligence/models/indicator_relationship.py b/src/oci/threat_intelligence/models/indicator_relationship.py new file mode 100644 index 0000000000..12cb7e5e84 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_relationship.py @@ -0,0 +1,128 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorRelationship(object): + """ + An relationship name and list of releated entities. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorRelationship object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this IndicatorRelationship. + :type name: str + + :param related_entity: + The value to assign to the related_entity property of this IndicatorRelationship. + :type related_entity: oci.threat_intelligence.models.EntityReference + + :param attribution: + The value to assign to the attribution property of this IndicatorRelationship. + :type attribution: list[oci.threat_intelligence.models.DataAttribution] + + """ + self.swagger_types = { + 'name': 'str', + 'related_entity': 'EntityReference', + 'attribution': 'list[DataAttribution]' + } + + self.attribute_map = { + 'name': 'name', + 'related_entity': 'relatedEntity', + 'attribution': 'attribution' + } + + self._name = None + self._related_entity = None + self._attribution = None + + @property + def name(self): + """ + **[Required]** Gets the name of this IndicatorRelationship. + The name of the attribute + + + :return: The name of this IndicatorRelationship. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this IndicatorRelationship. + The name of the attribute + + + :param name: The name of this IndicatorRelationship. + :type: str + """ + self._name = name + + @property + def related_entity(self): + """ + **[Required]** Gets the related_entity of this IndicatorRelationship. + + :return: The related_entity of this IndicatorRelationship. + :rtype: oci.threat_intelligence.models.EntityReference + """ + return self._related_entity + + @related_entity.setter + def related_entity(self, related_entity): + """ + Sets the related_entity of this IndicatorRelationship. + + :param related_entity: The related_entity of this IndicatorRelationship. + :type: oci.threat_intelligence.models.EntityReference + """ + self._related_entity = related_entity + + @property + def attribution(self): + """ + **[Required]** Gets the attribution of this IndicatorRelationship. + The array of attribution data that support this SourcedRelationship + + + :return: The attribution of this IndicatorRelationship. + :rtype: list[oci.threat_intelligence.models.DataAttribution] + """ + return self._attribution + + @attribution.setter + def attribution(self, attribution): + """ + Sets the attribution of this IndicatorRelationship. + The array of attribution data that support this SourcedRelationship + + + :param attribution: The attribution of this IndicatorRelationship. + :type: list[oci.threat_intelligence.models.DataAttribution] + """ + self._attribution = attribution + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/indicator_source_summary.py b/src/oci/threat_intelligence/models/indicator_source_summary.py new file mode 100644 index 0000000000..de0d9cd2e6 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_source_summary.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorSourceSummary(object): + """ + Information about the source of indicator data. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorSourceSummary object with values from keyword arguments. + The following keyword arguments are supported (corresponding to the getters/setters of this class): + + :param name: + The value to assign to the name property of this IndicatorSourceSummary. + :type name: str + + """ + self.swagger_types = { + 'name': 'str' + } + + self.attribute_map = { + 'name': 'name' + } + + self._name = None + + @property + def name(self): + """ + **[Required]** Gets the name of this IndicatorSourceSummary. + The name of the source + + + :return: The name of this IndicatorSourceSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this IndicatorSourceSummary. + The name of the source + + + :param name: The name of this IndicatorSourceSummary. + :type: str + """ + self._name = name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/indicator_summary.py b/src/oci/threat_intelligence/models/indicator_summary.py new file mode 100644 index 0000000000..2d8814e529 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_summary.py @@ -0,0 +1,370 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorSummary(object): + """ + Summary of a data signature observed on a network or host that indicates a potential security threat. + """ + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "DOMAIN_NAME" + TYPE_DOMAIN_NAME = "DOMAIN_NAME" + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "FILE_NAME" + TYPE_FILE_NAME = "FILE_NAME" + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "MD5_HASH" + TYPE_MD5_HASH = "MD5_HASH" + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "SHA1_HASH" + TYPE_SHA1_HASH = "SHA1_HASH" + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "SHA256_HASH" + TYPE_SHA256_HASH = "SHA256_HASH" + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "IP_ADDRESS" + TYPE_IP_ADDRESS = "IP_ADDRESS" + + #: A constant which can be used with the type property of a IndicatorSummary. + #: This constant has a value of "URL" + TYPE_URL = "URL" + + #: A constant which can be used with the lifecycle_state property of a IndicatorSummary. + #: This constant has a value of "ACTIVE" + LIFECYCLE_STATE_ACTIVE = "ACTIVE" + + #: A constant which can be used with the lifecycle_state property of a IndicatorSummary. + #: This constant has a value of "DELETED" + LIFECYCLE_STATE_DELETED = "DELETED" + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorSummary 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 IndicatorSummary. + :type id: str + + :param type: + The value to assign to the type property of this IndicatorSummary. + Allowed values for this property are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type type: str + + :param value: + The value to assign to the value property of this IndicatorSummary. + :type value: str + + :param confidence: + The value to assign to the confidence property of this IndicatorSummary. + :type confidence: int + + :param compartment_id: + The value to assign to the compartment_id property of this IndicatorSummary. + :type compartment_id: str + + :param threat_types: + The value to assign to the threat_types property of this IndicatorSummary. + :type threat_types: list[oci.threat_intelligence.models.ThreatType] + + :param lifecycle_state: + The value to assign to the lifecycle_state property of this IndicatorSummary. + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + :type lifecycle_state: str + + :param time_created: + The value to assign to the time_created property of this IndicatorSummary. + :type time_created: datetime + + :param time_updated: + The value to assign to the time_updated property of this IndicatorSummary. + :type time_updated: datetime + + """ + self.swagger_types = { + 'id': 'str', + 'type': 'str', + 'value': 'str', + 'confidence': 'int', + 'compartment_id': 'str', + 'threat_types': 'list[ThreatType]', + 'lifecycle_state': 'str', + 'time_created': 'datetime', + 'time_updated': 'datetime' + } + + self.attribute_map = { + 'id': 'id', + 'type': 'type', + 'value': 'value', + 'confidence': 'confidence', + 'compartment_id': 'compartmentId', + 'threat_types': 'threatTypes', + 'lifecycle_state': 'lifecycleState', + 'time_created': 'timeCreated', + 'time_updated': 'timeUpdated' + } + + self._id = None + self._type = None + self._value = None + self._confidence = None + self._compartment_id = None + self._threat_types = None + self._lifecycle_state = None + self._time_created = None + self._time_updated = None + + @property + def id(self): + """ + **[Required]** Gets the id of this IndicatorSummary. + The OCID of the indicator. + + + :return: The id of this IndicatorSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this IndicatorSummary. + The OCID of the indicator. + + + :param id: The id of this IndicatorSummary. + :type: str + """ + self._id = id + + @property + def type(self): + """ + **[Required]** Gets the type of this IndicatorSummary. + Type of indicator + + Allowed values for this property are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The type of this IndicatorSummary. + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """ + Sets the type of this IndicatorSummary. + Type of indicator + + + :param type: The type of this IndicatorSummary. + :type: str + """ + allowed_values = ["DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL"] + if not value_allowed_none_or_none_sentinel(type, allowed_values): + type = 'UNKNOWN_ENUM_VALUE' + self._type = type + + @property + def value(self): + """ + **[Required]** Gets the value of this IndicatorSummary. + The value of indicator. + + + :return: The value of this IndicatorSummary. + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """ + Sets the value of this IndicatorSummary. + The value of indicator. + + + :param value: The value of this IndicatorSummary. + :type: str + """ + self._value = value + + @property + def confidence(self): + """ + Gets the confidence of this IndicatorSummary. + Confidence is an integer from 0 to 100 that provides a measure of our certainty in the maliciousness of the indicator. This confidence value is aggregated from the confidence in the threat types, attributes, and relationships to create an overall value for the indicator. + + + :return: The confidence of this IndicatorSummary. + :rtype: int + """ + return self._confidence + + @confidence.setter + def confidence(self, confidence): + """ + Sets the confidence of this IndicatorSummary. + Confidence is an integer from 0 to 100 that provides a measure of our certainty in the maliciousness of the indicator. This confidence value is aggregated from the confidence in the threat types, attributes, and relationships to create an overall value for the indicator. + + + :param confidence: The confidence of this IndicatorSummary. + :type: int + """ + self._confidence = confidence + + @property + def compartment_id(self): + """ + Gets the compartment_id of this IndicatorSummary. + Compartment Identifier + + + :return: The compartment_id of this IndicatorSummary. + :rtype: str + """ + return self._compartment_id + + @compartment_id.setter + def compartment_id(self, compartment_id): + """ + Sets the compartment_id of this IndicatorSummary. + Compartment Identifier + + + :param compartment_id: The compartment_id of this IndicatorSummary. + :type: str + """ + self._compartment_id = compartment_id + + @property + def threat_types(self): + """ + **[Required]** Gets the threat_types of this IndicatorSummary. + Characteristics of the threat indicator based on previous observations or behavior. May include related tactics, techniques, and procedures. + + + :return: The threat_types of this IndicatorSummary. + :rtype: list[oci.threat_intelligence.models.ThreatType] + """ + return self._threat_types + + @threat_types.setter + def threat_types(self, threat_types): + """ + Sets the threat_types of this IndicatorSummary. + Characteristics of the threat indicator based on previous observations or behavior. May include related tactics, techniques, and procedures. + + + :param threat_types: The threat_types of this IndicatorSummary. + :type: list[oci.threat_intelligence.models.ThreatType] + """ + self._threat_types = threat_types + + @property + def lifecycle_state(self): + """ + Gets the lifecycle_state of this IndicatorSummary. + The state of the indicator. It will always be ACTIVE. This field is added for consistency. + + Allowed values for this property are: "ACTIVE", "DELETED", 'UNKNOWN_ENUM_VALUE'. + Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'. + + + :return: The lifecycle_state of this IndicatorSummary. + :rtype: str + """ + return self._lifecycle_state + + @lifecycle_state.setter + def lifecycle_state(self, lifecycle_state): + """ + Sets the lifecycle_state of this IndicatorSummary. + The state of the indicator. It will always be ACTIVE. This field is added for consistency. + + + :param lifecycle_state: The lifecycle_state of this IndicatorSummary. + :type: str + """ + allowed_values = ["ACTIVE", "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 time_created(self): + """ + **[Required]** Gets the time_created of this IndicatorSummary. + The time the data was first seen for this indicator. An RFC3339 formatted datetime string + + + :return: The time_created of this IndicatorSummary. + :rtype: datetime + """ + return self._time_created + + @time_created.setter + def time_created(self, time_created): + """ + Sets the time_created of this IndicatorSummary. + The time the data was first seen for this indicator. An RFC3339 formatted datetime string + + + :param time_created: The time_created of this IndicatorSummary. + :type: datetime + """ + self._time_created = time_created + + @property + def time_updated(self): + """ + **[Required]** Gets the time_updated of this IndicatorSummary. + The last time this indicator was updated. It starts with the same value as timeCreated and is never empty. An RFC3339 formatted datetime string + + + :return: The time_updated of this IndicatorSummary. + :rtype: datetime + """ + return self._time_updated + + @time_updated.setter + def time_updated(self, time_updated): + """ + Sets the time_updated of this IndicatorSummary. + The last time this indicator was updated. It starts with the same value as timeCreated and is never empty. An RFC3339 formatted datetime string + + + :param time_updated: The time_updated of this IndicatorSummary. + :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/threat_intelligence/models/indicator_summary_collection.py b/src/oci/threat_intelligence/models/indicator_summary_collection.py new file mode 100644 index 0000000000..e7693ef078 --- /dev/null +++ b/src/oci/threat_intelligence/models/indicator_summary_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class IndicatorSummaryCollection(object): + """ + List of indicator summary objects. + """ + + def __init__(self, **kwargs): + """ + Initializes a new IndicatorSummaryCollection 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 IndicatorSummaryCollection. + :type items: list[oci.threat_intelligence.models.IndicatorSummary] + + """ + self.swagger_types = { + 'items': 'list[IndicatorSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this IndicatorSummaryCollection. + The list of indicators + + + :return: The items of this IndicatorSummaryCollection. + :rtype: list[oci.threat_intelligence.models.IndicatorSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this IndicatorSummaryCollection. + The list of indicators + + + :param items: The items of this IndicatorSummaryCollection. + :type: list[oci.threat_intelligence.models.IndicatorSummary] + """ + 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/threat_intelligence/models/threat_type.py b/src/oci/threat_intelligence/models/threat_type.py new file mode 100644 index 0000000000..afa11516e5 --- /dev/null +++ b/src/oci/threat_intelligence/models/threat_type.py @@ -0,0 +1,132 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ThreatType(object): + """ + Threat type along with attribution data for its association to an indicator + """ + + def __init__(self, **kwargs): + """ + Initializes a new ThreatType 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 ThreatType. + :type id: str + + :param name: + The value to assign to the name property of this ThreatType. + :type name: str + + :param attribution: + The value to assign to the attribution property of this ThreatType. + :type attribution: list[oci.threat_intelligence.models.DataAttribution] + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str', + 'attribution': 'list[DataAttribution]' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name', + 'attribution': 'attribution' + } + + self._id = None + self._name = None + self._attribution = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ThreatType. + The OCID of the threat type + + + :return: The id of this ThreatType. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ThreatType. + The OCID of the threat type + + + :param id: The id of this ThreatType. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ThreatType. + The name of the threat type + + + :return: The name of this ThreatType. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ThreatType. + The name of the threat type + + + :param name: The name of this ThreatType. + :type: str + """ + self._name = name + + @property + def attribution(self): + """ + **[Required]** Gets the attribution of this ThreatType. + The list of supporting attribution information. + + + :return: The attribution of this ThreatType. + :rtype: list[oci.threat_intelligence.models.DataAttribution] + """ + return self._attribution + + @attribution.setter + def attribution(self, attribution): + """ + Sets the attribution of this ThreatType. + The list of supporting attribution information. + + + :param attribution: The attribution of this ThreatType. + :type: list[oci.threat_intelligence.models.DataAttribution] + """ + self._attribution = attribution + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/threat_type_summary.py b/src/oci/threat_intelligence/models/threat_type_summary.py new file mode 100644 index 0000000000..f87ebafe9b --- /dev/null +++ b/src/oci/threat_intelligence/models/threat_type_summary.py @@ -0,0 +1,101 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ThreatTypeSummary(object): + """ + Threat type id and text + """ + + def __init__(self, **kwargs): + """ + Initializes a new ThreatTypeSummary 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 ThreatTypeSummary. + :type id: str + + :param name: + The value to assign to the name property of this ThreatTypeSummary. + :type name: str + + """ + self.swagger_types = { + 'id': 'str', + 'name': 'str' + } + + self.attribute_map = { + 'id': 'id', + 'name': 'name' + } + + self._id = None + self._name = None + + @property + def id(self): + """ + **[Required]** Gets the id of this ThreatTypeSummary. + The OCID of the threat type + + + :return: The id of this ThreatTypeSummary. + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """ + Sets the id of this ThreatTypeSummary. + The OCID of the threat type + + + :param id: The id of this ThreatTypeSummary. + :type: str + """ + self._id = id + + @property + def name(self): + """ + **[Required]** Gets the name of this ThreatTypeSummary. + The name of the threat type + + + :return: The name of this ThreatTypeSummary. + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """ + Sets the name of this ThreatTypeSummary. + The name of the threat type + + + :param name: The name of this ThreatTypeSummary. + :type: str + """ + self._name = name + + def __repr__(self): + return formatted_flat_dict(self) + + def __eq__(self, other): + if other is None: + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + return not self == other diff --git a/src/oci/threat_intelligence/models/threat_types_collection.py b/src/oci/threat_intelligence/models/threat_types_collection.py new file mode 100644 index 0000000000..e70c8072c0 --- /dev/null +++ b/src/oci/threat_intelligence/models/threat_types_collection.py @@ -0,0 +1,70 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + + +from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 +from oci.decorators import init_model_state_from_kwargs + + +@init_model_state_from_kwargs +class ThreatTypesCollection(object): + """ + List of threat types applicable to indicators. + """ + + def __init__(self, **kwargs): + """ + Initializes a new ThreatTypesCollection 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 ThreatTypesCollection. + :type items: list[oci.threat_intelligence.models.ThreatTypeSummary] + + """ + self.swagger_types = { + 'items': 'list[ThreatTypeSummary]' + } + + self.attribute_map = { + 'items': 'items' + } + + self._items = None + + @property + def items(self): + """ + **[Required]** Gets the items of this ThreatTypesCollection. + The list of threat types that are available to query on + + + :return: The items of this ThreatTypesCollection. + :rtype: list[oci.threat_intelligence.models.ThreatTypeSummary] + """ + return self._items + + @items.setter + def items(self, items): + """ + Sets the items of this ThreatTypesCollection. + The list of threat types that are available to query on + + + :param items: The items of this ThreatTypesCollection. + :type: list[oci.threat_intelligence.models.ThreatTypeSummary] + """ + 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/threat_intelligence/threatintel_client.py b/src/oci/threat_intelligence/threatintel_client.py new file mode 100644 index 0000000000..a38ab67d46 --- /dev/null +++ b/src/oci/threat_intelligence/threatintel_client.py @@ -0,0 +1,547 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +from __future__ import absolute_import + +from oci._vendor import requests # noqa: F401 +from oci._vendor import six + +from oci import retry, circuit_breaker # noqa: F401 +from oci.base_client import BaseClient +from oci.config import get_config_value_or_default, validate_config +from oci.signer import Signer +from oci.util import Sentinel, get_signer_from_authentication_type, AUTHENTICATION_TYPE_FIELD_NAME +from .models import threat_intelligence_type_mapping +missing = Sentinel("Missing") + + +class ThreatintelClient(object): + """ + Use the Threat Intelligence API to view indicators of compromise and related items. For more information, see [Overview of Threat Intelligence](/Content/ThreatIntelligence/Concepts/threatintelligenceoverview.htm). + """ + + 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 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. + """ + 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': '/20210831', + 'service_endpoint_template': 'https://api-threatintel.{region}.oci.{secondLevelDomain}', + 'skip_deserialization': kwargs.get('skip_deserialization', False), + 'circuit_breaker_strategy': kwargs.get('circuit_breaker_strategy', circuit_breaker.GLOBAL_CIRCUIT_BREAKER_STRATEGY) + } + if 'timeout' in kwargs: + base_client_init_kwargs['timeout'] = kwargs.get('timeout') + 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("threatintel", config, signer, threat_intelligence_type_mapping, **base_client_init_kwargs) + self.retry_strategy = kwargs.get('retry_strategy') + self.circuit_breaker_callback = kwargs.get('circuit_breaker_callback') + + def get_indicator(self, indicator_id, compartment_id, **kwargs): + """ + Gets a detailed indicator by identifier + + + :param str indicator_id: (required) + unique indicator identifier + + :param str compartment_id: (required) + The ID of the tenancy to use to filter results. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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.threat_intelligence.models.Indicator` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use get_indicator API. + """ + resource_path = "/indicators/{indicatorId}" + method = "GET" + + # 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( + "get_indicator got unknown kwargs: {!r}".format(extra_kwargs)) + + path_params = { + "indicatorId": indicator_id + } + + path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing} + + for (k, v) in six.iteritems(path_params): + if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0): + raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k)) + + query_params = { + "compartmentId": compartment_id + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Indicator") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + path_params=path_params, + query_params=query_params, + header_params=header_params, + response_type="Indicator") + + def list_indicator_counts(self, compartment_id, **kwargs): + """ + Get the current count of each indicator type. Results can be sorted ASC or DESC by count. + + + :param str compartment_id: (required) + The ID of the tenancy to use to filter results. + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param str sort_order: (optional) + The sort order to use, either 'ASC' or 'DESC'. + + Allowed values are: "ASC", "DESC" + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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.threat_intelligence.models.IndicatorCountCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_indicator_counts API. + """ + resource_path = "/indicatorCounts" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "opc_request_id", + "sort_order" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_indicator_counts got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="IndicatorCountCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="IndicatorCountCollection") + + def list_indicators(self, compartment_id, **kwargs): + """ + Returns a list of IndicatorSummary objects. + + + :param str compartment_id: (required) + The ID of the tenancy to use to filter results. + + :param list[str] threat_type_name: (optional) + The result set will include indicators that have any of the provided threat types. To filter for multiple threat types repeat the query parameter. + + :param str type: (optional) + The indicator type of entities to be returned. + + Allowed values are: "DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL" + + :param str value: (optional) + The indicator value of entities to be returned. + + :param int confidence_greater_than_or_equal_to: (optional) + The minimum confidence score of entities to be returned. + + :param datetime time_updated_greater_than_or_equal_to: (optional) + The oldest update time of entities to be returned. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :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 field to sort by may be provided. + + Allowed values are: "confidence", "timeUpdated" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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.threat_intelligence.models.IndicatorSummaryCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_indicators API. + """ + resource_path = "/indicators" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "threat_type_name", + "type", + "value", + "confidence_greater_than_or_equal_to", + "time_updated_greater_than_or_equal_to", + "limit", + "page", + "sort_order", + "sort_by", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_indicators got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'type' in kwargs: + type_allowed_values = ["DOMAIN_NAME", "FILE_NAME", "MD5_HASH", "SHA1_HASH", "SHA256_HASH", "IP_ADDRESS", "URL"] + if kwargs['type'] not in type_allowed_values: + raise ValueError( + "Invalid value for `type`, must be one of {0}".format(type_allowed_values) + ) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + if 'sort_by' in kwargs: + sort_by_allowed_values = ["confidence", "timeUpdated"] + if kwargs['sort_by'] not in sort_by_allowed_values: + raise ValueError( + "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "threatTypeName": self.base_client.generate_collection_format_param(kwargs.get("threat_type_name", missing), 'multi'), + "type": kwargs.get("type", missing), + "value": kwargs.get("value", missing), + "confidenceGreaterThanOrEqualTo": kwargs.get("confidence_greater_than_or_equal_to", missing), + "timeUpdatedGreaterThanOrEqualTo": kwargs.get("time_updated_greater_than_or_equal_to", missing), + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing), + "sortBy": kwargs.get("sort_by", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="IndicatorSummaryCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="IndicatorSummaryCollection") + + def list_threat_types(self, compartment_id, **kwargs): + """ + Gets a list of threat types that are available to use as parameters when querying indicators. + This is sorted by threat type name according to the sort order query param. + + + :param str compartment_id: (required) + The ID of the tenancy to use to filter results. + + :param int limit: (optional) + The maximum number of items to return. + + :param str page: (optional) + A token representing the position at which to start retrieving results. This must come from the `opc-next-page` header field of a previous response. + + :param str sort_order: (optional) + The sort order to use, either 'ASC' or 'DESC'. + + Allowed values are: "ASC", "DESC" + + :param str opc_request_id: (optional) + The client request ID for tracing. + + :param obj retry_strategy: (optional) + A retry strategy to apply to this specific operation/call. This will override any retry strategy set at the client-level. + + This should be one of the strategies available in the :py:mod:`~oci.retry` module. This operation will not retry by default, users can also use the convenient :py:data:`~oci.retry.DEFAULT_RETRY_STRATEGY` provided by the SDK to enable retries for it. + The specifics of the default retry strategy are described `here `__. + + To have this operation explicitly not perform any retries, pass an instance of :py:class:`~oci.retry.NoneRetryStrategy`. + + :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.threat_intelligence.models.ThreatTypesCollection` + :rtype: :class:`~oci.response.Response` + + :example: + Click `here `__ to see an example of how to use list_threat_types API. + """ + resource_path = "/threatTypes" + method = "GET" + + # Don't accept unknown kwargs + expected_kwargs = [ + "allow_control_chars", + "retry_strategy", + "limit", + "page", + "sort_order", + "opc_request_id" + ] + extra_kwargs = [_key for _key in six.iterkeys(kwargs) if _key not in expected_kwargs] + if extra_kwargs: + raise ValueError( + "list_threat_types got unknown kwargs: {!r}".format(extra_kwargs)) + + if 'sort_order' in kwargs: + sort_order_allowed_values = ["ASC", "DESC"] + if kwargs['sort_order'] not in sort_order_allowed_values: + raise ValueError( + "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values) + ) + + query_params = { + "compartmentId": compartment_id, + "limit": kwargs.get("limit", missing), + "page": kwargs.get("page", missing), + "sortOrder": kwargs.get("sort_order", missing) + } + query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing and v is not None} + + header_params = { + "accept": "application/json", + "content-type": "application/json", + "opc-request-id": kwargs.get("opc_request_id", missing) + } + header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing and v is not None} + + retry_strategy = self.base_client.get_preferred_retry_strategy( + operation_retry_strategy=kwargs.get('retry_strategy'), + client_retry_strategy=self.retry_strategy + ) + + if retry_strategy: + if not isinstance(retry_strategy, retry.NoneRetryStrategy): + self.base_client.add_opc_client_retries_header(header_params) + retry_strategy.add_circuit_breaker_callback(self.circuit_breaker_callback) + return retry_strategy.make_retrying_call( + self.base_client.call_api, + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ThreatTypesCollection") + else: + return self.base_client.call_api( + resource_path=resource_path, + method=method, + query_params=query_params, + header_params=header_params, + response_type="ThreatTypesCollection") diff --git a/src/oci/threat_intelligence/threatintel_client_composite_operations.py b/src/oci/threat_intelligence/threatintel_client_composite_operations.py new file mode 100644 index 0000000000..7fbfdea65e --- /dev/null +++ b/src/oci/threat_intelligence/threatintel_client_composite_operations.py @@ -0,0 +1,24 @@ +# coding: utf-8 +# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + +import oci # noqa: F401 +from oci.util import WAIT_RESOURCE_NOT_FOUND # noqa: F401 + + +class ThreatintelClientCompositeOperations(object): + """ + This class provides a wrapper around :py:class:`~oci.threat_intelligence.ThreatintelClient` 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 ThreatintelClientCompositeOperations object + + :param ThreatintelClient client: + The service client which will be wrapped by this object + """ + self.client = client diff --git a/src/oci/version.py b/src/oci/version.py index 1d7ad25478..ee11765e7b 100644 --- a/src/oci/version.py +++ b/src/oci/version.py @@ -2,4 +2,4 @@ # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.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.56.0" +__version__ = "2.57.0"