From 25dcade9d33de09075681eae77784d817984f328 Mon Sep 17 00:00:00 2001 From: OCI DEX Release Bot Automation Date: Tue, 1 Oct 2024 16:36:22 +0000 Subject: [PATCH] Releasing version 3.50.1 --- CHANGELOG.md | 11 + THIRD_PARTY_LICENSES.txt | 14 - bmc-accessgovernancecp/pom.xml | 4 +- bmc-addons/bmc-aispeech-realtime/pom.xml | 6 +- .../pom.xml | 6 +- .../pom.xml | 6 +- .../bmc-apache-connector-provider/pom.xml | 4 +- bmc-addons/bmc-oke-workload-identity/pom.xml | 10 +- .../bmc-resteasy-client-configurator/pom.xml | 4 +- .../bmc-sasl-oke-workload-identity/pom.xml | 6 +- bmc-addons/bmc-sasl/pom.xml | 4 +- bmc-addons/bmc-sse-support-jersey3/pom.xml | 8 +- bmc-addons/bmc-sse-support/pom.xml | 8 +- bmc-addons/pom.xml | 2 +- bmc-adm/pom.xml | 4 +- bmc-aianomalydetection/pom.xml | 4 +- bmc-aidocument/pom.xml | 4 +- bmc-ailanguage/pom.xml | 4 +- bmc-aispeech/pom.xml | 4 +- bmc-aivision/pom.xml | 4 +- bmc-analytics/pom.xml | 4 +- bmc-announcementsservice/pom.xml | 4 +- bmc-apigateway/pom.xml | 4 +- bmc-apmconfig/pom.xml | 4 +- bmc-apmcontrolplane/pom.xml | 4 +- bmc-apmsynthetics/pom.xml | 4 +- bmc-apmtraces/pom.xml | 4 +- bmc-appmgmtcontrol/pom.xml | 4 +- bmc-artifacts/pom.xml | 4 +- bmc-audit/pom.xml | 4 +- bmc-autoscaling/pom.xml | 4 +- bmc-bastion/pom.xml | 4 +- bmc-bds/pom.xml | 4 +- bmc-blockchain/pom.xml | 4 +- bmc-bom/pom.xml | 336 ++--- bmc-budget/pom.xml | 4 +- bmc-capacitymanagement/pom.xml | 4 +- bmc-certificates/pom.xml | 4 +- bmc-certificatesmanagement/pom.xml | 4 +- bmc-cims/pom.xml | 4 +- bmc-circuitbreaker/pom.xml | 2 +- bmc-cloudbridge/pom.xml | 4 +- bmc-cloudguard/pom.xml | 4 +- bmc-cloudmigrations/pom.xml | 4 +- bmc-clusterplacementgroups/pom.xml | 4 +- .../bmc-common-httpclient-jersey/pom.xml | 11 +- .../bmc/graalvm/BouncyCastleFeature.java | 21 - .../bcprov-jdk15to18/reflect-config.json | 366 ----- .../native-image.properties | 4 +- .../bmc-common-httpclient-jersey3/pom.xml | 11 +- .../bmc/graalvm/BouncyCastleFeature.java | 21 - .../bcprov-jdk15to18/reflect-config.json | 366 ----- .../native-image.properties | 4 +- bmc-common-httpclient-choices/pom.xml | 2 +- bmc-common-httpclient/pom.xml | 3 +- .../oracle/bmc/http/client/pki/Eraser.java | 63 + .../com/oracle/bmc/http/client/pki/Hex.java | 32 + .../pki/OpenSslPbeSecretKeyFactory.java | 44 + .../pki/OpenSslPbeSecretKeyGenerator.java | 124 ++ .../com/oracle/bmc/http/client/pki/Pem.java | 1228 +++++++++++++++++ .../client/pki/PemEncryptedKeyException.java | 11 + .../client/pki/PemEncryptionException.java | 16 + .../bmc/http/client/pki/PemException.java | 20 + .../pki/Pkcs1EncryptedPrivateKeyInfo.java | 169 +++ .../oracle/bmc/http/client/pki/Sensitive.java | 25 + .../com/oracle/bmc/http/client/pki/Text.java | 83 ++ .../com/oracle/bmc/http/client/pki/Utf8.java | 261 ++++ .../bmc/http/client/pki/internal-README.md | 115 ++ bmc-common/pom.xml | 16 +- .../src/main/java/com/oracle/bmc/Realm.java | 1 + .../src/main/java/com/oracle/bmc/Region.java | 4 + ...tAuthenticationDetailsProviderBuilder.java | 10 +- ...questingAuthenticationDetailsProvider.java | 1 - .../oracle/bmc/auth/internal/AuthUtils.java | 69 +- .../signing/internal/BouncyCastleHelper.java | 74 - .../PEMFileRSAPrivateKeySupplier.java | 113 +- .../PEMStreamRSAPrivateKeySupplier.java | 49 + .../bmc/auth/internal/AuthUtilsTest.java | 36 + .../oracle/bmc/http/client/pki/PemTest.java | 222 +++ .../oracle/bmc/http/client/pki/Utf8Test.java | 45 + .../PEMFileRSAPrivateKeySupplierTest.java | 204 ++- .../resources/pkcs1_decrypted_private_key.pem | 51 + .../resources/pkcs1_encrypted_private_key.pem | 53 + .../src/test/resources/pkcs1_private_key.pem | 27 + .../src/test/resources/pkcs1_public_key.pem | 13 + .../resources/pkcs8_encrypted_private_key.pem | 54 + bmc-common/src/test/resources/regions.json | 12 + bmc-common/src/test/resources/x509_cert.pem | 48 + .../src/test/resources/x509_public_key.pem | 14 + bmc-computecloudatcustomer/pom.xml | 4 +- bmc-computeinstanceagent/pom.xml | 4 +- bmc-containerengine/pom.xml | 4 +- bmc-containerinstances/pom.xml | 4 +- bmc-core/pom.xml | 6 +- .../java/com/oracle/bmc/core/Compute.java | 5 + .../com/oracle/bmc/core/ComputeAsync.java | 5 + .../com/oracle/bmc/core/VirtualNetwork.java | 10 +- .../oracle/bmc/core/VirtualNetworkAsync.java | 10 +- .../bmc/core/VirtualNetworkAsyncClient.java | 2 +- .../oracle/bmc/core/VirtualNetworkClient.java | 2 +- ...workSecurityGroupSecurityRulesDetails.java | 20 +- .../model/CreateServiceGatewayDetails.java | 12 +- .../bmc/core/model/CreateVcnDetails.java | 63 + .../bmc/core/model/CreateVnicDetails.java | 63 + .../com/oracle/bmc/core/model/Instance.java | 153 ++ ...nstanceConfigurationCreateVnicDetails.java | 63 + ...nceConfigurationLaunchInstanceDetails.java | 63 + .../bmc/core/model/LaunchInstanceDetails.java | 63 + .../oracle/bmc/core/model/ServiceGateway.java | 9 +- .../bmc/core/model/UpdateInstanceDetails.java | 63 + .../bmc/core/model/UpdateVcnDetails.java | 76 +- .../bmc/core/model/UpdateVnicDetails.java | 63 + .../java/com/oracle/bmc/core/model/Vcn.java | 63 + .../java/com/oracle/bmc/core/model/Vnic.java | 63 + .../oci-java-sdk-core/reflect-config.json | 6 + bmc-dashboardservice/pom.xml | 4 +- bmc-database/pom.xml | 6 +- .../database/model/AutonomousDatabase.java | 59 + .../model/AutonomousDatabaseSummary.java | 59 + .../model/CloudAutonomousVmCluster.java | 59 + .../CloudAutonomousVmClusterSummary.java | 59 + .../bmc/database/model/CloudVmCluster.java | 59 + .../database/model/CloudVmClusterSummary.java | 59 + .../model/CreateAutonomousDatabaseBase.java | 31 + .../CreateAutonomousDatabaseCloneDetails.java | 16 + .../CreateAutonomousDatabaseDetails.java | 16 + ...teAutonomousDatabaseFromBackupDetails.java | 16 + ...ousDatabaseFromBackupTimestampDetails.java | 16 + ...CreateCloudAutonomousVmClusterDetails.java | 65 +- .../model/CreateCloudVmClusterDetails.java | 59 + ...ionAutonomousDatabaseDataGuardDetails.java | 16 + ...ateCrossRegionDisasterRecoveryDetails.java | 16 + ...teCrossTenancyDisasterRecoveryDetails.java | 16 + ...uardAssociationWithNewDbSystemDetails.java | 60 + .../model/CreateExadbVmClusterDetails.java | 59 + ...eshableAutonomousDatabaseCloneDetails.java | 16 + .../oracle/bmc/database/model/DbSystem.java | 59 + .../bmc/database/model/DbSystemSummary.java | 59 + .../bmc/database/model/ExadbVmCluster.java | 59 + .../database/model/ExadbVmClusterSummary.java | 59 + .../database/model/LaunchDbSystemBase.java | 31 + .../database/model/LaunchDbSystemDetails.java | 16 + .../LaunchDbSystemFromBackupDetails.java | 16 + .../LaunchDbSystemFromDatabaseDetails.java | 16 + .../LaunchDbSystemFromDbSystemDetails.java | 16 + .../UndeleteAutonomousDatabaseDetails.java | 16 + .../UpdateAutonomousDatabaseDetails.java | 59 + ...UpdateCloudAutonomousVmClusterDetails.java | 65 +- .../model/UpdateCloudVmClusterDetails.java | 59 + .../database/model/UpdateDbSystemDetails.java | 59 + .../model/UpdateExadbVmClusterDetails.java | 59 + bmc-databasemanagement/pom.xml | 4 +- bmc-databasemigration/pom.xml | 4 +- bmc-databasetools/pom.xml | 4 +- bmc-datacatalog/pom.xml | 4 +- bmc-dataflow/pom.xml | 4 +- bmc-dataintegration/pom.xml | 4 +- bmc-datalabelingservice/pom.xml | 4 +- bmc-datalabelingservicedataplane/pom.xml | 4 +- bmc-datasafe/pom.xml | 4 +- bmc-datascience/pom.xml | 4 +- bmc-delegateaccesscontrol/pom.xml | 4 +- bmc-demandsignal/pom.xml | 4 +- bmc-desktops/pom.xml | 4 +- bmc-devops/pom.xml | 4 +- bmc-disasterrecovery/pom.xml | 4 +- bmc-dns/pom.xml | 6 +- bmc-dts/pom.xml | 4 +- bmc-email/pom.xml | 4 +- bmc-emaildataplane/pom.xml | 4 +- bmc-emwarehouse/pom.xml | 4 +- bmc-encryption/pom.xml | 10 +- bmc-enforcer-rules/pom.xml | 2 +- bmc-events/pom.xml | 4 +- bmc-examples/pom.xml | 14 +- ...va => AutonomousDataWarehouseExample.java} | 3 +- ...aseCrossRegionDisasterRecoveryExample.java | 212 +++ .../java/AutonomousDatabaseKMSExample.java | 147 ++ ...onomousDatabasePrivateEndpointExample.java | 149 ++ ...AutonomousDatabaseResourcePoolExample.java | 211 +++ .../AutonomousDatabaseSecretIdExample.java | 117 ++ bmc-filestorage/pom.xml | 4 +- bmc-fleetappsmanagement/pom.xml | 4 +- bmc-fleetsoftwareupdate/pom.xml | 4 +- bmc-full/pom.xml | 12 +- bmc-functions/pom.xml | 4 +- bmc-fusionapps/pom.xml | 4 +- bmc-generativeai/pom.xml | 4 +- bmc-generativeaiagent/pom.xml | 4 +- bmc-generativeaiagentruntime/pom.xml | 4 +- bmc-generativeaiinference/pom.xml | 4 +- bmc-genericartifactscontent/pom.xml | 4 +- bmc-globallydistributeddatabase/pom.xml | 4 +- bmc-goldengate/pom.xml | 4 +- bmc-governancerulescontrolplane/pom.xml | 4 +- bmc-healthchecks/pom.xml | 4 +- bmc-identity/pom.xml | 4 +- bmc-identitydataplane/pom.xml | 4 +- bmc-identitydomains/pom.xml | 4 +- bmc-integration/pom.xml | 4 +- .../bmc/integration/IntegrationInstance.java | 20 + .../integration/IntegrationInstanceAsync.java | 19 + .../IntegrationInstanceAsyncClient.java | 35 + .../IntegrationInstanceClient.java | 33 + .../CreateIntegrationInstanceDetails.java | 44 + ...CrossRegionIntegrationInstanceDetails.java | 289 ++++ .../model/DisasterRecoveryDetails.java | 261 ++++ .../model/IntegrationInstance.java | 116 ++ .../model/IntegrationInstanceSummary.java | 84 ++ .../bmc/integration/model/WorkRequest.java | 1 + .../integration/model/WorkRequestSummary.java | 1 + .../DisasterRecoveryFailoverRequest.java | 295 ++++ .../DisasterRecoveryFailoverResponse.java | 186 +++ .../reflect-config.json | 40 + bmc-jms/pom.xml | 4 +- bmc-jmsjavadownloads/pom.xml | 4 +- bmc-keymanagement/pom.xml | 4 +- bmc-licensemanager/pom.xml | 4 +- bmc-limits/pom.xml | 4 +- bmc-loadbalancer/pom.xml | 4 +- bmc-lockbox/pom.xml | 4 +- bmc-loganalytics/pom.xml | 4 +- bmc-logging/pom.xml | 4 +- bmc-loggingingestion/pom.xml | 4 +- bmc-loggingsearch/pom.xml | 4 +- bmc-managementagent/pom.xml | 4 +- bmc-managementdashboard/pom.xml | 4 +- bmc-marketplace/pom.xml | 4 +- bmc-marketplaceprivateoffer/pom.xml | 4 +- bmc-marketplacepublisher/pom.xml | 4 +- bmc-mediaservices/pom.xml | 4 +- bmc-monitoring/pom.xml | 4 +- bmc-mysql/pom.xml | 4 +- bmc-networkfirewall/pom.xml | 4 +- bmc-networkloadbalancer/pom.xml | 4 +- .../CreateNetworkLoadBalancerDetails.java | 69 +- .../model/NetworkLoadBalancer.java | 63 + .../model/NetworkLoadBalancerSummary.java | 63 + .../UpdateNetworkLoadBalancerDetails.java | 69 +- bmc-nosql/pom.xml | 4 +- .../bmc-objectstorage-combined/pom.xml | 6 +- .../bmc-objectstorage-extensions/pom.xml | 8 +- .../bmc-objectstorage-generated/pom.xml | 4 +- bmc-objectstorage/pom.xml | 2 +- bmc-oce/pom.xml | 4 +- bmc-ocicontrolcenter/pom.xml | 4 +- bmc-ocvp/pom.xml | 4 +- bmc-oda/pom.xml | 4 +- bmc-onesubscription/pom.xml | 4 +- bmc-ons/pom.xml | 4 +- bmc-opa/pom.xml | 4 +- bmc-opensearch/pom.xml | 4 +- bmc-operatoraccesscontrol/pom.xml | 4 +- bmc-opsi/pom.xml | 4 +- bmc-optimizer/pom.xml | 4 +- bmc-osmanagement/pom.xml | 4 +- bmc-osmanagementhub/pom.xml | 4 +- bmc-ospgateway/pom.xml | 4 +- bmc-osubbillingschedule/pom.xml | 4 +- bmc-osuborganizationsubscription/pom.xml | 4 +- bmc-osubsubscription/pom.xml | 4 +- bmc-osubusage/pom.xml | 4 +- .../bmc-jersey-examples/pom.xml | 8 +- .../bmc-jersey3-examples/pom.xml | 8 +- .../native-maven-example/pom.xml | 6 +- bmc-other-examples/pom.xml | 2 +- bmc-psql/pom.xml | 4 +- bmc-queue/pom.xml | 4 +- bmc-recovery/pom.xml | 4 +- bmc-redis/pom.xml | 4 +- bmc-resourcemanager/pom.xml | 4 +- bmc-resourcescheduler/pom.xml | 4 +- bmc-resourcesearch/pom.xml | 4 +- bmc-rover/pom.xml | 4 +- bmc-sch/pom.xml | 4 +- bmc-secrets/pom.xml | 4 +- bmc-securityattribute/pom.xml | 21 + .../securityattribute/SecurityAttribute.java | 522 +++++++ .../SecurityAttributeAsync.java | 516 +++++++ .../SecurityAttributeAsyncClient.java | 907 ++++++++++++ .../SecurityAttributeClient.java | 929 +++++++++++++ .../SecurityAttributePaginators.java | 702 ++++++++++ .../SecurityAttributeWaiters.java | 323 +++++ .../model/BaseSecurityAttributeValidator.java | 140 ++ .../BulkDeleteSecurityAttributesDetails.java | 139 ++ .../model/BulkEditResource.java | 225 +++ .../BulkEditSecurityAttributeDetails.java | 216 +++ ...EditSecurityAttributeOperationDetails.java | 273 ++++ ...yAttributeNamespaceCompartmentDetails.java | 138 ++ .../model/CreateSecurityAttributeDetails.java | 202 +++ ...eateSecurityAttributeNamespaceDetails.java | 342 +++++ .../DefaultSecurityAttributeValidator.java | 103 ++ .../model/EnumSecurityAttributeValidator.java | 138 ++ .../model/SecurityAttribute.java | 639 +++++++++ .../model/SecurityAttributeNamespace.java | 681 +++++++++ .../SecurityAttributeNamespaceSummary.java | 614 +++++++++ .../model/SecurityAttributeSummary.java | 543 ++++++++ .../model/SecurityAttributeWorkRequest.java | 475 +++++++ ...urityAttributeWorkRequestErrorSummary.java | 216 +++ ...ecurityAttributeWorkRequestLogSummary.java | 178 +++ .../SecurityAttributeWorkRequestSummary.java | 473 +++++++ .../securityattribute/model/SortOrder.java | 43 + .../model/UpdateSecurityAttributeDetails.java | 203 +++ ...dateSecurityAttributeNamespaceDetails.java | 300 ++++ .../model/WorkRequestOperationType.java | 55 + .../model/WorkRequestResource.java | 292 ++++ .../model/WorkRequestStatus.java | 58 + .../BulkDeleteSecurityAttributesRequest.java | 298 ++++ .../BulkEditSecurityAttributesRequest.java | 300 ++++ ...leteSecurityAttributeNamespaceRequest.java | 316 +++++ ...yAttributeNamespaceCompartmentRequest.java | 395 ++++++ ...eateSecurityAttributeNamespaceRequest.java | 305 ++++ .../CreateSecurityAttributeRequest.java | 340 +++++ ...leteSecurityAttributeNamespaceRequest.java | 314 +++++ .../DeleteSecurityAttributeRequest.java | 342 +++++ .../GetSecurityAttributeNamespaceRequest.java | 215 +++ .../requests/GetSecurityAttributeRequest.java | 245 ++++ ...etSecurityAttributeWorkRequestRequest.java | 211 +++ ...istSecurityAttributeNamespacesRequest.java | 528 +++++++ ...rityAttributeWorkRequestErrorsRequest.java | 270 ++++ ...curityAttributeWorkRequestLogsRequest.java | 269 ++++ ...tSecurityAttributeWorkRequestsRequest.java | 310 +++++ .../ListSecurityAttributesRequest.java | 312 +++++ ...dateSecurityAttributeNamespaceRequest.java | 383 +++++ .../UpdateSecurityAttributeRequest.java | 407 ++++++ .../BulkDeleteSecurityAttributesResponse.java | 186 +++ .../BulkEditSecurityAttributesResponse.java | 186 +++ ...eteSecurityAttributeNamespaceResponse.java | 188 +++ ...AttributeNamespaceCompartmentResponse.java | 140 ++ ...ateSecurityAttributeNamespaceResponse.java | 222 +++ .../CreateSecurityAttributeResponse.java | 212 +++ ...eteSecurityAttributeNamespaceResponse.java | 139 ++ .../DeleteSecurityAttributeResponse.java | 186 +++ ...GetSecurityAttributeNamespaceResponse.java | 221 +++ .../GetSecurityAttributeResponse.java | 211 +++ ...tSecurityAttributeWorkRequestResponse.java | 225 +++ ...stSecurityAttributeNamespacesResponse.java | 240 ++++ ...ityAttributeWorkRequestErrorsResponse.java | 280 ++++ ...urityAttributeWorkRequestLogsResponse.java | 278 ++++ ...SecurityAttributeWorkRequestsResponse.java | 244 ++++ .../ListSecurityAttributesResponse.java | 233 ++++ ...ateSecurityAttributeNamespaceResponse.java | 222 +++ .../UpdateSecurityAttributeResponse.java | 212 +++ .../reflect-config.json | 337 +++++ .../bmc/securityattribute/client.properties | 9 + bmc-servicecatalog/pom.xml | 4 +- bmc-servicemanagerproxy/pom.xml | 4 +- bmc-servicemesh/pom.xml | 4 +- bmc-shaded/bmc-shaded-full/pom.xml | 12 +- bmc-shaded/pom.xml | 2 +- bmc-stackmonitoring/pom.xml | 4 +- bmc-streaming/pom.xml | 4 +- bmc-tenantmanagercontrolplane/pom.xml | 4 +- bmc-threatintelligence/pom.xml | 4 +- bmc-usage/pom.xml | 4 +- bmc-usageapi/pom.xml | 4 +- bmc-vault/pom.xml | 6 +- bmc-vbsinst/pom.xml | 4 +- bmc-visualbuilder/pom.xml | 4 +- bmc-vnmonitoring/pom.xml | 4 +- bmc-vulnerabilityscanning/pom.xml | 4 +- bmc-waa/pom.xml | 4 +- bmc-waas/pom.xml | 4 +- bmc-waf/pom.xml | 4 +- bmc-workrequests/pom.xml | 4 +- bmc-zpr/pom.xml | 21 + .../src/main/java/com/oracle/bmc/zpr/Zpr.java | 335 +++++ .../java/com/oracle/bmc/zpr/ZprAsync.java | 315 +++++ .../com/oracle/bmc/zpr/ZprAsyncClient.java | 810 +++++++++++ .../java/com/oracle/bmc/zpr/ZprClient.java | 843 +++++++++++ .../com/oracle/bmc/zpr/ZprPaginators.java | 920 ++++++++++++ .../java/com/oracle/bmc/zpr/ZprWaiters.java | 230 +++ .../com/oracle/bmc/zpr/model/ActionType.java | 56 + .../oracle/bmc/zpr/model/Configuration.java | 691 ++++++++++ .../zpr/model/CreateConfigurationDetails.java | 300 ++++ .../bmc/zpr/model/CreateZprPolicyDetails.java | 404 ++++++ .../oracle/bmc/zpr/model/OperationType.java | 57 + .../com/oracle/bmc/zpr/model/SortOrder.java | 43 + .../bmc/zpr/model/UpdateZprPolicyDetails.java | 302 ++++ .../com/oracle/bmc/zpr/model/WorkRequest.java | 544 ++++++++ .../bmc/zpr/model/WorkRequestError.java | 219 +++ .../zpr/model/WorkRequestErrorCollection.java | 134 ++ .../bmc/zpr/model/WorkRequestLogEntry.java | 177 +++ .../model/WorkRequestLogEntryCollection.java | 133 ++ .../bmc/zpr/model/WorkRequestResource.java | 315 +++++ .../model/WorkRequestResourceMetadataKey.java | 52 + .../bmc/zpr/model/WorkRequestStatus.java | 59 + .../bmc/zpr/model/WorkRequestSummary.java | 543 ++++++++ .../model/WorkRequestSummaryCollection.java | 134 ++ .../com/oracle/bmc/zpr/model/ZprPolicy.java | 752 ++++++++++ .../bmc/zpr/model/ZprPolicyCollection.java | 134 ++ .../bmc/zpr/model/ZprPolicySummary.java | 695 ++++++++++ .../requests/CreateConfigurationRequest.java | 331 +++++ .../zpr/requests/CreateZprPolicyRequest.java | 328 +++++ .../zpr/requests/DeleteZprPolicyRequest.java | 300 ++++ .../zpr/requests/GetConfigurationRequest.java | 216 +++ ...GetZprConfigurationWorkRequestRequest.java | 219 +++ .../bmc/zpr/requests/GetZprPolicyRequest.java | 214 +++ .../GetZprPolicyWorkRequestRequest.java | 218 +++ ...ConfigurationWorkRequestErrorsRequest.java | 407 ++++++ ...prConfigurationWorkRequestLogsRequest.java | 407 ++++++ ...stZprConfigurationWorkRequestsRequest.java | 509 +++++++ .../zpr/requests/ListZprPoliciesRequest.java | 506 +++++++ ...ListZprPolicyWorkRequestErrorsRequest.java | 404 ++++++ .../ListZprPolicyWorkRequestLogsRequest.java | 403 ++++++ .../ListZprPolicyWorkRequestsRequest.java | 506 +++++++ .../zpr/requests/UpdateZprPolicyRequest.java | 410 ++++++ .../CreateConfigurationResponse.java | 185 +++ .../responses/CreateZprPolicyResponse.java | 298 ++++ .../responses/DeleteZprPolicyResponse.java | 185 +++ .../responses/GetConfigurationResponse.java | 210 +++ ...etZprConfigurationWorkRequestResponse.java | 250 ++++ .../zpr/responses/GetZprPolicyResponse.java | 208 +++ .../GetZprPolicyWorkRequestResponse.java | 250 ++++ ...onfigurationWorkRequestErrorsResponse.java | 234 ++++ ...rConfigurationWorkRequestLogsResponse.java | 237 ++++ ...tZprConfigurationWorkRequestsResponse.java | 234 ++++ .../responses/ListZprPoliciesResponse.java | 225 +++ ...istZprPolicyWorkRequestErrorsResponse.java | 232 ++++ .../ListZprPolicyWorkRequestLogsResponse.java | 235 ++++ .../ListZprPolicyWorkRequestsResponse.java | 233 ++++ .../responses/UpdateZprPolicyResponse.java | 185 +++ .../oci-java-sdk-zpr/reflect-config.json | 260 ++++ .../com/oracle/bmc/zpr/client.properties | 9 + pom.xml | 17 +- 425 files changed, 47231 insertions(+), 1620 deletions(-) delete mode 100644 bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java delete mode 100644 bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json delete mode 100644 bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java delete mode 100644 bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Eraser.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Hex.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyFactory.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyGenerator.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pem.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptedKeyException.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptionException.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemException.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pkcs1EncryptedPrivateKeyInfo.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Sensitive.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Text.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Utf8.java create mode 100644 bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/internal-README.md delete mode 100644 bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java create mode 100644 bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMStreamRSAPrivateKeySupplier.java create mode 100644 bmc-common/src/test/java/com/oracle/bmc/http/client/pki/PemTest.java create mode 100644 bmc-common/src/test/java/com/oracle/bmc/http/client/pki/Utf8Test.java create mode 100644 bmc-common/src/test/resources/pkcs1_decrypted_private_key.pem create mode 100644 bmc-common/src/test/resources/pkcs1_encrypted_private_key.pem create mode 100644 bmc-common/src/test/resources/pkcs1_private_key.pem create mode 100644 bmc-common/src/test/resources/pkcs1_public_key.pem create mode 100644 bmc-common/src/test/resources/pkcs8_encrypted_private_key.pem create mode 100644 bmc-common/src/test/resources/x509_cert.pem create mode 100644 bmc-common/src/test/resources/x509_public_key.pem rename bmc-examples/src/main/java/{AutonomousDatawarehouseExample.java => AutonomousDataWarehouseExample.java} (99%) create mode 100644 bmc-examples/src/main/java/AutonomousDatabaseCrossRegionDisasterRecoveryExample.java create mode 100644 bmc-examples/src/main/java/AutonomousDatabaseKMSExample.java create mode 100644 bmc-examples/src/main/java/AutonomousDatabasePrivateEndpointExample.java create mode 100644 bmc-examples/src/main/java/AutonomousDatabaseResourcePoolExample.java create mode 100644 bmc-examples/src/main/java/AutonomousDatabaseSecretIdExample.java create mode 100644 bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java create mode 100644 bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java create mode 100644 bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java create mode 100644 bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java create mode 100644 bmc-securityattribute/pom.xml create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java create mode 100644 bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java create mode 100644 bmc-securityattribute/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-securityattribute/reflect-config.json create mode 100644 bmc-securityattribute/src/main/resources/com/oracle/bmc/securityattribute/client.properties create mode 100644 bmc-zpr/pom.xml create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java create mode 100644 bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java create mode 100644 bmc-zpr/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-zpr/reflect-config.json create mode 100644 bmc-zpr/src/main/resources/com/oracle/bmc/zpr/client.properties diff --git a/CHANGELOG.md b/CHANGELOG.md index d5fa20d1f9d..37e5e7e4225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). +## 3.50.1 - 2024-10-01 +### Added +- Support for calling Oracle Cloud Infrastructure services in the `us-somerset-1` region +- Support for calling Oracle Cloud Infrastructure services in the `us-thames-1` region +- Support for Security Attribute service +- Support for Zero Trust Packet Routing service +- Support for zero trust packet routing security attributes in the Database service +- Support for zero trust packet routing security attributes in the Networking service +- Support for zero trust packet routing security attributes in the Network Load Balancer service +- Support for disaster recovery failover in the Integration Cloud service + ## 3.50.0 - 2024-09-24 ### Added - Support for Generative AI Agent service diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 6d2894e02dc..788cbcb9ae0 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -18,12 +18,6 @@ ======================== Third Party Components ======================== -bouncycastle -* Copyright © 2000-2021 The Legion of the Bouncy Castle Inc. -* License: MIT License -* Source code: https://github.com/bcgit/bc-java -* Project home: https://bouncycastle.org - commons-codec * Copyright © 2002-2021 The Apache Software Foundation * License: Apache License 2.0 @@ -208,14 +202,6 @@ org.apache.httpcomponents:httpclient * Copyright © 2005–2021 The Apache Software Foundation. All rights reserved. * License: Apache License 2.0 -org.bouncycastle:bcpkix-jdk15to18 -* Copyright © 2000-2021 The Legion of the Bouncy Castle Inc -* License: MIT License - -org.bouncycastle:bcprov-jdk15to18 -* Copyright © 2000-2021 The Legion of the Bouncy Castle Inc -* License: MIT License - org.glassfish.hk2:hk2-api * Copyright © 2012, 2018 Oracle and/or its affiliates. All rights reserved. * Licenses: Eclipse Public License 2.0 diff --git a/bmc-accessgovernancecp/pom.xml b/bmc-accessgovernancecp/pom.xml index e80e1cfbf34..aedfba9adca 100644 --- a/bmc-accessgovernancecp/pom.xml +++ b/bmc-accessgovernancecp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-accessgovernancecp @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-addons/bmc-aispeech-realtime/pom.xml b/bmc-addons/bmc-aispeech-realtime/pom.xml index c836bb689da..7b1715f899c 100644 --- a/bmc-addons/bmc-aispeech-realtime/pom.xml +++ b/bmc-addons/bmc-aispeech-realtime/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 3.50.0 + 3.50.1 ../pom.xml 4.0.0 @@ -53,12 +53,12 @@ com.oracle.oci.sdk oci-java-sdk-aispeech - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 compile diff --git a/bmc-addons/bmc-apache-configurator-jersey-addon/pom.xml b/bmc-addons/bmc-apache-configurator-jersey-addon/pom.xml index e8bade771a4..094dcc5583e 100644 --- a/bmc-addons/bmc-apache-configurator-jersey-addon/pom.xml +++ b/bmc-addons/bmc-apache-configurator-jersey-addon/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 3.50.0 + 3.50.1 ../pom.xml @@ -17,14 +17,14 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 pom import diff --git a/bmc-addons/bmc-apache-configurator-jersey3-addon/pom.xml b/bmc-addons/bmc-apache-configurator-jersey3-addon/pom.xml index 5e805a93efb..7e818b6639b 100644 --- a/bmc-addons/bmc-apache-configurator-jersey3-addon/pom.xml +++ b/bmc-addons/bmc-apache-configurator-jersey3-addon/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 3.50.0 + 3.50.1 ../pom.xml @@ -17,14 +17,14 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey3 - 3.50.0 + 3.50.1 pom import diff --git a/bmc-addons/bmc-apache-connector-provider/pom.xml b/bmc-addons/bmc-apache-connector-provider/pom.xml index 8578ffe5b3a..90ba81fbfe7 100644 --- a/bmc-addons/bmc-apache-connector-provider/pom.xml +++ b/bmc-addons/bmc-apache-connector-provider/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-addons/bmc-oke-workload-identity/pom.xml b/bmc-addons/bmc-oke-workload-identity/pom.xml index d5ecaff5f95..87b43c4fe67 100644 --- a/bmc-addons/bmc-oke-workload-identity/pom.xml +++ b/bmc-addons/bmc-oke-workload-identity/pom.xml @@ -4,7 +4,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 3.50.0 + 3.50.1 4.0.0 @@ -38,25 +38,25 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 compile com.oracle.oci.sdk oci-java-sdk-core - 3.50.0 + 3.50.1 test com.oracle.oci.sdk oci-java-sdk-identity - 3.50.0 + 3.50.1 test com.oracle.oci.sdk oci-java-sdk-keymanagement - 3.50.0 + 3.50.1 test diff --git a/bmc-addons/bmc-resteasy-client-configurator/pom.xml b/bmc-addons/bmc-resteasy-client-configurator/pom.xml index b663f038abf..41b6c1be290 100644 --- a/bmc-addons/bmc-resteasy-client-configurator/pom.xml +++ b/bmc-addons/bmc-resteasy-client-configurator/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 3.50.0 + 3.50.1 ../pom.xml @@ -23,7 +23,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-addons/bmc-sasl-oke-workload-identity/pom.xml b/bmc-addons/bmc-sasl-oke-workload-identity/pom.xml index da82f500fd9..5bf384bfec8 100644 --- a/bmc-addons/bmc-sasl-oke-workload-identity/pom.xml +++ b/bmc-addons/bmc-sasl-oke-workload-identity/pom.xml @@ -4,7 +4,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 3.50.0 + 3.50.1 ../pom.xml 4.0.0 @@ -39,13 +39,13 @@ com.oracle.oci.sdk oci-java-sdk-addons-sasl - 3.50.0 + 3.50.1 compile com.oracle.oci.sdk oci-java-sdk-addons-oke-workload-identity - 3.50.0 + 3.50.1 compile diff --git a/bmc-addons/bmc-sasl/pom.xml b/bmc-addons/bmc-sasl/pom.xml index 9f8dea34662..7be4a0648ae 100644 --- a/bmc-addons/bmc-sasl/pom.xml +++ b/bmc-addons/bmc-sasl/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-addons - 3.50.0 + 3.50.1 ../pom.xml @@ -60,7 +60,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-addons/bmc-sse-support-jersey3/pom.xml b/bmc-addons/bmc-sse-support-jersey3/pom.xml index 6d611617966..5714db4abe7 100644 --- a/bmc-addons/bmc-sse-support-jersey3/pom.xml +++ b/bmc-addons/bmc-sse-support-jersey3/pom.xml @@ -5,7 +5,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 3.50.0 + 3.50.1 ../pom.xml 4.0.0 @@ -150,12 +150,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-generativeaiinference - 3.50.0 + 3.50.1 test @@ -164,7 +164,7 @@ but the code in it needs it. --> com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey3 - 3.50.0 + 3.50.1 diff --git a/bmc-addons/bmc-sse-support/pom.xml b/bmc-addons/bmc-sse-support/pom.xml index 2a445cc8091..ae2f8cfd109 100644 --- a/bmc-addons/bmc-sse-support/pom.xml +++ b/bmc-addons/bmc-sse-support/pom.xml @@ -5,7 +5,7 @@ oci-java-sdk-addons com.oracle.oci.sdk - 3.50.0 + 3.50.1 ../pom.xml 4.0.0 @@ -150,12 +150,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-generativeaiinference - 3.50.0 + 3.50.1 test @@ -164,7 +164,7 @@ but the code in it needs it. --> com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 diff --git a/bmc-addons/pom.xml b/bmc-addons/pom.xml index 8d0e2a09ba4..514f776b920 100644 --- a/bmc-addons/pom.xml +++ b/bmc-addons/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml diff --git a/bmc-adm/pom.xml b/bmc-adm/pom.xml index 84ae5fc25c6..1456ea6b5f7 100644 --- a/bmc-adm/pom.xml +++ b/bmc-adm/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-adm @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-aianomalydetection/pom.xml b/bmc-aianomalydetection/pom.xml index fb7eaed2a53..95ee6fd9a24 100644 --- a/bmc-aianomalydetection/pom.xml +++ b/bmc-aianomalydetection/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-aianomalydetection @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-aidocument/pom.xml b/bmc-aidocument/pom.xml index 4822b97da43..f9454190b07 100644 --- a/bmc-aidocument/pom.xml +++ b/bmc-aidocument/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-aidocument @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-ailanguage/pom.xml b/bmc-ailanguage/pom.xml index 77655e3cdec..966a28c52d2 100644 --- a/bmc-ailanguage/pom.xml +++ b/bmc-ailanguage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-ailanguage @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-aispeech/pom.xml b/bmc-aispeech/pom.xml index efd4f0156fe..89654ff50fc 100644 --- a/bmc-aispeech/pom.xml +++ b/bmc-aispeech/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-aispeech @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-aivision/pom.xml b/bmc-aivision/pom.xml index 5e270128843..d9c7236dcb4 100644 --- a/bmc-aivision/pom.xml +++ b/bmc-aivision/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-aivision @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-analytics/pom.xml b/bmc-analytics/pom.xml index 94f484bc27c..d9daed88b7d 100644 --- a/bmc-analytics/pom.xml +++ b/bmc-analytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-analytics @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-announcementsservice/pom.xml b/bmc-announcementsservice/pom.xml index c6f2698c0be..056be163932 100644 --- a/bmc-announcementsservice/pom.xml +++ b/bmc-announcementsservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-announcementsservice @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-apigateway/pom.xml b/bmc-apigateway/pom.xml index 4139ba42a9c..aa99c3bf0b1 100644 --- a/bmc-apigateway/pom.xml +++ b/bmc-apigateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-apigateway @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-apmconfig/pom.xml b/bmc-apmconfig/pom.xml index c3d0bf8252d..2be162ffb09 100644 --- a/bmc-apmconfig/pom.xml +++ b/bmc-apmconfig/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-apmconfig @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-apmcontrolplane/pom.xml b/bmc-apmcontrolplane/pom.xml index 463fb46edf6..b4a5c29d119 100644 --- a/bmc-apmcontrolplane/pom.xml +++ b/bmc-apmcontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-apmcontrolplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-apmsynthetics/pom.xml b/bmc-apmsynthetics/pom.xml index 1cf931599ed..fd2a6dab27e 100644 --- a/bmc-apmsynthetics/pom.xml +++ b/bmc-apmsynthetics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-apmsynthetics @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-apmtraces/pom.xml b/bmc-apmtraces/pom.xml index 974a7a7dffd..3e11a07f4dc 100644 --- a/bmc-apmtraces/pom.xml +++ b/bmc-apmtraces/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-apmtraces @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-appmgmtcontrol/pom.xml b/bmc-appmgmtcontrol/pom.xml index 81c31aa761f..854473adcb2 100644 --- a/bmc-appmgmtcontrol/pom.xml +++ b/bmc-appmgmtcontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-appmgmtcontrol @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-artifacts/pom.xml b/bmc-artifacts/pom.xml index 56601e2f3a4..a4f29f38aa8 100644 --- a/bmc-artifacts/pom.xml +++ b/bmc-artifacts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-artifacts @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-audit/pom.xml b/bmc-audit/pom.xml index ceac2b83126..f4cd4bbd53e 100644 --- a/bmc-audit/pom.xml +++ b/bmc-audit/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-autoscaling/pom.xml b/bmc-autoscaling/pom.xml index d62e1c1bc73..55a18c122bb 100644 --- a/bmc-autoscaling/pom.xml +++ b/bmc-autoscaling/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-autoscaling @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-bastion/pom.xml b/bmc-bastion/pom.xml index 05acf0488b7..d6d9c12e490 100644 --- a/bmc-bastion/pom.xml +++ b/bmc-bastion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-bastion @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-bds/pom.xml b/bmc-bds/pom.xml index 414e45e57d0..029e8aa735a 100644 --- a/bmc-bds/pom.xml +++ b/bmc-bds/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-bds @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-blockchain/pom.xml b/bmc-blockchain/pom.xml index 83ec4f02737..7d18395af82 100644 --- a/bmc-blockchain/pom.xml +++ b/bmc-blockchain/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-blockchain @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-bom/pom.xml b/bmc-bom/pom.xml index 3cefa987754..ebe47e35cd1 100644 --- a/bmc-bom/pom.xml +++ b/bmc-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk - 3.50.0 + 3.50.1 oci-java-sdk-bom pom Oracle Cloud Infrastructure SDK - BOM @@ -38,962 +38,974 @@ com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-common-httpclient - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey3 - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-shaded-full - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-audit - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-containerengine - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-core - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-database - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-dns - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-email - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-filestorage - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-identity - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-loadbalancer - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-objectstorage - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-addons-apache-configurator-jersey - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-addons-apache-configurator-jersey3 - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-addons-resteasy-client-configurator - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-addons-sasl - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-addons-oke-workload-identity - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-addons-sasl-oke-workload-identity - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-addons-aispeech-realtime - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-resourcesearch - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-addons-apache - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-keymanagement - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-announcementsservice - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-healthchecks - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-waas - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-streaming - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-resourcemanager - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-monitoring - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-ons - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-autoscaling - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-budget - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-workrequests - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-limits - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-functions - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-events - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-dts - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-oce - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-oda - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-analytics - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-integration - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-osmanagement - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-marketplace - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-apigateway - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-datacatalog - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-dataflow - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-datascience - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-nosql - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-secrets - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-vault - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-bds - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-encryption - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-cims - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-datasafe - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-mysql - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-dataintegration - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-ocvp - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-usageapi - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-blockchain - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-loggingingestion - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-logging - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-loganalytics - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-managementdashboard - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-sch - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-loggingsearch - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-managementagent - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-cloudguard - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-opsi - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-computeinstanceagent - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-optimizer - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-tenantmanagercontrolplane - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-rover - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-databasemanagement - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-artifacts - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-apmsynthetics - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-goldengate - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-apmcontrolplane - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-apmtraces - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-networkloadbalancer - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-vulnerabilityscanning - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-databasemigration - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-servicecatalog - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-ailanguage - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-operatoraccesscontrol - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-bastion - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-genericartifactscontent - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-jms - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-devops - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-aianomalydetection - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-datalabelingservice - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-datalabelingservicedataplane - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-apmconfig - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-waf - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-certificates - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-certificatesmanagement - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-usage - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-databasetools - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-servicemanagerproxy - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-appmgmtcontrol - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-ospgateway - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-identitydataplane - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-visualbuilder - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-osubusage - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-osubsubscription - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-osuborganizationsubscription - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-osubbillingschedule - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-dashboardservice - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-threatintelligence - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-aivision - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-aispeech - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-stackmonitoring - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-servicemesh - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-adm - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-licensemanager - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-onesubscription - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-governancerulescontrolplane - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-waa - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-networkfirewall - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-vnmonitoring - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-emwarehouse - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-lockbox - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-fusionapps - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-mediaservices - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-opa - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-opensearch - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-cloudmigrations - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-cloudbridge - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-disasterrecovery - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-containerinstances - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-aidocument - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-queue - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-recovery - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-vbsinst - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-identitydomains - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-accessgovernancecp - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-ocicontrolcenter - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-osmanagementhub - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-fleetsoftwareupdate - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-computecloudatcustomer - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-marketplacepublisher - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-redis - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-jmsjavadownloads - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-psql - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-generativeai - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-generativeaiinference - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-capacitymanagement - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-globallydistributeddatabase - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-desktops - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-emaildataplane - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-clusterplacementgroups - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-marketplaceprivateoffer - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-resourcescheduler - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-demandsignal - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-fleetappsmanagement - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-delegateaccesscontrol - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-generativeaiagent - 3.50.0 + 3.50.1 false com.oracle.oci.sdk oci-java-sdk-generativeaiagentruntime - 3.50.0 + 3.50.1 + false + + + com.oracle.oci.sdk + oci-java-sdk-securityattribute + 3.50.1 + false + + + com.oracle.oci.sdk + oci-java-sdk-zpr + 3.50.1 false diff --git a/bmc-budget/pom.xml b/bmc-budget/pom.xml index 50892fc59da..e62587f595f 100644 --- a/bmc-budget/pom.xml +++ b/bmc-budget/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-budget @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-capacitymanagement/pom.xml b/bmc-capacitymanagement/pom.xml index 7ebe95c7a5d..c110f7e18f1 100644 --- a/bmc-capacitymanagement/pom.xml +++ b/bmc-capacitymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-capacitymanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-certificates/pom.xml b/bmc-certificates/pom.xml index 110c5162720..91744bf51e1 100644 --- a/bmc-certificates/pom.xml +++ b/bmc-certificates/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-certificates @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-certificatesmanagement/pom.xml b/bmc-certificatesmanagement/pom.xml index 1af82ffbf0d..3cd826b9177 100644 --- a/bmc-certificatesmanagement/pom.xml +++ b/bmc-certificatesmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-certificatesmanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-cims/pom.xml b/bmc-cims/pom.xml index 283575b1e2d..71eef176d4e 100644 --- a/bmc-cims/pom.xml +++ b/bmc-cims/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-cims @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-circuitbreaker/pom.xml b/bmc-circuitbreaker/pom.xml index a187a0ad6ed..58dc8d2213c 100644 --- a/bmc-circuitbreaker/pom.xml +++ b/bmc-circuitbreaker/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-circuitbreaker diff --git a/bmc-cloudbridge/pom.xml b/bmc-cloudbridge/pom.xml index 90f6b227c35..060b2048fd5 100644 --- a/bmc-cloudbridge/pom.xml +++ b/bmc-cloudbridge/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-cloudbridge @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-cloudguard/pom.xml b/bmc-cloudguard/pom.xml index 285555f5fbd..d18f193ee67 100644 --- a/bmc-cloudguard/pom.xml +++ b/bmc-cloudguard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-cloudguard @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-cloudmigrations/pom.xml b/bmc-cloudmigrations/pom.xml index eec4571ddd6..b9b9548dadc 100644 --- a/bmc-cloudmigrations/pom.xml +++ b/bmc-cloudmigrations/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-cloudmigrations @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-clusterplacementgroups/pom.xml b/bmc-clusterplacementgroups/pom.xml index e35138bf3e9..5abc3fdcdfb 100644 --- a/bmc-clusterplacementgroups/pom.xml +++ b/bmc-clusterplacementgroups/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-clusterplacementgroups @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/pom.xml b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/pom.xml index 19fc7759a39..275f31d961a 100644 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/pom.xml +++ b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-common-httpclient-choices - 3.50.0 + 3.50.1 ../pom.xml @@ -68,7 +68,7 @@ com.oracle.oci.sdk oci-java-sdk-addons-apache-configurator-jersey - 3.50.0 + 3.50.1 @@ -77,7 +77,7 @@ com.oracle.oci.sdk oci-java-sdk-common-httpclient - 3.50.0 + 3.50.1 org.glassfish.jersey.core @@ -119,11 +119,6 @@ ${graalvm.version} provided - - org.bouncycastle - bcprov-jdk15to18 - provided - org.glassfish.jersey.connectors diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java deleted file mode 100644 index a129f334424..00000000000 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.graalvm; - -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.graalvm.nativeimage.hosted.Feature; -import org.graalvm.nativeimage.hosted.RuntimeClassInitialization; - -import java.security.Security; - -/** Configures bouncy castle. */ -final class BouncyCastleFeature implements Feature { - - @Override - public void afterRegistration(AfterRegistrationAccess access) { - RuntimeClassInitialization.initializeAtBuildTime("org.bouncycastle"); - Security.addProvider(new BouncyCastleProvider()); - } -} diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json deleted file mode 100644 index 4a50c3d7d55..00000000000 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json +++ /dev/null @@ -1,366 +0,0 @@ -[ - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.DSTU4145$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.ECGOST$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.ElGamal$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.GM$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.GOST$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.IES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.RSA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.X509$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Blake2b$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.DSTU7564$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Keccak$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.MD2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.MD4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.MD5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD160$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD320$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA224$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA384$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA512$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SM3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Skein$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Tiger$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Whirlpool$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.drbg.DRBG$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.keystore.BC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.keystore.BCFKS$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.keystore.PKCS12$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.AES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.ARC4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.ARIA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Blowfish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.CAST5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.CAST6$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Camellia$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.ChaCha$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.DES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.DSTU7624$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.GOST28147$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.GOST3412_2015$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Grain128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Grainv1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.HC128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.HC256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Noekeon$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.OpenSSLPBKDF$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Poly1305$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.RC5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.RC6$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Rijndael$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SCRYPT$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SEED$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SM4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Salsa20$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Serpent$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Shacal2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SipHash$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Skipjack$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.TEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.TLSKDF$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Threefish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Twofish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.VMPC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.VMPCKSA3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.XSalsa20$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jce.provider.BouncyCastleProvider", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.ec.SunEC", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.jgss.SunProvider", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.NativePRNG", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.PolicyFile", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.SHA", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.SHA2$SHA256", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.SecureRandom", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.Sun", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.smartcardio.SunPCSC", - "methods":[{"name":"","parameterTypes":[] }] - } -] \ No newline at end of file diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey/native-image.properties b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey/native-image.properties index 30ee4692008..22f77f65bb8 100644 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey/native-image.properties +++ b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey/native-image.properties @@ -3,6 +3,4 @@ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. # -Args = -H:ClassInitialization=org.bouncycastle.jcajce.provider.drbg.DRBG$Default:rerun,org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV:rerun \ - --features=com.oracle.bmc.graalvm.BouncyCastleFeature \ - --initialize-at-build-time=org.slf4j.simple.SimpleLogger,org.slf4j.LoggerFactory,org.slf4j.helpers.NOPLoggerFactory,org.slf4j.helpers.SubstituteLoggerFactory \ No newline at end of file +# Future configuration \ No newline at end of file diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/pom.xml b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/pom.xml index 63e9203b6cd..a07f7e0a690 100644 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/pom.xml +++ b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-common-httpclient-choices - 3.50.0 + 3.50.1 ../pom.xml @@ -70,7 +70,7 @@ com.oracle.oci.sdk oci-java-sdk-addons-apache-configurator-jersey3 - 3.50.0 + 3.50.1 @@ -79,7 +79,7 @@ com.oracle.oci.sdk oci-java-sdk-common-httpclient - 3.50.0 + 3.50.1 jakarta.ws.rs @@ -119,11 +119,6 @@ ${graalvm.version} provided - - org.bouncycastle - bcprov-jdk15to18 - provided - org.glassfish.jersey.connectors diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java deleted file mode 100644 index a129f334424..00000000000 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/java/com/oracle/bmc/graalvm/BouncyCastleFeature.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.graalvm; - -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.graalvm.nativeimage.hosted.Feature; -import org.graalvm.nativeimage.hosted.RuntimeClassInitialization; - -import java.security.Security; - -/** Configures bouncy castle. */ -final class BouncyCastleFeature implements Feature { - - @Override - public void afterRegistration(AfterRegistrationAccess access) { - RuntimeClassInitialization.initializeAtBuildTime("org.bouncycastle"); - Security.addProvider(new BouncyCastleProvider()); - } -} diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json deleted file mode 100644 index 4a50c3d7d55..00000000000 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/bcprov-jdk15to18/reflect-config.json +++ /dev/null @@ -1,366 +0,0 @@ -[ - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.DH$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.DSA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.DSTU4145$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.EC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.ECGOST$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.ElGamal$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.GM$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.GOST$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.IES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.RSA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.asymmetric.X509$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Blake2b$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Blake2s$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.DSTU7564$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.GOST3411$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Keccak$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.MD2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.MD4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.MD5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD160$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.RIPEMD320$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA224$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA384$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SHA512$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.SM3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Skein$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Tiger$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.digest.Whirlpool$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.drbg.DRBG$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.keystore.BC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.keystore.BCFKS$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.keystore.PKCS12$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.AES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.ARC4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.ARIA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Blowfish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.CAST5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.CAST6$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Camellia$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.ChaCha$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.DES$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.DESede$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.DSTU7624$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.GOST28147$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.GOST3412_2015$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Grain128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Grainv1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.HC128$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.HC256$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Noekeon$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.OpenSSLPBKDF$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF1$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPBKDF2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.PBEPKCS12$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Poly1305$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.RC2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.RC5$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.RC6$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Rijndael$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SCRYPT$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SEED$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SM4$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Salsa20$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Serpent$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Shacal2$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.SipHash$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Skipjack$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.TEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.TLSKDF$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Threefish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.Twofish$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.VMPC$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.VMPCKSA3$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.XSalsa20$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jcajce.provider.symmetric.XTEA$Mappings", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"org.bouncycastle.jce.provider.BouncyCastleProvider", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.ec.SunEC", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.jgss.SunProvider", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.NativePRNG", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.PolicyFile", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.SHA", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.SHA2$SHA256", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.SecureRandom", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.provider.Sun", - "methods":[{"name":"","parameterTypes":[] }] - }, - { - "name":"sun.security.smartcardio.SunPCSC", - "methods":[{"name":"","parameterTypes":[] }] - } -] \ No newline at end of file diff --git a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey3/native-image.properties b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey3/native-image.properties index 30ee4692008..5b3d21061f3 100644 --- a/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey3/native-image.properties +++ b/bmc-common-httpclient-choices/bmc-common-httpclient-jersey3/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-common-httpclient-jersey3/native-image.properties @@ -3,6 +3,4 @@ # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. # -Args = -H:ClassInitialization=org.bouncycastle.jcajce.provider.drbg.DRBG$Default:rerun,org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV:rerun \ - --features=com.oracle.bmc.graalvm.BouncyCastleFeature \ - --initialize-at-build-time=org.slf4j.simple.SimpleLogger,org.slf4j.LoggerFactory,org.slf4j.helpers.NOPLoggerFactory,org.slf4j.helpers.SubstituteLoggerFactory \ No newline at end of file +# Future Configuration \ No newline at end of file diff --git a/bmc-common-httpclient-choices/pom.xml b/bmc-common-httpclient-choices/pom.xml index 276347c5099..3fad9e9b967 100644 --- a/bmc-common-httpclient-choices/pom.xml +++ b/bmc-common-httpclient-choices/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml diff --git a/bmc-common-httpclient/pom.xml b/bmc-common-httpclient/pom.xml index 21ef1f261dd..4fc1244ba94 100644 --- a/bmc-common-httpclient/pom.xml +++ b/bmc-common-httpclient/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -50,7 +50,6 @@ org.slf4j slf4j-api - \ No newline at end of file diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Eraser.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Eraser.java new file mode 100644 index 00000000000..e1752923745 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Eraser.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import java.nio.ByteBuffer; + +/** Services for erasing the contents of mutable data structures such as arrays */ +class Eraser { + + public static void erase(ByteBuffer byteBuffer) { + if (byteBuffer != null) { + if (byteBuffer.hasArray()) { + erase(byteBuffer.array()); + } else { + eraseDirectBuffer(byteBuffer); + } + } + } + + private static void eraseDirectBuffer(ByteBuffer byteBuffer) { + byteBuffer.clear(); + int length = byteBuffer.capacity(); + for (int i = 0; i < length; i++) { + byteBuffer.put(i, (byte) 0); + } + } + + public static void erase(byte[] bytes) { + if (bytes != null) { + final int length = bytes.length; + /* zero out first character */ + if (length > 0) { + bytes[0] = 0; + } + /* copy zeroed byte to all other bytes in buf, faster than naive iteration + * over each element in the array. + * Duplicates bytes in 2, 4, 8, etc increments + */ + for (int pos = 1; pos < length; pos += pos) { + System.arraycopy(bytes, 0, bytes, pos, Math.min(length - pos, pos)); + } + } + } + + public static void erase(char[] chars) { + if (chars != null) { + final int length = chars.length; + /* zero out first character */ + if (length > 0) { + chars[0] = 0; + } + /* copy zeroed byte to all other bytes in buf, faster than naive iteration + * over each element in the array. + * Duplicates bytes in 2, 4, 8, etc increments + */ + for (int pos = 1; pos < length; pos += pos) { + System.arraycopy(chars, 0, chars, pos, Math.min(length - pos, pos)); + } + } + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Hex.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Hex.java new file mode 100644 index 00000000000..bc91766878a --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Hex.java @@ -0,0 +1,32 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +abstract class Hex { + private Hex() {} + + private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray(); + + static String encode(byte[] bytes) { + char[] hexChars = new char[bytes.length * 2]; + for (int j = 0; j < bytes.length; j++) { + int v = bytes[j] & 0xFF; + hexChars[j * 2] = HEX_ARRAY[v >>> 4]; + hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F]; + } + return new String(hexChars); + } + + static byte[] decode(final CharSequence hex) { + final int length = hex.length(); + byte[] bytes = new byte[length / 2]; + for (int i = 0; i < length; ++i) { + final int highNibble = Character.digit(hex.charAt(i), 16) << 4; + final int lowNibble = Character.digit(hex.charAt(++i), 16); + bytes[i / 2] = (byte) (highNibble + lowNibble); + } + return bytes; + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyFactory.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyFactory.java new file mode 100644 index 00000000000..8a311ba74c2 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyFactory.java @@ -0,0 +1,44 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import javax.crypto.spec.PBEKeySpec; +import javax.crypto.spec.SecretKeySpec; +import java.security.Key; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; + +/** Generates the derived key for OpenSSL style encryption for PKCS1 encoded private keys */ +class OpenSslPbeSecretKeyFactory { + private final MessageDigest digest; + + OpenSslPbeSecretKeyFactory() { + this(digest("MD5")); + } + + OpenSslPbeSecretKeyFactory(final MessageDigest digest) { + this.digest = digest; + } + + private static MessageDigest digest(final String algorithmName) { + try { + return MessageDigest.getInstance(algorithmName); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException(e); + } + } + + Key generateSecret(final PBEKeySpec pbeSpec) throws InvalidKeySpecException { + OpenSslPbeSecretKeyGenerator generator = + OpenSslPbeSecretKeyGenerator.builder() + .password(pbeSpec.getPassword()) + .salt(pbeSpec.getSalt()) + .keyLength(pbeSpec.getKeyLength()) + .build(); + final byte[] keyBytes = generator.generate(); + return new SecretKeySpec(keyBytes, "OpenSSLPBKDF"); + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyGenerator.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyGenerator.java new file mode 100644 index 00000000000..d0499f07e39 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/OpenSslPbeSecretKeyGenerator.java @@ -0,0 +1,124 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Arrays; + +/** + * Derives the secret key used for OpenSSL style encryption. + * + *
    + *
  • By default the message digest algorithm used is MD5 :( + *
  • The iteration count is 1 + *
  • A digest of the password and a random 8 byte salt is produced + *
  • The digest is repeatedly generated until sufficient bytes have been generated for the + * specified key size + *
+ * + * @see EVP_BytesToKey + * source code + */ +class OpenSslPbeSecretKeyGenerator { + + private final MessageDigest digest; + private final byte[] password; + private final byte[] salt; + + private final int keyLength; + + private OpenSslPbeSecretKeyGenerator(Builder builder) { + digest = builder.digest; + password = builder.password; + salt = builder.salt; + keyLength = builder.keyLength; + } + + private static byte[] toBytes(char[] chars) { + CharBuffer charBuffer = CharBuffer.wrap(chars); + ByteBuffer byteBuffer = StandardCharsets.UTF_8.encode(charBuffer); + byte[] bytes = + Arrays.copyOfRange(byteBuffer.array(), byteBuffer.position(), byteBuffer.limit()); + Eraser.erase(byteBuffer); // clear sensitive data + return bytes; + } + + static Builder builder() { + return new Builder(); + } + + byte[] generate() { + int bytesNeeded = keyLength / 8; + byte[] key = new byte[bytesNeeded]; + int offset = 0; + + for (; ; ) { + digest.update(password, 0, password.length); + digest.update(salt, 0, salt.length); + + final byte[] digested = digest.digest(); + + int len = (bytesNeeded > digested.length) ? digested.length : bytesNeeded; + System.arraycopy(digested, 0, key, offset, len); + offset += len; + + // check if we need any more + bytesNeeded -= len; + if (bytesNeeded == 0) { + break; + } + + // do another round + digest.reset(); + } + + return key; + } + + static final class Builder { + private MessageDigest digest; + private byte[] password; + private byte[] salt; + private int keyLength; + + private Builder() { + try { + this.digest = MessageDigest.getInstance("MD5"); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException(e); + } + } + + Builder digest(MessageDigest digest) { + this.digest = digest; + return this; + } + + Builder password(char[] password) { + this.password = toBytes(password); + return this; + } + + Builder salt(byte[] salt) { + this.salt = salt; + return this; + } + + Builder keyLength(int keyLength) { + this.keyLength = keyLength; + return this; + } + + OpenSslPbeSecretKeyGenerator build() { + return new OpenSslPbeSecretKeyGenerator(this); + } + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pem.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pem.java new file mode 100644 index 00000000000..4302bb38235 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pem.java @@ -0,0 +1,1228 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.nio.channels.WritableByteChannel; +import java.nio.charset.StandardCharsets; +import java.security.InvalidAlgorithmParameterException; +import java.security.InvalidKeyException; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.SecureRandom; +import java.security.cert.Certificate; +import java.security.cert.CertificateEncodingException; +import java.security.cert.CertificateException; +import java.security.cert.CertificateFactory; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Arrays; +import java.util.Base64; +import java.util.Collection; +import java.util.Iterator; +import java.util.Objects; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.EncryptedPrivateKeyInfo; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import javax.crypto.SecretKey; +import javax.crypto.SecretKeyFactory; +import javax.crypto.spec.PBEKeySpec; + +/** + * Services for working with PEM encoded private keys, public keys and certificates. + * + *

Read a public key

+ * + *
+ * PublicKey readPublicKey(Path path) {
+ *  try (ReadableByteChannel pem = Files.newByteChannel(path)) {
+ *   return Pem.decoder()
+ *             .decodePublicKey(pem);
+ *   }
+ * }
+ * 
+ * + *

Read an unencrypted private key

+ * + *
+ * PrivateKey readPrivateKey(Path path) {
+ *  try (ReadableByteChannel pem = Files.newByteChannel(path)) {
+ *   return Pem.decoder()
+ *             .decodePrivateKey(pem);
+ *   }
+ * }
+ * 
+ * + *

Read an encrypted private key

+ * + *
+ * PrivateKey readPrivateKey(Path path, char[] passphrase) {
+ *  try (ReadableByteChannel pem = Files.newByteChannel(path)) {
+ *   return Pem.decoder()
+ *             .with(passphrase)
+ *             .decodePrivateKey(pem);
+ *   }
+ * }
+ * 
+ * + *

Write a public key

+ * + *
+ * void writePublicKey(Path path,final PublicKey publicKey) {
+ *  try (WritableByteChannel pem = Files.newByteChannel(path)) {
+ *   return Pem.encoder()
+ *             .write(pem,publicKey);
+ *   }
+ * }
+ * 
+ * + *

Write an unencrypted private key

+ * + *
+ * void writePrivateKey(Path path,final PrivateKey privateKey) {
+ *  try (WritableByteChannel pem = Files.newByteChannel(path)) {
+ *   return Pem.encoder()
+ *             .write(pem,privateKey);
+ *   }
+ * }
+ * 
+ * + *

Write an encrypted private key in PKCS1 format

+ * + *
+ * void writePkcs1PrivateKey(Path path,final PrivateKey privateKey, char[] passphrase) {
+ *  try (WritableByteChannel pem = Files.newByteChannel(path)) {
+ *   return Pem.encoder()
+ *             .with(Pem.Format.LEGACY)
+ *             .with(passphrase)
+ *             .write(pem,privateKey);
+ *   }
+ * }
+ * 
+ */ +public abstract class Pem { + + // Only RSA encryption is supported + private static final String KEY_PAIR_ALGORITHM = "RSA"; + // Only X509 Certificates are supported + private static final String CERTIFICATE_TYPE = "X509"; + + private static final int PKCS8_PRIVATE_KEY_HEADER_SIZE = 26; + private static final int X509_PUBLIC_KEY_HEADER_SIZE = 24; + private static final Encoder ENCODER = new Encoder(Format.DEFAULT, null); + private static final Decoder DECODER = decoder(CERTIFICATE_TYPE, KEY_PAIR_ALGORITHM); + + private Pem() {} + + private static Decoder decoder(final String certificateType, final String keyPairAlgorithm) { + + try { + CertificateFactory certificateFactory = CertificateFactory.getInstance(certificateType); + KeyFactory keyFactory = KeyFactory.getInstance(keyPairAlgorithm); + return new Decoder(certificateFactory, keyFactory, null); + } catch (CertificateException | NoSuchAlgorithmException e) { + throw new PemException(e); + } + } + + /** + * Erase (zero out) the contents of a byte array + * + * @param bytes The byte array to erase + */ + private static void erase(final byte[] bytes) { + Eraser.erase(bytes); + } + + /** + * All Java private keys are PKCS8 encoded. This method converts them back to PKCS1 format, by + * stripping the PKCS8 header. + * + * @param pkcs8 encoded bytes + * @return PKCS1 encoded representation of the key + * @see ASN1 + * key structures in DER and PEM + */ + private static byte[] asPkcs1PrivateKey(byte[] pkcs8) { + return Arrays.copyOfRange(pkcs8, PKCS8_PRIVATE_KEY_HEADER_SIZE, pkcs8.length); + } + + /** + * All Java public keys are X509 encoded. This method converts them back to PKCS1 format, by + * stripping the X509 header. + * + * @param x509 X509 encoded public key bytes + * @return PKCS1 encoded representation of the key + * @see ASN1 + * key structures in DER and PEM + */ + private static byte[] asPkcs1PublicKey(byte[] x509) { + return Arrays.copyOfRange(x509, X509_PUBLIC_KEY_HEADER_SIZE, x509.length); + } + + /** + * Concatenate two byte arrays + * + * @param first The first array + * @param second The second array + * @return The concatenated array + */ + private static byte[] join(final byte[] first, final byte[] second) { + final byte[] bytes = new byte[first.length + second.length]; + System.arraycopy(first, 0, bytes, 0, first.length); + System.arraycopy(second, 0, bytes, first.length, second.length); + return bytes; + } + + /** + * Converts PKCS1 to X509 Public KeyInfo by adding an ASN.1 header to identify the algorithm + * used to encode the payload (PKCS1 supports RSA only, X509 supports different algorithms). + * + * @param pkcs1 PKCS1 encoded bytes + * @return X509 Public KeyInfo der encoded bytes + */ + private static byte[] adaptPkcs1PublicKey(final byte[] pkcs1) { + final int pkcs1Length = pkcs1.length; + final int totalLength = pkcs1Length + 20; + // because extra 0x00 padding byte? + final int contentLength = pkcs1Length + 1; + final byte[] pkcs8Header = + new byte[] { + 0x30, + (byte) 0x82, + (byte) ((totalLength >> 8) & 0xff), + (byte) (totalLength & 0xff), + 0x30, + 0xD, + 0x6, + 0x9, + 0x2A, + (byte) 0x86, + 0x48, + (byte) 0x86, + (byte) 0xF7, + 0xD, + 0x1, + 0x1, + 0x1, + 0x5, + 0x0, + 0x3, + (byte) 0x82, + (byte) ((contentLength >> 8) & 0xff), + (byte) (contentLength & 0xff), + 0x00 + }; + final byte[] pkcs8bytes = join(pkcs8Header, pkcs1); + return pkcs8bytes; + } + + /** + * Converts PKCS1 to PKCS8 by adding an ASN.1 header to identify the algorithm used to encode + * the payload (PKCS1 supports RSA only, PKCS8 supports different algorithms). + * + * @param pkcs1 PKCS1 encoded bytes + * @return PKCS8 encoded bytes + */ + private static byte[] adaptPkcs1PrivateKey(final byte[] pkcs1) { + final int pkcs1Length = pkcs1.length; + final int totalLength = pkcs1Length + 22; + final byte[] pkcs8Header = + new byte[] { + 0x30, + (byte) 0x82, + (byte) ((totalLength >> 8) & 0xff), + (byte) (totalLength & 0xff), + 0x2, + 0x1, + 0x0, + 0x30, + 0xD, + 0x6, + 0x9, + 0x2A, + (byte) 0x86, + 0x48, + (byte) 0x86, + (byte) 0xF7, + 0xD, + 0x1, + 0x1, + 0x1, + 0x5, + 0x0, + 0x4, + (byte) 0x82, + (byte) ((pkcs1Length >> 8) & 0xff), + (byte) (pkcs1Length & 0xff) + }; + final byte[] pkcs8bytes = join(pkcs8Header, pkcs1); + return pkcs8bytes; + } + + private static byte[] encryptPkcs1(byte[] der, Encryption encryption) { + try (final Pkcs1EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = + Pkcs1EncryptedPrivateKeyInfo.of(encryption)) { + return cryptPkcs1( + Cipher.ENCRYPT_MODE, der, encryptedPrivateKeyInfo, encryption.passphrase()); + } + } + + private static byte[] cryptPkcs1( + int mode, + byte[] content, + Pkcs1EncryptedPrivateKeyInfo encryptedPrivateKeyInfo, + Passphrase passphrase) { + try { + final SecretKey secretKey = passphrase.map(encryptedPrivateKeyInfo::secretKey); + final Cipher cipher = Cipher.getInstance(encryptedPrivateKeyInfo.algorithmName()); + cipher.init(mode, secretKey, encryptedPrivateKeyInfo.getAlgParameters()); + final byte[] result = cipher.doFinal(content); + return result; + } catch (NoSuchAlgorithmException + | NoSuchPaddingException + | InvalidKeyException + | InvalidAlgorithmParameterException + | IllegalBlockSizeException + | BadPaddingException e) { + throw new PemEncryptionException(e); + } + } + + /** + * Return an encoder that does not encrypt private keys and formats private keys in PKCS8, and + * public keys or certificates in X509. + * + *

To encode encrypted private keys call {@link Encoder#with(Encryption)} + * + *

To format private keys and public keys in PKCS1, call {@link Encoder#with(Format)} e.g.: + * + *

+     *     Pem.Encoder encoder = Pem.encoder().with(Format.LEGACY);
+     * 
+ * + * @return Encoder instance + */ + public static Encoder encoder() { + return ENCODER; + } + + /** + * Return a decoder for certificates, public keys and unencrypted private keys. + * + *

To decode encrypted private keys call {@link Decoder#with(Passphrase)}. + * + * @return Decoder instance + */ + public static Decoder decoder() { + return DECODER; + } + + /** + * Denotes the specific syntax used for encoding public and private keys (Does not affect the + * encoding of certificates) + */ + public enum Format { + /** + * Encodes the public key or private key in PKCS1 format e.g. a legacy private key starts + * with {@code -----BEGIN RSA PRIVATE KEY-----} + */ + LEGACY, + /** Encodes private keys in PKCS8 format and public keys in X509 public key format */ + DEFAULT + } + + /** Denotes the type of content encoded in the PEM message */ + enum Type { + PKCS1_PRIVATE_KEY("RSA PRIVATE KEY"), + PKCS1_ENCRYPTED_PRIVATE_KEY("RSA PRIVATE KEY"), + PKCS1_PUBLIC_KEY("RSA PUBLIC KEY"), + PKCS8_ENCRYPTED_PRIVATE_KEY("ENCRYPTED PRIVATE KEY"), + PKCS8_PRIVATE_KEY("PRIVATE KEY"), + X509_PUBLIC_KEY("PUBLIC KEY"), + X509_CERTIFICATE("CERTIFICATE"); + + static final Pattern PKCS1_ENCRYPTED_HEADER_PATTERN = + Pattern.compile( + "Proc-Type:\\s+\\d+,ENCRYPTED\\nDEK-Info:\\s+([A-Z1-9-]+),([0123456789ABCDEFabcdef]+)\\n(.*)", + Pattern.DOTALL | Pattern.MULTILINE); + private final String prefix; + private final String suffix; + + Type(final String identifier) { + this.prefix = "-----BEGIN " + identifier + "-----"; + this.suffix = "-----END " + identifier + "-----"; + } + + /** + * Determine the PEM encoding format used + * + * @param text The text encoded PEM data + * @return The matching {@link Type} + * @throws IllegalArgumentException if the text is not any of the supported PEM encodings + */ + static Type typeOf(final Utf8 text) { + for (final Type type : Type.values()) { + if (text.contains(type.prefix) && text.contains(type.suffix)) { + if (type == PKCS1_PRIVATE_KEY && isEncryptedPkcs1(text)) { + return PKCS1_ENCRYPTED_PRIVATE_KEY; + } + return type; + } + } + return null; + } + + private static boolean isEncryptedPkcs1(Utf8 text) { + final Utf8 content = PKCS1_PRIVATE_KEY.content(text); + final Matcher matcher = PKCS1_ENCRYPTED_HEADER_PATTERN.matcher(content); + return matcher.matches(); + } + + private String algorithmIdentifier(final Encryption encryption) { + return encryption.algorithm() + + '-' + + encryption.keySize() + + '-' + + encryption.blockMode(); + } + + // Encrypted PKCS1 private key header + private String pemHeader(final Encryption encryption) { + String header = + "Proc-Type: 4,ENCRYPTED\n" + + "DEK-Info: " + + algorithmIdentifier(encryption) + + "," + + Hex.encode(encryption.iv()) + + "\n"; + return header; + } + + byte[] encode(byte[] payload, final Encryption encryption) { + final StringBuilder text = new StringBuilder(); + text.append(prefix); + text.append('\n'); + if (PKCS1_ENCRYPTED_PRIVATE_KEY == this) { + final String pemHeader = pemHeader(encryption); + text.append(pemHeader); + + payload = encryptPkcs1(payload, encryption); + } + final String encoded = Base64.getEncoder().encodeToString(payload); + final int length = encoded.length(); + final int lineLength = 64; + int start = 0; + int end = start + lineLength; + while (true) { + if (!(start < length)) break; + text.append(encoded, start, Math.min(length, end)); + text.append('\n'); + start = end; + end = start + lineLength; + } + text.append(suffix); + return text.toString().getBytes(StandardCharsets.UTF_8); + } + + Utf8 content(final Utf8 text) { + final int startDecl = text.indexOf(prefix); + if (startDecl != -1) { + // search for -----END ?????----- delimiter + final int endDecl = text.indexOf(suffix, startDecl); + if (endDecl != -1) { + final Utf8 content = text.subSequence(startDecl + prefix.length(), endDecl); + return content.trim(); + } + } + // didn't find a BEGIN, END pair + throw new IllegalArgumentException(); + } + + byte[] payload(final Utf8 text) { + try (final Utf8 encodedText = content(text); + final Utf8 base64 = encodedText.removeWhitespace()) { + final byte[] decoded = Base64.getDecoder().decode(base64.bytes()); + if (this == PKCS1_PRIVATE_KEY) { + return adaptPkcs1PrivateKey(decoded); + } else if (this == PKCS1_PUBLIC_KEY) { + return adaptPkcs1PublicKey(decoded); + } + return decoded; + } + } + + boolean isEncrypted() { + return this == PKCS1_ENCRYPTED_PRIVATE_KEY || this == PKCS8_ENCRYPTED_PRIVATE_KEY; + } + } + + /** + * Holds a passphrase using a try-with-resources model to assure the passphrase plain-text is + * erased once it has been used + */ + public interface Passphrase extends Sensitive { + + /** + * An instance that represents the absence of a passphrase + * + * @return Passphrase instance + */ + static Passphrase none() { + return NoPassphrase.instance(); + } + + /** + * Produce a Passphrase for the specified character array. The caller is responsible for + * erasing the contents of the supplied array. + * + * @param content The passphrase + * @return Passphrase instance + */ + static Passphrase of(final char[] content) { + if (content == null) { + return none(); + } else { + return CharacterPassphrase.of(content); + } + } + + /** Must erase the contents of the passphrase */ + @Override + void close(); + + /** + * Map the passphrase to an instance of the desired type + * + * @param mapper The mapping function + * @return The mapped instance + * @param The instance type + */ + T map(Function mapper); + } + + /** Configures how private keys are encrypted */ + public static class Encryption implements Sensitive { + static final String SUPPORTED_ENCRYPTION_ALGORITHM = "AES"; + + private static final Encryption NONE = + new Encryption("NONE", 0, null, "NONE", Passphrase.none(), false); + + private static final SecureRandom PRNG = new SecureRandom(); + private final String algorithm; + private final int keySize; + private final byte[] iv; + private final String blockMode; + private final Passphrase passphrase; + private final boolean ownsPassphrase; + + private Encryption(Builder builder) { + this( + SUPPORTED_ENCRYPTION_ALGORITHM, + builder.keySize, + builder.iv, + builder.blockMode, + builder.passphrase, + builder.ownsPassphrase); + } + + public Encryption( + String algorithm, + int keySize, + byte[] iv, + String blockMode, + Passphrase passphrase, + boolean ownsPassphrase) { + this.algorithm = algorithm; + this.keySize = keySize; + this.iv = iv; + this.blockMode = blockMode; + this.passphrase = passphrase; + this.ownsPassphrase = ownsPassphrase; + } + + /** + * Constant representing the absence of encryption + * + * @return Encryption instance + */ + public static Encryption none() { + return NONE; + } + + /** + * Build {@link Encryption} instances + * + * @return Builder instance + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public void close() { + if (ownsPassphrase && passphrase != null) { + passphrase.close(); + } + } + + /** + * The encryption algorithm + * + * @return Encryption algorithm name + */ + public String algorithm() { + return algorithm; + } + + /** + * The key size + * + * @return Key size in bits + */ + public int keySize() { + return keySize; + } + + /** + * The initialization vector + * + * @return Initialization vector + */ + public byte[] iv() { + return iv; + } + + /** + * The block mode + * + * @return The block mode name + */ + public String blockMode() { + return blockMode; + } + + /** + * The encryption passphrase + * + * @return The passphrase + */ + public Passphrase passphrase() { + return passphrase; + } + + /** Build {@link Encryption} instances */ + public static final class Builder { + private int keySize; + private byte[] iv; + private String blockMode; + private Passphrase passphrase; + private boolean ownsPassphrase; + + private transient SecureRandom entropy; + + private Builder() { + keySize = 128; + blockMode = "CBC"; + entropy = PRNG; + } + + /** + * The encryption key-size in bits, defaults to 128 + * + * @param keySize The key size in bits + * @return self + */ + public Builder keySize(int keySize) { + this.keySize = keySize; + return this; + } + + /** + * Configure the entropy source to use for generating an initialization vector, if none + * explicitly specified + * + * @param entropy The source of random bytes + * @return self + */ + public Builder entropy(final SecureRandom entropy) { + Objects.requireNonNull(entropy); + this.entropy = entropy; + return this; + } + + /** + * The initialization vector + * + * @param iv The initialization vector + * @return self + */ + public Builder iv(byte[] iv) { + this.iv = iv; + return this; + } + + /** + * The block mode, defaults to {@code CBC} + * + * @param blockMode The block mode + * @return self + */ + public Builder blockMode(String blockMode) { + this.blockMode = blockMode; + return this; + } + + /** + * The pass phrase + * + * @param passphrase The passphrase + * @return self + */ + public Builder passphrase(Passphrase passphrase) { + this.passphrase = passphrase; + return this; + } + + /** + * Indicate if this instance owns the passphrase (and therefore must close/erase it, + * when this instance is closed) + * + * @param ownsPassphrase If true the instance will own the passphrase + * @return self + */ + public Builder ownsPassphrase(boolean ownsPassphrase) { + this.ownsPassphrase = ownsPassphrase; + return this; + } + + /** + * Configure the passphrase from a character array. The passphrase will be erased when + * the {@link Encryption} instance is closed + * + * @param passphrase The pass phrase + * @return self + */ + public Builder passphrase(final char[] passphrase) { + return passphrase(Passphrase.of(passphrase)).ownsPassphrase(true); + } + + /** + * Build the {@link Encryption} instance. If an initialization vector has not been + * configured, then a random one is automatically generated + * + * @return Encryption instance + */ + public Encryption build() { + // Generate an IV if none specified + if (iv == null) { + iv = new byte[keySize / 8]; + entropy.nextBytes(iv); + } + return new Encryption(this); + } + } + } + + /** Decodes PEM encoded text streams into the desired format */ + public static class Decoder { + private final Passphrase passphrase; + private final CertificateFactory certificateFactory; + private final KeyFactory keyFactory; + + private Decoder( + final CertificateFactory certificateFactory, + final KeyFactory keyFactory, + final Passphrase passphrase) { + this.certificateFactory = certificateFactory; + this.keyFactory = keyFactory; + // Ignore the 'none' passphrase + this.passphrase = passphrase == Passphrase.none() ? null : passphrase; + } + + /** + * Produce a decoder configured to use the specified passphrase for encrypted private keys + * + * @param passphrase The passphrase or null if no encrypted private keys will be decoded + * @return Decoder instance + */ + public Decoder with(final Passphrase passphrase) { + return new Decoder(certificateFactory, keyFactory, passphrase); + } + + /** + * Decode an X509 certificate + * + * @param contents The PEM encoded form of the X509 certificate + * @return Certificate instance + */ + public Certificate decodeCertificate(final String contents) { + try (final InputStream bytes = + new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8))) { + return certificateFactory.generateCertificate(bytes); + } catch (IOException | CertificateException e) { + throw new PemException(e); + } + } + + /** + * Decode an X509 certificate + * + * @param contents The PEM encoded form of the X509 certificate + * @return Certificate instance + */ + public Certificate decodeCertificate(final ReadableByteChannel contents) { + try (final InputStream bytes = Channels.newInputStream(contents)) { + return certificateFactory.generateCertificate(bytes); + } catch (IOException | CertificateException e) { + throw new PemException(e); + } + } + + /** + * Decode an X509 certificate chain + * + * @param contents The PEM encoded certificate chain + * @return Collection of Certificate instances + */ + public Collection decodeCertificateChain(final String contents) { + try (final InputStream bytes = + new ByteArrayInputStream(contents.getBytes(StandardCharsets.UTF_8))) { + return certificateFactory.generateCertificates(bytes); + } catch (IOException | CertificateException e) { + throw new PemException(e); + } + } + + /** + * Decode an X509 certificate chain + * + * @param contents The PEM encoded certificate chain + * @return Collection of Certificate instances + */ + public Collection decodeCertificateChain( + final ReadableByteChannel contents) { + try (final InputStream bytes = Channels.newInputStream(contents)) { + return certificateFactory.generateCertificates(bytes); + } catch (IOException | CertificateException e) { + throw new PemException(e.getMessage(), e); + } + } + + private PrivateKey decodeUnencryptedPrivateKey(final Type type, final Utf8 content) { + try { + final byte[] der = type.payload(content); + try { + final PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(der); + return keyFactory.generatePrivate(spec); + } finally { + erase(der); + } + } catch (InvalidKeySpecException e) { + throw new PemException(e.getMessage(), e); + } + } + + private PrivateKey decodeEncryptedPrivateKey(final Type type, final Utf8 content) { + if (passphrase == null) { + throw new PemEncryptedKeyException(); + } + if (type == Type.PKCS1_ENCRYPTED_PRIVATE_KEY) { + return decodeEncryptedPkcs1PrivateKey(content); + } else { + return decodeEncryptedPkcs8PrivateKey(content); + } + } + + private String algorithmName(EncryptedPrivateKeyInfo encryptedPrivateKeyInfo) { + final String pbeAlgName = encryptedPrivateKeyInfo.getAlgName(); + + // For PBES2 retrieve details of the specific pbe algorithm (PRF and ES) from the + // algorithm parameters + if (pbeAlgName.equals("PBES2") || pbeAlgName.equals("1.2.840.113549.1.5.13")) { + return encryptedPrivateKeyInfo.getAlgParameters().toString(); + } else { + return pbeAlgName; + } + } + + private PrivateKey decodeEncryptedPkcs8PrivateKey(Utf8 content) { + try { + final byte[] der = Type.PKCS8_ENCRYPTED_PRIVATE_KEY.payload(content); + try { + // configure decryption of the DER payload + final EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = + new EncryptedPrivateKeyInfo(der); + final String algorithmName = algorithmName(encryptedPrivateKeyInfo); + final SecretKeyFactory secretKeyFactory = + SecretKeyFactory.getInstance(algorithmName); + final SecretKey secretKey = + secretKeyFactory.generateSecret(passphrase.map(PBEKeySpec::new)); + final Cipher cipher = Cipher.getInstance(algorithmName); + cipher.init( + Cipher.DECRYPT_MODE, + secretKey, + encryptedPrivateKeyInfo.getAlgParameters()); + + // decrypt and generate the private key + final PrivateKey privateKey = + keyFactory.generatePrivate(encryptedPrivateKeyInfo.getKeySpec(cipher)); + return privateKey; + } finally { + erase(der); + } + } catch (NoSuchAlgorithmException + | InvalidKeySpecException + | NoSuchPaddingException + | InvalidAlgorithmParameterException + | InvalidKeyException + | IOException e) { + throw new PemEncryptionException(e); + } + } + + private PrivateKey decodeEncryptedPkcs1PrivateKey(Utf8 content) { + try (final Pkcs1EncryptedPrivateKeyInfo encryptedPrivateKeyInfo = + Pkcs1EncryptedPrivateKeyInfo.of(content)) { + + final byte[] pkcs1 = + cryptPkcs1( + Cipher.DECRYPT_MODE, + encryptedPrivateKeyInfo.encoded(), + encryptedPrivateKeyInfo, + passphrase); + try { + final byte[] der = adaptPkcs1PrivateKey(pkcs1); + try { + final PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(der); + final PrivateKey privateKey = keyFactory.generatePrivate(spec); + return privateKey; + } finally { + erase(der); + } + } finally { + erase(pkcs1); + } + } catch (InvalidKeySpecException e) { + throw new PemEncryptionException(e); + } + } + + /** + * Decode a private key. The private key is sensitive data, the caller is responsible for + * ensuring the input stream is closed (and any backing storage is erased) + * + * @param bytes The PEM encoded private key as UTF-8 encoded byte stream + * @return PrivateKey instance + */ + public PrivateKey decodePrivateKey(final ReadableByteChannel bytes) throws IOException { + try (final Utf8 content = Utf8.of(bytes)) { + return decodePrivateKey(content); + } + } + + /** + * Decode a private key. The private key is sensitive data and must be provided as a byte + * array. The caller is responsible for erasing the byte array after use. + * + * @param contents The PEM encoded private key as UTF-8 encoded bytes + * @return PrivateKey instance + */ + public PrivateKey decodePrivateKey(final byte[] contents) { + try (final Utf8 content = Utf8.of(contents)) { + return decodePrivateKey(content); + } + } + + private PrivateKey decodePrivateKey(Utf8 content) { + final Type type = Type.typeOf(content); + if (type == null) { + throw new IllegalArgumentException("Private key must be in PEM format"); + } + if (type.isEncrypted()) { + return decodeEncryptedPrivateKey(type, content); + } else { + return decodeUnencryptedPrivateKey(type, content); + } + } + + /** + * Decode a public key + * + * @param contents The PEM encoded public key + * @return PublicKey instance + */ + public PublicKey decodePublicKey(final String contents) { + try (final Utf8 content = Utf8.of(contents)) { + final Type type = Type.typeOf(content); + if (type != null) { + final byte[] der = type.payload(content); + final X509EncodedKeySpec spec = new X509EncodedKeySpec(der); + return keyFactory.generatePublic(spec); + } else { + throw new IllegalArgumentException(); + } + } catch (InvalidKeySpecException e) { + throw new PemException(e); + } + } + + /** + * Decode a public key + * + * @param contents The PEM encoded public key + * @return PublicKey instance + */ + public PublicKey decodePublicKey(final ReadableByteChannel contents) { + try (final Utf8 content = Utf8.of(contents)) { + final Type type = Type.typeOf(content); + if (type != null) { + final byte[] der = type.payload(content); + final X509EncodedKeySpec spec = new X509EncodedKeySpec(der); + return keyFactory.generatePublic(spec); + } else { + throw new IllegalArgumentException(); + } + } catch (InvalidKeySpecException | IOException e) { + throw new PemException(e); + } + } + } + + // Represents the absence of a passphrase + private static class NoPassphrase implements Passphrase { + + private static final NoPassphrase INSTANCE = new NoPassphrase(); + + private NoPassphrase() {} + + static NoPassphrase instance() { + return INSTANCE; + } + + @Override + public void close() {} + + @Override + public T map(Function mapper) { + return null; + } + } + + private static class CharacterPassphrase implements Passphrase { + private final char[] content; + + private CharacterPassphrase(final char[] content) { + this.content = content; + } + + static CharacterPassphrase of(final char[] content) { + return new CharacterPassphrase(Arrays.copyOf(content, content.length)); + } + + @Override + public void close() { + // erase the array + for (int i = 0; i < content.length; ++i) { + content[i] = 0; + } + } + + @Override + public T map(Function mapper) { + return mapper.apply(content); + } + } + + /** Encode certificates, public keys and private keys into PEM encoded format */ + public static class Encoder { + + private final Encryption encryption; + private final Format format; + + private Encoder(final Format format, final Encryption encryption) { + this.format = format; + this.encryption = encryption == Encryption.none() ? null : encryption; + } + + /** + * Configure a new instance with the specified PKCS format. Note that the format applies to + * private and public keys only. Certificates always use X509 PEM encoding. + * + * @param format The encoding format for public and private keys + * @return Encoder instance + */ + public Encoder with(final Format format) { + return new Encoder(format, encryption); + } + + /** + * Configure an encoder to produce encrypted private keys. + * + *

Encryption does not apply to public keys or certificates + * + * @param encryption The encryption configuration, or null if no encryption is required + * @return Encoder instance + */ + public Encoder with(final Encryption encryption) { + return new Encoder(format, encryption); + } + + /** + * Configure an encoder to produce encrypted private keys. + * + *

Encryption does not apply to public keys or certificates + * + * @param passphrase The encryption passphrase, or null if no encryption is required + * @return Encoder instance + */ + public Encoder with(final Passphrase passphrase) { + if (passphrase == null) { + return with(Encryption.none()); + } else { + final Encryption encryption = Encryption.builder().passphrase(passphrase).build(); + return with(encryption); + } + } + + /** + * Render a public key in PEM format using PKCS1 + * + * @param publicKey The public key + * @return PEM encoding of the public key in PKCS1 format + */ + public String encode(final PublicKey publicKey) { + final byte[] der = publicKey.getEncoded(); + if (format == Format.DEFAULT) { + return Text.of(Type.X509_PUBLIC_KEY.encode(der, null)); + } else { + final byte[] payload = asPkcs1PublicKey(der); + return Text.of(Type.PKCS1_PUBLIC_KEY.encode(payload, null)); + } + } + + /** + * Render a certificate in PEM format + * + * @param certificate The certificate + * @return PEM encoding of the certificate + */ + public String encode(final Certificate certificate) { + try { + final byte[] payload = certificate.getEncoded(); + return Text.of(Type.X509_CERTIFICATE.encode(payload, null)); + } catch (CertificateEncodingException e) { + throw new PemException(e); + } + } + + /** + * Render a certificate chain in PEM format + * + * @param certificates The certificates + * @return PEM encoding of the certificate chain + */ + public String encode(final Iterable certificates) { + final StringBuilder text = new StringBuilder(); + final Iterator items = certificates.iterator(); + while (items.hasNext()) { + final Certificate certificate = items.next(); + text.append(encode(certificate)); + if (items.hasNext()) { + text.append('\n'); + } + } + return text.toString(); + } + + /** + * Render a private key in PEM format. The private key is sensitive data and is returned as + * a byte array. The caller is responsible for erasing the byte array after use. + * + * @param privateKey The private key + * @return The PEM encoded private key as UTF-8 encoded bytes + */ + public byte[] encode(final PrivateKey privateKey) { + final byte[] der = privateKey.getEncoded(); + + if (encryption == null) { + if (format == Format.DEFAULT) { + return Type.PKCS8_PRIVATE_KEY.encode(der, null); + } else { + final byte[] payload = asPkcs1PrivateKey(der); + return Type.PKCS1_PRIVATE_KEY.encode(payload, null); + } + } else { + if (format == Format.DEFAULT) { + return Type.PKCS8_ENCRYPTED_PRIVATE_KEY.encode(der, encryption); + } else { + final byte[] payload = asPkcs1PrivateKey(der); + return Type.PKCS1_ENCRYPTED_PRIVATE_KEY.encode(payload, encryption); + } + } + } + + /** + * Write a private key to a byte stream + * + * @param output The byte stream + * @param privateKey The private key + * @throws IOException if an error occurs writing to the stream + */ + public WritableByteChannel write( + final WritableByteChannel output, final PrivateKey privateKey) throws IOException { + final ByteBuffer buffer = ByteBuffer.wrap(encode(privateKey)); + try { + output.write(buffer); + } finally { + Eraser.erase(buffer); + } + return output; + } + + /** + * Write a public key to a byte stream + * + * @param output The byte stream + * @param publicKey The public key + * @throws IOException if an error occurs writing to the stream + */ + public WritableByteChannel write( + final WritableByteChannel output, final PublicKey publicKey) throws IOException { + final ByteBuffer buffer = ByteBuffer.wrap(Text.bytes(encode(publicKey))); + output.write(buffer); + return output; + } + + /** + * Write a certificate to a byte stream + * + * @param output The byte stream + * @param certificate The certificate + * @throws IOException if an error occurs writing to the stream + */ + public WritableByteChannel write( + final WritableByteChannel output, final Certificate certificate) + throws IOException { + final ByteBuffer buffer = ByteBuffer.wrap(Text.bytes(encode(certificate))); + output.write(buffer); + return output; + } + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptedKeyException.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptedKeyException.java new file mode 100644 index 00000000000..ba0460929d1 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptedKeyException.java @@ -0,0 +1,11 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +public class PemEncryptedKeyException extends PemEncryptionException { + PemEncryptedKeyException() { + super("Private Key is encrypted, but no passphrase configured"); + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptionException.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptionException.java new file mode 100644 index 00000000000..536ec3ebe3b --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemEncryptionException.java @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +public class PemEncryptionException extends PemException { + + PemEncryptionException(Throwable cause) { + super(cause); + } + + PemEncryptionException(final String message) { + super(message); + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemException.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemException.java new file mode 100644 index 00000000000..788d01ac821 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/PemException.java @@ -0,0 +1,20 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +public class PemException extends IllegalStateException { + + PemException(final String message) { + this(message, null); + } + + PemException(final Throwable cause) { + this(null, cause); + } + + PemException(final String message, final Throwable cause) { + super(message, cause); + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pkcs1EncryptedPrivateKeyInfo.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pkcs1EncryptedPrivateKeyInfo.java new file mode 100644 index 00000000000..a37db397d3f --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Pkcs1EncryptedPrivateKeyInfo.java @@ -0,0 +1,169 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import javax.crypto.SecretKey; +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.PBEKeySpec; +import javax.crypto.spec.SecretKeySpec; +import java.security.spec.AlgorithmParameterSpec; +import java.security.spec.InvalidKeySpecException; +import java.util.Arrays; +import java.util.Base64; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +class Pkcs1EncryptedPrivateKeyInfo implements AutoCloseable { + private static final Pattern PKCS1_ALGORITHM_PATTERN = Pattern.compile("(...)-(...)-(...)"); + + private final String transformation; + private final int keySize; + private final AlgorithmParameterSpec algParamSpec; + private final byte[] salt; + private final byte[] encoded; + + private Pkcs1EncryptedPrivateKeyInfo(Builder builder) { + transformation = builder.transformation; + keySize = builder.keySize; + encoded = builder.encoded; + final byte[] iv = builder.iv; + salt = builder.salt == null ? Arrays.copyOf(iv, 8) : builder.salt; + algParamSpec = new IvParameterSpec(builder.iv); + } + + static Pkcs1EncryptedPrivateKeyInfo of(final Pem.Encryption encryption) { + final String transformation = + transformation(encryption.algorithm(), encryption.blockMode()); + final int keySize = encryption.keySize(); + final byte[] iv = encryption.iv(); + return builder().transformation(transformation).keySize(keySize).iv(iv).build(); + } + + private static String transformation(final String algorithmName, final String algorithmMode) { + String blockMode = "CBC"; + String padding = "PKCS5Padding"; + + // Figure out block mode and padding. + if ("CFB".equals(algorithmMode)) { + blockMode = "CFB"; + padding = "NoPadding"; + } + if ("ECB".equals(algorithmMode)) { + blockMode = "ECB"; + } + if ("OFB".equals(algorithmMode)) { + blockMode = "OFB"; + padding = "NoPadding"; + } + + final String transformation = algorithmName + "/" + blockMode + "/" + padding; + + return transformation; + } + + static Pkcs1EncryptedPrivateKeyInfo of(final Utf8 content) { + try (final Utf8 payload = Pem.Type.PKCS1_ENCRYPTED_PRIVATE_KEY.content(content)) { + final Matcher matcher = Pem.Type.PKCS1_ENCRYPTED_HEADER_PATTERN.matcher(payload); + if (matcher.matches()) { + final String algorithm = matcher.group(1); + final byte[] ivBytes = Hex.decode(matcher.group(2)); + final String base64 = matcher.group(3).replaceAll("\\s+", ""); + final Matcher algorithmMatcher = PKCS1_ALGORITHM_PATTERN.matcher(algorithm); + if (algorithmMatcher.matches()) { + final String algorithmName = algorithmMatcher.group(1); + final int keySize = Integer.parseInt(algorithmMatcher.group(2)); + final String algorithmMode = algorithmMatcher.group(3); + + final String transformation = transformation(algorithmName, algorithmMode); + byte[] encoded = Base64.getDecoder().decode(base64); + return builder() + .transformation(transformation) + .keySize(keySize) + .iv(ivBytes) + .encoded(encoded) + .build(); + } + } + throw new PemException(new IllegalArgumentException()); + } + } + + public static Builder builder() { + return new Builder(); + } + + SecretKey secretKey(final char[] passphrase) { + try { + final PBEKeySpec spec = new PBEKeySpec(passphrase, salt, 1, keySize); + final OpenSslPbeSecretKeyFactory keyFactory = new OpenSslPbeSecretKeyFactory(); + + final byte[] key = keyFactory.generateSecret(spec).getEncoded(); + + return new SecretKeySpec(key, Pem.Encryption.SUPPORTED_ENCRYPTION_ALGORITHM); + } catch (InvalidKeySpecException e) { + throw new PemException(e); + } + } + + String algorithmName() { + return transformation; + } + + AlgorithmParameterSpec getAlgParameters() { + return algParamSpec; + } + + byte[] encoded() { + return encoded; + } + + @Override + public void close() { + Eraser.erase(encoded); + } + + static final class Builder { + private String transformation; + private int keySize; + + private byte[] iv; + private byte[] salt; + private byte[] encoded; + + private Builder() { + transformation = "AES/CBC/PKCS5Padding"; + keySize = 128; + } + + public Builder transformation(String transformation) { + this.transformation = transformation; + return this; + } + + public Builder keySize(int keySize) { + this.keySize = keySize; + return this; + } + + public Builder salt(byte[] salt) { + this.salt = salt; + return this; + } + + public Builder iv(byte[] iv) { + this.iv = iv; + return this; + } + + public Builder encoded(byte[] encoded) { + this.encoded = encoded; + return this; + } + + public Pkcs1EncryptedPrivateKeyInfo build() { + return new Pkcs1EncryptedPrivateKeyInfo(this); + } + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Sensitive.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Sensitive.java new file mode 100644 index 00000000000..b0be74a30d8 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Sensitive.java @@ -0,0 +1,25 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +/** + * Denotes a type which holds sensitive data and must be erased once it has been used. + * + *

Usage Model

+ * + * Use the try-with-resources idiom to assure the sensitive data is erased after use: + * + *
+ *     try ( Sensitive sensitive = ... ) {
+ *         // use the sensitive data
+ *         ...
+ *     }
+ * 
+ */ +interface Sensitive extends AutoCloseable { + /** Must erase the contents of the passphrase */ + @Override + void close(); +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Text.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Text.java new file mode 100644 index 00000000000..afbf59e046b --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Text.java @@ -0,0 +1,83 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +import static com.oracle.bmc.http.client.pki.Eraser.erase; + +abstract class Text { + + private Text() {} + + static String of(byte[] utf8) { + if (utf8 == null) { + return null; + } else { + return new String(utf8, StandardCharsets.UTF_8); + } + } + + static String of(Utf8 utf8) { + if (utf8 == null) { + return null; + } else { + return of(utf8.bytes()); + } + } + + static byte[] bytes(String text) { + if (text == null) { + return null; + } else { + return text.getBytes(StandardCharsets.UTF_8); + } + } + + static char[] chars(final byte[] content) { + final ByteBuffer bytes = ByteBuffer.wrap(content); + final CharBuffer buffer = StandardCharsets.UTF_8.decode(bytes); + + final char[] buf = buffer.array(); + final int position = buffer.position(); + final int limit = buffer.limit(); + final int offset = buffer.arrayOffset(); + if (offset == 0 && position == 0 && limit == buf.length) { + // no copy needed + return buf; + } else { + // must copy subsection of backing array + final char[] chars = Arrays.copyOfRange(buf, offset + position, offset + limit); + Eraser.erase(buf); + return chars; + } + } + + static byte[] bytes(final CharBuffer text) { + if (text == null) { + return null; + } else { + final CharBuffer chars = text.asReadOnlyBuffer(); + final ByteBuffer buffer = StandardCharsets.UTF_8.encode(chars); + final byte[] buf = buffer.array(); + + final int position = buffer.position(); + final int limit = buffer.limit(); + final int offset = buffer.arrayOffset(); + if (offset == 0 && position == 0 && limit == buf.length) { + // no copy needed + return buf; + } else { + // must copy subsection of backing array + final byte[] bytes = Arrays.copyOfRange(buf, offset + position, offset + limit); + Eraser.erase(buf); + return bytes; + } + } + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Utf8.java b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Utf8.java new file mode 100644 index 00000000000..69b51a71f06 --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/Utf8.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.nio.channels.WritableByteChannel; + +/** + * Mutable byte buffer for UTF-8 encoded text. When the text has been consumed it MUST be erased via + * {@link #close()} to avoid leaking sensitive data on the heap. + */ +interface Utf8 extends CharSequence, Sensitive { + + /** + * Wrap a mutable byte array. Does not claim ownership of the array. Caller is responsible for + * erasing the byte array + * + * @param bytes The bytes to wrap + * @return Utf8 instance + */ + static Utf8 of(byte[] bytes) { + return new Chars(CharBuffer.wrap(Text.chars(bytes))); + } + + /** + * Buffer the contents of a stream into a Utf8 buffer. The contents will be erased when the + * buffer is closed. + * + * @param content The content to buffer + * @return Utf8 buffer + * @throws IOException + */ + static Utf8 of(ReadableByteChannel content) throws IOException { + try (final ByteArrayOutputStream bytes = new ByteArrayOutputStream(); + final WritableByteChannel sink = Channels.newChannel(bytes)) { + final ByteBuffer buffer = ByteBuffer.allocate(4096); + while (content.read(buffer) != -1) { + buffer.flip(); + while (buffer.hasRemaining()) { + /* write() might not write all of the bytes in a single pass */ + sink.write(buffer); + } + buffer.clear(); + } + buffer.flip(); + while (buffer.hasRemaining()) { + sink.write(buffer); + } + final byte[] buffered = bytes.toByteArray(); + try { + return Utf8.of(buffered); + } finally { + Eraser.erase(buffer); + Eraser.erase(buffered); + } + } + } + + /** + * Wrap an immutable String. + * + * @param text The string to wrap + * @return Utf8 instance + */ + static Utf8 of(final String text) { + return new Wrapper(text); + } + + @Override + Utf8 subSequence(int start, int end); + + default boolean contains(final String text) { + return indexOf(text) != -1; + } + + default int indexOf(String text) { + return indexOf(text, 0); + } + + default int indexOf(String text, int offset) { + int fromIndex = offset; + int sourceCount = length(); + int targetCount = text.length(); + int targetOffset = 0; + int sourceOffset = 0; + if (fromIndex >= sourceCount) { + return (targetCount == 0 ? sourceCount : -1); + } + if (fromIndex < 0) { + fromIndex = 0; + } + if (targetCount == 0) { + return fromIndex; + } + + char first = text.charAt(targetOffset); + int max = sourceOffset + (sourceCount - targetCount); + + for (int i = sourceOffset + fromIndex; i <= max; i++) { + /* Look for first character. */ + if (charAt(i) != first) { + while (++i <= max && charAt(i) != first) ; + } + + /* Found first character, now look at the rest of v2 */ + if (i <= max) { + int j = i + 1; + int end = j + targetCount - 1; + for (int k = targetOffset + 1; j < end && charAt(j) == text.charAt(k); j++, k++) ; + + if (j == end) { + /* Found whole string. */ + return i - sourceOffset; + } + } + } + return -1; + } + + default Utf8 trim() { + int len = length(); + int st = 0; + + while ((st < len) && (charAt(st) <= ' ')) { + st++; + } + while ((st < len) && (charAt(len - 1) <= ' ')) { + len--; + } + return ((st > 0) || (len < length())) ? subSequence(st, len) : this; + } + + byte[] bytes(); + + /** + * Strip all whitespace characters in the text + * + * @return Text with all whitespace removed + */ + Utf8 removeWhitespace(); + + class Wrapper implements Utf8 { + + private final String target; + + private Wrapper(final String target) { + this.target = target; + } + + @Override + public void close() {} + + @Override + public int length() { + return target.length(); + } + + @Override + public char charAt(int index) { + return target.charAt(index); + } + + @Override + public Utf8 subSequence(int start, int end) { + return Utf8.of(target.substring(start, end)); + } + + @Override + public int indexOf(String text, int offset) { + return target.indexOf(text, offset); + } + + @Override + public Utf8 trim() { + return Utf8.of(target.trim()); + } + + @Override + public byte[] bytes() { + return Text.bytes(target); + } + + @Override + public Utf8 removeWhitespace() { + return Utf8.of(target.replaceAll("\\s+", "")); + } + } + + /** Byte array backed Utf8 */ + class Chars implements Utf8 { + private final transient CharBuffer text; + + private Chars(final CharBuffer text) { + this.text = text; + } + + @Override + public void close() { + Eraser.erase(text.array()); + } + + @Override + public int length() { + return text.length(); + } + + @Override + public char charAt(int index) { + final char c = text.charAt(index); + return c; + } + + @Override + public Utf8 subSequence(int beginIndex, int endIndex) { + if (beginIndex == 0 && endIndex == text.length()) { + return this; + } else { + final CharBuffer subSequence = text.subSequence(beginIndex, endIndex); + return new Chars(copyOf(subSequence)); + } + } + + private CharBuffer copyOf(CharBuffer existing) { + final CharBuffer copy = CharBuffer.allocate(existing.remaining()); + final CharBuffer temp = existing.asReadOnlyBuffer(); + copy.put(temp); + copy.flip(); + return copy; + } + + public byte[] bytes() { + return Text.bytes(text); + } + + @Override + public Utf8 removeWhitespace() { + final CharBuffer modified = CharBuffer.allocate(text.remaining()); + + for (int i = 0; i < text.remaining(); ++i) { + final char c = text.charAt(i); + if (c > ' ') { + modified.put(c); + } + } + modified.flip(); + return new Chars(modified); + } + + @Override + public String toString() { + return text.toString(); + } + } +} diff --git a/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/internal-README.md b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/internal-README.md new file mode 100644 index 00000000000..d2803f463ac --- /dev/null +++ b/bmc-common-httpclient/src/main/java/com/oracle/bmc/http/client/pki/internal-README.md @@ -0,0 +1,115 @@ +# About this package + +This package provides Privacy Enhanced Mail (PEM) file parsing for +private keys, public keys and certificates. + +It provides this functionality using APIs provided by the base JDK libraries +*only*. It does *not* depend on any external libraries such as Bouncy Castle +or Jipher. + +The table below provides an overview of the capabilities of this package: + +| PEM Artefact | Read | Write | +|---------------------------------|------|-------| +| PKCS1 Public Key | ✅ | ✅ | +| PKCS1 Private Key - Unencrypted | ✅ | ✅ | +| PKCS1 Private Key - Encrypted | ✅ | ✅ | +| X509 Public Key | ✅ | ✅ | +| X509 Certificate | ✅ | ✅ | +| X509 Certificate Chain | ✅ | ✅ | +| PKCS8 Private Key - Unencrypted | ✅ | ✅ | +| PKCS8 Private Key - Encrypted | ✅ | ❌ | + +Support for writing encrypted PKCS8 Private Keys could be added, with +additional effort, but no use-case for this has been observed for this in +the current code-base, so this has been left as future work. + +## Supported encryption algorithms + +- PKCS1 supports RSA public keys and private keys only. +- This package only supports AES encryption for encrypted PKCS1 private keys + (in 128, 192 or 256 bit key sizes) +- Encrypted PKCS1 private keys using a bespoke PBE algorithm. This package + only supports the MD5 based version of this algorithm. MD5 is *not* FIPS + compliant, thus encrypted PKCS1 private keys must not be used in FIPS + compliant environments. +- PKCS8 private keys (and X509 public keys) support multiple asymmetric + encryption algorithms, however the test suites in oci-java-sdk only + use RSA encryption, so only RSA has been tested, support for other + algorithms has not been verified. + +## About the API + +The API is exposed via a top level type named `Pem`. + +Clients use `Pem.decoder()` -returning an instance of +`Pem.Decoder`- to read PEM resources, and `Pem.encoder()`- returning an instance +of `Pem.Encoder`- to write PEM resources. + +In this regard the API is similar in design to the `java.util.Base64` API. + +Clients can use the various `with()` methods on these types to customize +how the resources are read or written. + +For example to read an encrypted private key a client could do: + +```java +import com.oracle.bmc.http.client.pki.Pem; + +import java.nio.channels.ReadableByteChannel; +import java.nio.file.Files; +import java.security.PrivateKey; + +class Example { + + PrivateKey readPrivateKey(Path path, char[] passphrase) { + try (ReadableByteChannel pem = Files.newByteChannel(path)) { + return Pem.decoder() + .with(passphrase) + .decodePrivateKey(pem); + } + } +} +``` + +or to write an encrypted private key in PKCS1 format: + +```java +import com.oracle.bmc.http.client.pki.Pem; + +import java.nio.channels.WritableByteChannel; +import java.nio.file.Files; +import java.security.PrivateKey; + +class Example { + + PrivateKey writePkcs1PrivateKey(Path path, PrivateKey privateKey, char[] passphrase) { + try (WritableByteChannel pem = Files.newByteChannel(path)) { + return Pem.encoder() + .with(Pem.Format.LEGACY) + .with(passphrase) + .write(pem, privateKey); + } + } +} +``` + +### Handling sensitive data + +PEM resources are inherently text based resources, so APIs +that accept and consume `String` instances are the most intuitive, +and this is the case for APIs for reading and writing certificates and +public keys (which do not contain sensitive data). + +Private keys are extremely sensitive data. Using `String` based APIs +with private keys is never appropriate because the immutable +nature of `String` means that the sensitive private key data cannot be erased +from memory after use. + +All private key based APIs use `byte[]` inputs and outputs. Clients +*must* take care to erase all `byte[]` instances after use. + +Alternatively `ReadableByteChannel` and `WritableByteChannel` APIs +are offered which may avoid materializing the private key data into (visible) +buffers altogether. + diff --git a/bmc-common/pom.xml b/bmc-common/pom.xml index e78ab96930b..7e8bf24876d 100644 --- a/bmc-common/pom.xml +++ b/bmc-common/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -56,29 +56,21 @@
- - org.bouncycastle - bcpkix-jdk15to18 - - - org.bouncycastle - bcprov-jdk15to18 - com.oracle.oci.sdk oci-java-sdk-circuitbreaker - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-common-httpclient - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 test diff --git a/bmc-common/src/main/java/com/oracle/bmc/Realm.java b/bmc-common/src/main/java/com/oracle/bmc/Realm.java index 590a109d486..1d67cf1e126 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/Realm.java +++ b/bmc-common/src/main/java/com/oracle/bmc/Realm.java @@ -46,6 +46,7 @@ public final class Realm implements Serializable, Comparable { public static final Realm OC26 = new Realm("oc26", "oraclecloud26.com"); public static final Realm OC15 = new Realm("oc15", "oraclecloud15.com"); public static final Realm OC29 = new Realm("oc29", "oraclecloud29.com"); + public static final Realm OC23 = new Realm("oc23", "oraclecloud23.com"); private static final long serialVersionUID = -905344971L; /** The id of the realm. */ private final String realmId; diff --git a/bmc-common/src/main/java/com/oracle/bmc/Region.java b/bmc-common/src/main/java/com/oracle/bmc/Region.java index f1db7265139..4c709f34a09 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/Region.java +++ b/bmc-common/src/main/java/com/oracle/bmc/Region.java @@ -199,6 +199,10 @@ private static String getDefaultRealmFromEnv() { public static final Region ME_ABUDHABI_2 = register("me-abudhabi-2", Realm.OC29, "rkt"); public static final Region ME_ABUDHABI_4 = register("me-abudhabi-4", Realm.OC29, "shj"); + // OC23 + public static final Region US_SOMERSET_1 = register("us-somerset-1", Realm.OC23, "ebb"); + public static final Region US_THAMES_1 = register("us-thames-1", Realm.OC23, "ebl"); + private static final Map> SERVICE_TO_REGION_ENDPOINTS = new HashMap<>(); diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java b/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java index 49db7ff68c6..a91d8557502 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractFederationClientAuthenticationDetailsProviderBuilder.java @@ -485,6 +485,9 @@ public Region getRegion() { * *

The thread safety of this class is ensured through the Caching class above which * synchronizes on all methods. + * + *

The class is implemented in a lazy way to avoid generating the key if it is not needed or + * if refresh is immediately called. */ static class SessionKeySupplierImpl implements SessionKeySupplier { private static final KeyPairGenerator GENERATOR; @@ -499,12 +502,13 @@ static class SessionKeySupplierImpl implements SessionKeySupplier { } } - SessionKeySupplierImpl() { - this.keyPair = GENERATOR.generateKeyPair(); - } + SessionKeySupplierImpl() {} @Override public KeyPair getKeyPair() { + if (this.keyPair == null) { + this.keyPair = GENERATOR.generateKeyPair(); + } return keyPair; } diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractRequestingAuthenticationDetailsProvider.java b/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractRequestingAuthenticationDetailsProvider.java index ac11e7984ca..f6a37a9857f 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractRequestingAuthenticationDetailsProvider.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/AbstractRequestingAuthenticationDetailsProvider.java @@ -121,7 +121,6 @@ protected static class CachingSessionKeySupplier implements SessionKeySupplier { protected CachingSessionKeySupplier(final SessionKeySupplier delegate) { this.delegate = delegate; - this.setPrivateKeyBytes((RSAPrivateKey) delegate.getKeyPair().getPrivate()); } @Override diff --git a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/AuthUtils.java b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/AuthUtils.java index b437100ae32..58c0183c9fd 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/auth/internal/AuthUtils.java +++ b/bmc-common/src/main/java/com/oracle/bmc/auth/internal/AuthUtils.java @@ -7,18 +7,12 @@ import com.oracle.bmc.InternalSdk; import com.oracle.bmc.auth.exception.InstancePrincipalUnavailableException; import com.oracle.bmc.http.client.Serializer; +import com.oracle.bmc.http.client.pki.Pem; import com.oracle.bmc.util.internal.Validate; -import org.bouncycastle.asn1.ASN1ObjectIdentifier; -import org.bouncycastle.asn1.x500.AttributeTypeAndValue; -import org.bouncycastle.asn1.x500.RDN; -import org.bouncycastle.asn1.x500.X500Name; -import org.bouncycastle.asn1.x500.style.BCStyle; -import org.bouncycastle.openssl.jcajce.JcaPEMWriter; + import org.slf4j.Logger; -import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.OutputStreamWriter; import java.math.BigInteger; import java.nio.charset.StandardCharsets; import java.security.KeyFactory; @@ -32,6 +26,13 @@ import java.util.Base64; import java.util.Optional; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.Attribute; +import javax.naming.ldap.LdapName; +import javax.naming.ldap.Rdn; +import javax.security.auth.x500.X500Principal; + /** Utilities dealing with authorization. */ public class AuthUtils { private static final char[] HEX_ARRAY = "0123456789ABCDEF".toCharArray(); @@ -167,16 +168,7 @@ public static Optional toPublicKeyFromJwk(final JWK jwk) { */ @InternalSdk(backwardCompatibilityRequired = true) public static byte[] toByteArrayFromRSAPrivateKey(RSAPrivateKey key) { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - try (JcaPEMWriter writer = - new JcaPEMWriter(new OutputStreamWriter(baos, StandardCharsets.UTF_8))) { - writer.writeObject(key); - writer.flush(); - } catch (IOException e) { - throw new IllegalStateException("Unable to write PEM object", e); - } - - return baos.toByteArray(); + return Pem.encoder().with(Pem.Format.LEGACY).encode(key); } /** @@ -250,11 +242,11 @@ static byte[] getEncodedCertificateFromPem(String pemEncodedCertificate) { public static String getTenantIdFromCertificate(X509Certificate certificate) { Validate.notNull(certificate, "certificate may not be null"); - X500Name name = new X500Name(certificate.getSubjectX500Principal().getName()); - - Optional tenancyId = getValue(name, BCStyle.OU, "opc-tenant"); // IP + final X500Principal principal = certificate.getSubjectX500Principal(); + final String name = principal.getName(); + Optional tenancyId = getValue(name, "OU", "opc-tenant"); // IP if (!tenancyId.isPresent()) { - tenancyId = getValue(name, BCStyle.O, "opc-identity"); // SP + tenancyId = getValue(name, "OU", "opc-identity"); // SP } if (tenancyId.isPresent()) { return tenancyId.get(); @@ -263,16 +255,33 @@ public static String getTenantIdFromCertificate(X509Certificate certificate) { "The certificate does not contain tenant id."); } - private static Optional getValue(X500Name name, ASN1ObjectIdentifier id, String key) { - String prefix = key + ":"; - for (RDN rdn : name.getRDNs(id)) { - for (AttributeTypeAndValue typeAndValue : rdn.getTypesAndValues()) { - String value = typeAndValue.getValue().toString(); - if (value.startsWith(prefix)) { - return Optional.of(value.substring(prefix.length())); + private static Optional getValue(String name, String type, String key) { + try { + final LdapName ldapName = new LdapName(name); + final String prefix = key + ":"; + + for (Rdn rdn : ldapName.getRdns()) { + final String rdnType = rdn.getType(); + if (type.equalsIgnoreCase(rdnType)) { + final Attribute attribute = rdn.toAttributes().get(type); + if (attribute != null) { + final NamingEnumeration values = attribute.getAll(); + while (values.hasMore()) { + final Object value = values.next(); + if (value != null) { + final String text = value.toString().trim(); + if (text.startsWith(prefix)) { + return Optional.of(text.substring(prefix.length())); + } + } + } + } } } + return Optional.empty(); + } catch (NamingException e) { + throw new InstancePrincipalUnavailableException( + "Error parsing the certificate name", e); } - return Optional.empty(); } } diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java deleted file mode 100644 index 280dae89cd5..00000000000 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/BouncyCastleHelper.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. - * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. - */ -package com.oracle.bmc.http.signing.internal; - -import java.security.Provider; -import java.security.Security; - -class BouncyCastleHelper { - private static final org.slf4j.Logger LOG = - org.slf4j.LoggerFactory.getLogger(BouncyCastleHelper.class); - private final boolean isProviderInstalled; - private final Provider bouncyCastleProvider; - - private BouncyCastleHelper() { - isProviderInstalled = - Security.getProvider("BC") != null || Security.getProvider("BCFIPS") != null; - try { - final Class bouncyCastleProviderClass = getBouncyCastleProviderClass(); - bouncyCastleProvider = (Provider) bouncyCastleProviderClass.newInstance(); - LOG.info("Instantiated provider: " + bouncyCastleProviderClass.getName()); - } catch (InstantiationException | IllegalAccessException ex) { - LOG.error("Failed to instantiate any BouncyCastle provider", ex); - throw new BouncyCastleHelperException( - "Failed to instantiate any BouncyCastle provider", ex); - } - } - - private static class Holder { - private static final BouncyCastleHelper INSTANCE = new BouncyCastleHelper(); - } - - static BouncyCastleHelper getInstance() { - return Holder.INSTANCE; - } - - boolean isProviderInstalled() { - return isProviderInstalled; - } - - Provider getBouncyCastleProvider() { - return bouncyCastleProvider; - } - - private static Class getBouncyCastleProviderClass() { - LOG.debug("Trying to get BouncyCastleProvider"); - try { - return Class.forName("org.bouncycastle.jce.provider.BouncyCastleProvider"); - } catch (ClassNotFoundException e) { - LOG.info("Did not find BouncyCastleProvider"); - } - - LOG.debug("Trying to get BouncyCastleFipsProvider"); - try { - return Class.forName("org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider"); - } catch (ClassNotFoundException e) { - LOG.info("Did not find BouncyCastleFipsProvider"); - } - - throw new IllegalStateException("No matching BouncyCastle provider found."); - } - - /** An exception in the {@link BouncyCastleHelper}. */ - public static class BouncyCastleHelperException extends RuntimeException { - public BouncyCastleHelperException(String message, Throwable cause) { - super(message, cause); - } - - public BouncyCastleHelperException(Throwable cause) { - super(cause); - } - } -} diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java index e311f719b6b..30fcc3492b2 100644 --- a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplier.java @@ -4,32 +4,15 @@ */ package com.oracle.bmc.http.signing.internal; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.security.interfaces.RSAPrivateKey; +import com.oracle.bmc.http.client.InternalSdk; + import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; -import com.oracle.bmc.InternalSdk; -import org.bouncycastle.asn1.pkcs.PrivateKeyInfo; -import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo; -import org.bouncycastle.openssl.EncryptionException; -import org.bouncycastle.openssl.PEMDecryptorProvider; -import org.bouncycastle.openssl.PEMEncryptedKeyPair; -import org.bouncycastle.openssl.PEMKeyPair; -import org.bouncycastle.openssl.PEMParser; -import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; -import org.bouncycastle.openssl.jcajce.JceOpenSSLPKCS8DecryptorProviderBuilder; -import org.bouncycastle.openssl.jcajce.JcePEMDecryptorProviderBuilder; - +import java.io.IOException; +import java.io.InputStream; +import java.security.interfaces.RSAPrivateKey; import java.util.Optional; -import com.oracle.bmc.util.internal.Validate; -import org.bouncycastle.operator.InputDecryptorProvider; -import org.bouncycastle.operator.OperatorCreationException; -import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo; -import org.bouncycastle.pkcs.PKCSException; /** * An implementation of {@link KeySupplier} that supplies a RSA private key from a PEM file. @@ -47,9 +30,7 @@ public class PEMFileRSAPrivateKeySupplier implements KeySupplier { private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(PEMFileRSAPrivateKeySupplier.class); - private final JcaPEMKeyConverter converter = new JcaPEMKeyConverter(); - - private final RSAPrivateKey key; + private final PEMStreamRSAPrivateKeySupplier delegate; /** * Constructs a new file key supplier which reads the private key from the specified file. The @@ -63,82 +44,8 @@ public PEMFileRSAPrivateKeySupplier( try { LOG.debug("Initializing private key"); - try (PEMParser keyReader = - new PEMParser(new InputStreamReader(inputStream, StandardCharsets.UTF_8))) { - Object object = keyReader.readObject(); - - final PrivateKeyInfo keyInfo; - - if (object instanceof PEMEncryptedKeyPair) { - Validate.notNull( - passphraseCharacters, "The provided private key requires a passphrase"); - - JcePEMDecryptorProviderBuilder decryptorProviderBuilder = - new JcePEMDecryptorProviderBuilder(); - - // If either of BouncyCastle or BouncyCastleFIPS provider is installed, then - // irrespective of the - // version of the library used, decryption of passphrase protected PEM files are - // supported. Else, - // for versions of BouncyCastle > 1.52 (or BC-FIPS), need to add the provider to - // be able to read - // passphrase protected PEM files. Adding the provider to the - // PEMDecryptorProvider instead of - // modifying the application's security environment (by calling - // Security.addProvider) to maintain - // backward compatibility. Details at - // https://github.com/bcgit/bc-java/issues/156 - if (!BouncyCastleHelper.getInstance().isProviderInstalled()) { - decryptorProviderBuilder.setProvider( - BouncyCastleHelper.getInstance().getBouncyCastleProvider()); - } - - PEMDecryptorProvider decProv = - decryptorProviderBuilder.build(passphraseCharacters); - try { - keyInfo = - ((PEMEncryptedKeyPair) object) - .decryptKeyPair(decProv) - .getPrivateKeyInfo(); - } catch (EncryptionException ex) { - throw new IllegalArgumentException( - "The provided passphrase is incorrect.", ex); - } - } else if (object instanceof PKCS8EncryptedPrivateKeyInfo) { - Validate.notNull( - passphraseCharacters, "The provided private key requires a passphrase"); - - JceOpenSSLPKCS8DecryptorProviderBuilder decryptorProviderBuilder = - new JceOpenSSLPKCS8DecryptorProviderBuilder(); - - if (!BouncyCastleHelper.getInstance().isProviderInstalled()) { - decryptorProviderBuilder.setProvider( - BouncyCastleHelper.getInstance().getBouncyCastleProvider()); - } - InputDecryptorProvider decProv = - decryptorProviderBuilder.build(passphraseCharacters); - try { - keyInfo = - ((PKCS8EncryptedPrivateKeyInfo) object) - .decryptPrivateKeyInfo(decProv); - } catch (PKCSException ex) { - throw new IllegalArgumentException( - "The provided passphrase is incorrect.", ex); - } - } else if (object instanceof PrivateKeyInfo) { - keyInfo = (PrivateKeyInfo) object; - } else if (object instanceof PEMKeyPair) { - keyInfo = ((PEMKeyPair) object).getPrivateKeyInfo(); - } else if (object instanceof SubjectPublicKeyInfo) { - throw new IllegalArgumentException( - "Public key provided instead of private key"); - } else { - throw new IllegalArgumentException("Private key must be in PEM format"); - } - - this.key = (RSAPrivateKey) converter.getPrivateKey(keyInfo); - } - } catch (IOException | OperatorCreationException ex) { + delegate = new PEMStreamRSAPrivateKeySupplier(inputStream, passphraseCharacters); + } catch (IOException ex) { LOG.debug("Failed to read RSA private key from file ", ex); throw new PEMFileRSAPrivateKeySupplierException( "Failed to read RSA private key from file ", ex); @@ -155,7 +62,7 @@ public PEMFileRSAPrivateKeySupplier( @InternalSdk(backwardCompatibilityRequired = true) @Override public Optional supplyKey(@Nonnull String ignored) { - return supplyKey(); + return delegate.supplyKey(ignored); } /** @@ -166,7 +73,7 @@ public Optional supplyKey(@Nonnull String ignored) { @InternalSdk(backwardCompatibilityRequired = true) @Nonnull public Optional supplyKey() { - return Optional.of(key); + return supplyKey(null); } /** An exception in the {@link PEMFileRSAPrivateKeySupplier}. */ diff --git a/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMStreamRSAPrivateKeySupplier.java b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMStreamRSAPrivateKeySupplier.java new file mode 100644 index 00000000000..fae0af4007a --- /dev/null +++ b/bmc-common/src/main/java/com/oracle/bmc/http/signing/internal/PEMStreamRSAPrivateKeySupplier.java @@ -0,0 +1,49 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.signing.internal; + +import com.oracle.bmc.http.client.pki.Pem; +import com.oracle.bmc.http.client.pki.PemEncryptionException; +import com.oracle.bmc.http.client.pki.PemException; + +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.channels.Channels; +import java.nio.channels.ReadableByteChannel; +import java.security.PrivateKey; +import java.security.interfaces.RSAPrivateKey; +import java.util.Optional; + +class PEMStreamRSAPrivateKeySupplier implements KeySupplier { + private final Optional privateKey; + + public PEMStreamRSAPrivateKeySupplier( + @Nonnull final InputStream inputStream, @Nullable final char[] passphrase) + throws IOException { + // Must close the input stream to honor PEMFileRSAPrivateKeySupplier behavior + try (final ReadableByteChannel channel = Channels.newChannel(inputStream); + final Pem.Passphrase pemPassphrase = Pem.Passphrase.of(passphrase)) { + final PrivateKey privateKey = + Pem.decoder().with(pemPassphrase).decodePrivateKey(channel); + if (privateKey instanceof RSAPrivateKey) { + this.privateKey = Optional.of((RSAPrivateKey) privateKey); + } else { + throw new IllegalStateException(privateKey.toString()); + } + } catch (PemEncryptionException e) { + throw new IllegalArgumentException("The provided passphrase is incorrect.", e); + } catch (PemException e) { + throw new IllegalArgumentException("Private key must be in PEM format", e); + } + } + + @Override + public Optional supplyKey(String keyId) { + return privateKey; + } +} diff --git a/bmc-common/src/test/java/com/oracle/bmc/auth/internal/AuthUtilsTest.java b/bmc-common/src/test/java/com/oracle/bmc/auth/internal/AuthUtilsTest.java index f72204a1e57..bddd25f08bf 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/auth/internal/AuthUtilsTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/auth/internal/AuthUtilsTest.java @@ -5,15 +5,19 @@ package com.oracle.bmc.auth.internal; import java.io.FileInputStream; +import java.io.FileNotFoundException; import java.io.IOException; import java.math.BigInteger; import java.nio.charset.StandardCharsets; import java.security.KeyFactory; +import java.security.cert.X509Certificate; +import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPublicKey; import java.security.spec.X509EncodedKeySpec; import java.util.Base64; import java.util.Optional; +import com.oracle.bmc.http.client.pki.Pem; import com.oracle.bmc.util.StreamUtils; import org.junit.Test; @@ -108,4 +112,36 @@ public void testUrlSafeBase64Decode() { assertArrayEquals(AuthUtils.base64Decode("++//"), AuthUtils.base64Decode("--__")); assertEquals(null, AuthUtils.base64Decode(null)); } + + @Test + public void testGetTenantIdFromCertificate() throws FileNotFoundException { + final String certificate = + StreamUtils.toString( + new FileInputStream("src/test/resources/x509_cert.pem"), + StandardCharsets.UTF_8); + final String expected = + "ocid1.tenancy.oc1..aaaaaaaak7qsj6ltfwek5cxl6xptznanr2kt7fxrbho7di3vchaf6m5apxeq"; + + final X509Certificate x509Certificate = + (X509Certificate) Pem.decoder().decodeCertificate(certificate); + final String tenantId = AuthUtils.getTenantIdFromCertificate(x509Certificate); + assertEquals(expected, tenantId); + } + + @Test + public void testToByteArrayFromRSAPrivateKey() throws Exception { + final String privateKeyText = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_private_key.pem"), + StandardCharsets.UTF_8); + + final RSAPrivateKey privateKey = + (RSAPrivateKey) + Pem.decoder() + .decodePrivateKey(privateKeyText.getBytes(StandardCharsets.UTF_8)); + + final byte[] bytes = AuthUtils.toByteArrayFromRSAPrivateKey(privateKey); + final String text = new String(bytes, StandardCharsets.UTF_8).trim(); + assertEquals(privateKeyText, text); + } } diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/client/pki/PemTest.java b/bmc-common/src/test/java/com/oracle/bmc/http/client/pki/PemTest.java new file mode 100644 index 00000000000..504d245c4d7 --- /dev/null +++ b/bmc-common/src/test/java/com/oracle/bmc/http/client/pki/PemTest.java @@ -0,0 +1,222 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import com.oracle.bmc.util.StreamUtils; +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.nio.charset.StandardCharsets; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.security.cert.Certificate; +import java.util.Collection; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +/** Unit tests for {@link Pem} */ +public class PemTest { + + // PKCS1 -> BEGIN RSA PRIVATE KEY, PKCS8 -> BEGIN PRIVATE KEY + private static String PKCS1_PRIVATE_KEY; + + private static String PKCS1_ENCRYPTED_PRIVATE_KEY; + private static String X509_CERTIFICATE; + + private static String PKCS8_ENCRYPTED_PRIVATE_KEY; + + private static String PKCS1_DECRYPTED_PRIVATE_KEY; + + private static String X509_PUBLIC_KEY; + + private static String PKCS1_PUBLIC_KEY; + private static final String CORRECT_PASSPHRASE = + "aWCTJPET9fL7UBTp97hX99gdofeWKUf5tuxSuJeST2sEkyvkyinrfrj6EiSUTErF"; + private static final String INCORRECT_PASSPHRASE = "Th1s1sWr0ng"; + + @BeforeClass + public static void init() throws FileNotFoundException { + PKCS1_PRIVATE_KEY = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_private_key.pem"), + StandardCharsets.UTF_8); + PKCS1_ENCRYPTED_PRIVATE_KEY = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + X509_CERTIFICATE = + StreamUtils.toString( + new FileInputStream("src/test/resources/x509_cert.pem"), + StandardCharsets.UTF_8); + PKCS8_ENCRYPTED_PRIVATE_KEY = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs8_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + PKCS1_DECRYPTED_PRIVATE_KEY = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_decrypted_private_key.pem"), + StandardCharsets.UTF_8); + X509_PUBLIC_KEY = + StreamUtils.toString( + new FileInputStream("src/test/resources/x509_public_key.pem"), + StandardCharsets.UTF_8); + PKCS1_PUBLIC_KEY = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_public_key.pem"), + StandardCharsets.UTF_8); + } + + /** Test decoding and encoding an encrypted PKCS1 encoded private key */ + @Test + public void testRoundTripPkcs1PrivateKey() { + final PrivateKey privateKey = Pem.decoder().decodePrivateKey(Text.bytes(PKCS1_PRIVATE_KEY)); + final String serialized = Text.of(Pem.encoder().with(Pem.Format.LEGACY).encode(privateKey)); + + assertEquals(PKCS1_PRIVATE_KEY, serialized); + } + + /** Test decoding and encoding a certificate */ + @Test + public void testRoundTripX509Certificate() { + final Certificate certificate = Pem.decoder().decodeCertificate(X509_CERTIFICATE); + final String serialized = Pem.encoder().encode(certificate); + assertEquals(X509_CERTIFICATE, serialized); + } + + /** Test decoding and encoding a certificate chain */ + @Test + public void testRoundTripX509CertificateChain() { + // a certificate chain is just N certificates concatenated together + final String pemCertificateChain = X509_CERTIFICATE + "\n" + X509_CERTIFICATE; + final Collection certificateChain = + Pem.decoder().decodeCertificateChain(pemCertificateChain); + final String serialized = Pem.encoder().encode(certificateChain); + assertEquals(pemCertificateChain, serialized); + } + + /** Test decoding an encrypted PKCS8 encoded private key */ + @Test + public void testEncryptedPkcs8PrivateKey() { + try (final Pem.Passphrase passphrase = + Pem.Passphrase.of(CORRECT_PASSPHRASE.toCharArray())) { + final PrivateKey privateKey = + Pem.decoder() + .with(passphrase) + .decodePrivateKey(Text.bytes(PKCS8_ENCRYPTED_PRIVATE_KEY)); + final String serialized = + Text.of(Pem.encoder().with(Pem.Format.LEGACY).encode(privateKey)); + assertEquals(PKCS1_DECRYPTED_PRIVATE_KEY, serialized); + } + } + + /** Expect an incorrect passphrase to produce {@link PemEncryptionException} */ + @Test(expected = PemEncryptionException.class) + public void testEncryptedPkcs8PrivateKeyIncorrectPassphrase() { + try (final Pem.Passphrase passphrase = + Pem.Passphrase.of(INCORRECT_PASSPHRASE.toCharArray())) { + + Pem.decoder() + .with(passphrase) + .decodePrivateKey(Text.bytes(PKCS8_ENCRYPTED_PRIVATE_KEY)); + } + } + + /** Expect a missing passphrase to produce {@link PemEncryptedKeyException} */ + @Test(expected = PemEncryptedKeyException.class) + public void testEncryptedPkcs8PrivateKeyNoPassphrase() { + Pem.decoder().decodePrivateKey(Text.bytes(PKCS8_ENCRYPTED_PRIVATE_KEY)); + } + + /** Test decoding an encrypted PKCS1 encoded private key */ + @Test + public void testEncryptedPkcs1PrivateKey() { + try (final Pem.Passphrase passphrase = + Pem.Passphrase.of(CORRECT_PASSPHRASE.toCharArray())) { + final PrivateKey privateKey = + Pem.decoder() + .with(passphrase) + .decodePrivateKey(Text.bytes(PKCS1_ENCRYPTED_PRIVATE_KEY)); + final String serialized = + Text.of(Pem.encoder().with(Pem.Format.LEGACY).encode(privateKey)); + assertEquals(PKCS1_DECRYPTED_PRIVATE_KEY, serialized); + } + } + + /** Expect an incorrect passphrase to produce {@link PemEncryptionException} */ + @Test(expected = PemEncryptionException.class) + public void testEncryptedPkcs1PrivateKeyIncorrectPassphrase() { + try (final Pem.Passphrase passphrase = + Pem.Passphrase.of(INCORRECT_PASSPHRASE.toCharArray())) { + Pem.decoder() + .with(passphrase) + .decodePrivateKey(Text.bytes(PKCS1_ENCRYPTED_PRIVATE_KEY)); + } + } + + /** Test decoding and encoding an X509 encoded public key */ + @Test + public void testRoundTripX509PublicKey() { + final PublicKey publicKey = Pem.decoder().decodePublicKey(X509_PUBLIC_KEY); + final String serialized = Pem.encoder().encode(publicKey); + assertEquals(X509_PUBLIC_KEY, serialized); + } + + /** Test decoding and encoding a PKCS1 encoded public key */ + @Test + public void testRoundTripPkcs1PublicKey() { + final PublicKey publicKey = Pem.decoder().decodePublicKey(PKCS1_PUBLIC_KEY); + final String serialized = Pem.encoder().with(Pem.Format.LEGACY).encode(publicKey); + assertEquals(PKCS1_PUBLIC_KEY, serialized); + } + + /** + * Test decoding an encrypted private key, then encrypting it again and verify the decrypted + * version of that matches the original + */ + @Test + @Ignore("Encrypted PKCS8 private key support not implemented") + public void testEncryptPkcs8PrivateKey() { + try (final Pem.Passphrase passphrase = + Pem.Passphrase.of(CORRECT_PASSPHRASE.toCharArray())) { + final Pem.Decoder decoder = Pem.decoder().with(passphrase); + final PrivateKey privateKey = + decoder.decodePrivateKey(Text.bytes(PKCS8_ENCRYPTED_PRIVATE_KEY)); + final byte[] encrypted = Pem.encoder().with(passphrase).encode(privateKey); + assertTrue(Utf8.of(encrypted).contains("----BEGIN ENCRYPTED PRIVATE KEY----")); + final PrivateKey roundTripped = decoder.decodePrivateKey(encrypted); + final String serialized = + Text.of(Pem.encoder().with(Pem.Format.LEGACY).encode(roundTripped)); + assertEquals(PKCS1_DECRYPTED_PRIVATE_KEY, serialized); + } + } + + /** + * Test decoding an encrypted private key, then encrypting it again and verify the decrypted + * version of that matches the original + */ + @Test + public void testEncryptPkcs1PrivateKey() { + try (final Pem.Passphrase passphrase = + Pem.Passphrase.of(CORRECT_PASSPHRASE.toCharArray())) { + final Pem.Decoder decoder = Pem.decoder().with(passphrase); + final PrivateKey privateKey = + decoder.decodePrivateKey(Text.bytes(PKCS1_ENCRYPTED_PRIVATE_KEY)); + final byte[] encrypted = + Pem.encoder().with(Pem.Format.LEGACY).with(passphrase).encode(privateKey); + try (final Utf8 text = Utf8.of(encrypted)) { + assertTrue(text.contains("----BEGIN RSA PRIVATE KEY----")); + assertTrue(text.contains("DEK-Info:")); + } + final PrivateKey roundTripped = decoder.decodePrivateKey(encrypted); + final String serialized = + Text.of(Pem.encoder().with(Pem.Format.LEGACY).encode(roundTripped)); + assertEquals(PKCS1_DECRYPTED_PRIVATE_KEY, serialized); + } + } +} diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/client/pki/Utf8Test.java b/bmc-common/src/test/java/com/oracle/bmc/http/client/pki/Utf8Test.java new file mode 100644 index 00000000000..a70703fba33 --- /dev/null +++ b/bmc-common/src/test/java/com/oracle/bmc/http/client/pki/Utf8Test.java @@ -0,0 +1,45 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.http.client.pki; + +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +/** Unit tests for {@link Utf8} */ +public class Utf8Test { + + @Test + public void testTrim() { + final String input = " Hello World\n"; + final Utf8 utf8 = Utf8.of(Text.bytes(input)); + assertEquals("Hello World", Text.of(utf8.trim())); + } + + @Test + public void testContains() { + final String input = " Hello World\n"; + final Utf8 utf8 = Utf8.of(Text.bytes(input)); + final boolean actual = utf8.contains("Hello"); + assertTrue(actual); + } + + @Test + public void testIndexOfNotFound() { + final String input = " Hello World\n"; + final Utf8 utf8 = Utf8.of(Text.bytes(input)); + final int actual = utf8.indexOf("Hallo"); + assertEquals(-1, actual); + } + + @Test + public void testRemoveWhitespace() { + final String input = " Hello World\nAgain\n"; + final Utf8 utf8 = Utf8.of(Text.bytes(input)); + final Utf8 actual = utf8.removeWhitespace(); + assertEquals("HelloWorldAgain", Text.of(actual)); + } +} diff --git a/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java b/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java index 6aa530a0326..bb035788798 100644 --- a/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java +++ b/bmc-common/src/test/java/com/oracle/bmc/http/signing/internal/PEMFileRSAPrivateKeySupplierTest.java @@ -4,16 +4,29 @@ */ package com.oracle.bmc.http.signing.internal; +import com.oracle.bmc.util.StreamUtils; import org.junit.Test; import java.io.ByteArrayInputStream; -import java.io.InputStream; +import java.io.FileInputStream; import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; +import java.security.interfaces.RSAPrivateKey; +import java.util.Optional; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; /** Tests for {@link PEMFileRSAPrivateKeySupplierTest}. */ public class PEMFileRSAPrivateKeySupplierTest { + + private static final char[] INCORRECT_PASSPHRASE = "incorrect_passphrase".toCharArray(); + + private static final char[] CORRECT_PASSPHRASE = + "aWCTJPET9fL7UBTp97hX99gdofeWKUf5tuxSuJeST2sEkyvkyinrfrj6EiSUTErF".toCharArray(); + @Test(expected = IllegalArgumentException.class) public void ctor_invalidFile() throws IOException { InputStream notAPem = new ByteArrayInputStream(new byte[0]); @@ -21,4 +34,193 @@ public void ctor_invalidFile() throws IOException { new PEMFileRSAPrivateKeySupplier(notAPem, null); fail("Should have thrown an IllegalArgumentException"); } + + /** Test PKCS#1 encrypted parsing */ + @Test + public void testSupplyKeyPKCS1() throws IOException { + + String pkcs1EncryptedPrivateKey = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs1EncryptedPrivateKeyStream = + new ByteArrayInputStream(pkcs1EncryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + String pkcs1DecryptedPrivateKey = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_decrypted_private_key.pem"), + StandardCharsets.UTF_8); + InputStream pkcs1DecryptedPrivateKeyStream = + new ByteArrayInputStream(pkcs1DecryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + Optional encryptedKey = + new PEMFileRSAPrivateKeySupplier(pkcs1EncryptedPrivateKeyStream, CORRECT_PASSPHRASE) + .supplyKey(); + assertTrue(encryptedKey.isPresent()); + assertTrue(encryptedKey.get() instanceof RSAPrivateKey); + + Optional decryptedKey = + new PEMFileRSAPrivateKeySupplier(pkcs1DecryptedPrivateKeyStream, null).supplyKey(); + assertTrue(decryptedKey.isPresent()); + assertTrue(decryptedKey.get() instanceof RSAPrivateKey); + + assertEquals(decryptedKey.get(), encryptedKey.get()); + } + + /** Test PKCS#8 encrypted parsing */ + @Test + public void testSupplyKeyPKCS8() throws IOException { + + String pkcs8EncryptedPrivateKey = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs8_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs8EncryptedPrivateKeyStream = + new ByteArrayInputStream(pkcs8EncryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + // When representing the same RSA private key, the decrypted key for PKCS#1 and PKCS#8 + // contains the same underlying key material like modulus, private exponent. Hence, PKCS#1 + // decrypted key is used + String pkcs8DecryptedPrivateKey = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_decrypted_private_key.pem"), + StandardCharsets.UTF_8); + InputStream pkcs8DecryptedPrivateKeyStream = + new ByteArrayInputStream(pkcs8DecryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + Optional encryptedKey = + new PEMFileRSAPrivateKeySupplier(pkcs8EncryptedPrivateKeyStream, CORRECT_PASSPHRASE) + .supplyKey(); + assertTrue(encryptedKey.isPresent()); + assertTrue(encryptedKey.get() instanceof RSAPrivateKey); + + Optional decryptedKey = + new PEMFileRSAPrivateKeySupplier(pkcs8DecryptedPrivateKeyStream, null).supplyKey(); + assertTrue(decryptedKey.isPresent()); + assertTrue(decryptedKey.get() instanceof RSAPrivateKey); + + assertEquals(decryptedKey.get(), encryptedKey.get()); + } + + /** Test PKCS#1 key with invalid passphrase */ + @Test() + public void testSupplyKeyPKCS1IncorrectPassphrase() { + + try { + String pkcs1EncryptedPrivateKey = + StreamUtils.toString( + new FileInputStream( + "src/test/resources/pkcs1_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs1EncryptedPrivateKeyStream = + new ByteArrayInputStream( + pkcs1EncryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + new PEMFileRSAPrivateKeySupplier(pkcs1EncryptedPrivateKeyStream, INCORRECT_PASSPHRASE); + } catch (Exception e) { + assertTrue(e instanceof IllegalArgumentException); + assertEquals("The provided passphrase is incorrect.", e.getMessage()); + } + } + + /** Test PKCS#8 key with invalid passphrase */ + @Test() + public void testSupplyKeyPKCS8IncorrectPassphrase() { + + try { + String pkcs8EncryptedPrivateKey = + StreamUtils.toString( + new FileInputStream( + "src/test/resources/pkcs8_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs8EncryptedPrivateKeyStream = + new ByteArrayInputStream( + pkcs8EncryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + new PEMFileRSAPrivateKeySupplier(pkcs8EncryptedPrivateKeyStream, INCORRECT_PASSPHRASE); + } catch (Exception e) { + assertTrue(e instanceof IllegalArgumentException); + assertEquals("The provided passphrase is incorrect.", e.getMessage()); + } + } + + /** Test PKCS#1 key with no passphrase */ + @Test() + public void testSupplyKeyPKCS1NoPassphrase() { + + try { + String pkcs1EncryptedPrivateKey = + StreamUtils.toString( + new FileInputStream( + "src/test/resources/pkcs1_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs1EncryptedPrivateKeyStream = + new ByteArrayInputStream( + pkcs1EncryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + new PEMFileRSAPrivateKeySupplier(pkcs1EncryptedPrivateKeyStream, null); + assert false : "The test should fail with IllegalArgumentException"; + } catch (Exception e) { + assertTrue(e instanceof IllegalArgumentException); + assertEquals("The provided passphrase is incorrect.", e.getMessage()); + } + } + + /** Test PKCS#8 key with no passphrase */ + @Test() + public void testSupplyKeyPKCS8NoPassphrase() { + + try { + String pkcs8EncryptedPrivateKey = + StreamUtils.toString( + new FileInputStream( + "src/test/resources/pkcs8_encrypted_private_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs8EncryptedPrivateKeyStream = + new ByteArrayInputStream( + pkcs8EncryptedPrivateKey.getBytes(StandardCharsets.UTF_8)); + + new PEMFileRSAPrivateKeySupplier(pkcs8EncryptedPrivateKeyStream, null); + assert false : "The test should fail with IllegalArgumentException"; + } catch (Exception e) { + assertTrue(e instanceof IllegalArgumentException); + assertEquals("The provided passphrase is incorrect.", e.getMessage()); + } + } + + /** Test failure with invalid key */ + @Test + public void testSupplyKeyIncorrectPEMFormat() { + try { + InputStream invalidInputStream = + new ByteArrayInputStream("invalid key data".getBytes()); + new PEMFileRSAPrivateKeySupplier(invalidInputStream, null); + } catch (Exception e) { + assertTrue(e instanceof IllegalArgumentException); + assertEquals("Private key must be in PEM format", e.getMessage()); + } + } + + /** Test failure with public key */ + @Test + public void testSupplyKeyPublicKey() { + try { + String pkcs1PublicKey = + StreamUtils.toString( + new FileInputStream("src/test/resources/pkcs1_public_key.pem"), + StandardCharsets.UTF_8); + + InputStream pkcs1PublicKeyStream = + new ByteArrayInputStream(pkcs1PublicKey.getBytes(StandardCharsets.UTF_8)); + new PEMFileRSAPrivateKeySupplier(pkcs1PublicKeyStream, null); + } catch (Exception e) { + assertTrue(e instanceof IllegalArgumentException); + assertEquals("Private key must be in PEM format", e.getMessage()); + } + } } diff --git a/bmc-common/src/test/resources/pkcs1_decrypted_private_key.pem b/bmc-common/src/test/resources/pkcs1_decrypted_private_key.pem new file mode 100644 index 00000000000..e4a66e032b1 --- /dev/null +++ b/bmc-common/src/test/resources/pkcs1_decrypted_private_key.pem @@ -0,0 +1,51 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIJKAIBAAKCAgEAva1oBuzswb28TDmaY1r6CE5QIv0d9ffk/5tmzEgF0hhVVz0h +geyc9zOP38IlkFbd9naQz5jfrYezByEY6+/tuPCzl76nrhcHgpxXsenenkhEGGVM +YHEFHvsfmetdbP/TFYfaxCdjP5rcmdI5vnBI7MYEhBqo+QWaF1fy4I4L8UMl1Kzq +h4bc4s4w9r2d+JDHS7uwZBY9iwRSD4ChJyzHGYBhnCNBmHz78F+hTlGrxLgGGouQ +XTxsGu1XUTUPqUgDXPRuD+plKtiJ10VADBsL/WQaIbJF7CoWWvZNDqd1kiBNDdUm +TfSw/VIIUjLuJpJIsZlnK3PY0/nA0FWBtK71YsKNM/QFSQ6VQ78tMd0BCPEaMxCH +aabsas8QZE4zteSKAJ5EigmggcjtiP63cZnpiijX6av6myULqz94+yD4qyTGWyiA +1JtqQACn6yBHhyUbs4y5/xTwGy9nFi0LI4IAmmFPquGOLG1Vsy6b9KCoq9HiCjPP +x+S28g76JDTC5cq2sU0lPJRGQfhIzUsDW7PfU0+rnUQRxi+rznMEsllj1uDQa1T6 +08IjVRyF93vl4ni0QOY7ZYLH1qiK2YSAbhQ34krHOc7bUbWy7MyNRF1l+jcmgbxc +eC9Y/FhKyoZT2FSYHlOG/P95osLGXKjkAQYljVTPIlD4+5ZNhWLyfzDwlAMCAwEA +AQKCAgASbuS6L5I+rdK70alIWJIN9pZhIBomSkYN9StDVQiDx2ubw8wa1UTX3UHx +K+v8oASILDOciS3LrnFekv/aBgIjQ/kgGR4wk/pd3hXDq4e/+CPt/wIyKSmnPh5v +FemJaz83S3GeOHmzt7gSltSXxk+/+up7cB/Vu46jECABZKyScMUfawKL0zZqMEGf +6QOOIXvMx1u4DlVCylOzP/vpU7exqcFSrDZ2vEa7sH97ngJEZuHo+IE6HmIfJ8uh +j7eK6v2wrex4TX4xcMPMkOVNh99da7oCZlHXRqvPgTox32JUpiD25C0JzGra43r9 +igeM5hB8ef0FwwdialYrqPOm/I3KNQcU3hqWR29GIAsZngohdI3jptx77uNZVWMh +cs+RZlNgz7wgBHQmlOnYA0PNbWU2a04FKBv2z2bhzo1v8PM18nJYRQDWxKCGpB/S +sK8MaHiVTLVhvHPILKkHsiVRZCJrP9C6B6rT5ZGCvlt+ObRY5CsTUa1CoiHrlBX5 +f47sXSxNe5UOWcE+VviWhJ6mo+lxkO0IKo6w85AB7F/quJytQNCtFGblcQ55c+p9 +CN48wEOTDCDY+aqbzrUhunPpOJpZE9/iEjRp76TPCXflEniN8DTYJKH1cAwkFJP/ +T16sJpWmcdFecnhtkwD1w4gWeNTeyVnbqSNOOgFksjD9ju4rwQKCAQEA/EUrcJn1 +DtlvsLHJF5jKMC6JoiYq7OV82t1xHqMXOumOsAaD3FgEk9/Kysra4wizTTgor6lJ +tM10q91JzUiMWISXZSNbibFBPkLDVMFdDhjm1wsV/F4pVKOilX/VXO5UaJEcDjhW +4HuBRPJEziSYBctIxYTFcLi9ZqyKTnwYf8xjiunzrn90ptAQFOv00V6gX5BWHAft +Gkwr5EYuf3R7pvdllQGvlq5eQiR6B6ml9WNvshJaBP3+Ziwg9N6GfdIGDfeicbU5 +bXnB5LSXAI4iy2xDTNFRv5m/Hd0OgmJj3JH8BgGGXdSNdLlG6MibpifLsQmp/eWh +yVpSusKpkKP34QKCAQEAwHtTbca3KIyeBaudyEVqqKtXkIo2MMA316Rizw6Kkcza +y0aD4fOYsqUegUQlKApywJh1xrFtR1ZSVWrLzLVE9NeAV7gpTeHcxMnFLVQJtlfS +FYUrqkFJ+9Xi9uKqvDYH+2XvUTDKzWN8zP6YQqLXr3i7DMHknOORd3wK8h33nSB1 +t4SkjI+H0CDGAW34hxi8fUlWXdMfX7H5cXLdYkJnbOXZSpsNQrulcW9Rqu3ph+zM +3+qeTUpJt1bI+imyBwpuIqVPAofNb/IoCmqkgVCR5MMxeU6IocQjRhT9MknSeVF1 +KlvFVs6u1M1tCJWB4FGywkDTujduU9vRCm9uux64YwKCAQASEI30yUGQJ6fk2kZR +J0LLQnnen6cRQbm4HoVcMUeXk2QBXOYSYEcro6ns7avQ+C2GyQ+4zIGXreK97+G6 +DojmSdBhkK+cY5INeFBugE4+lS/qlEOlx8Rj6DfbRsUrm3F173Y32nb2KkHugv7E +WEB+obj7U++ji8ccVByvVBmZBTTXnLszcrMSwvFz3hWw7HrFfRt9dF/ZMz0tYo0v +2VKFeU/P5MgDHUdoqx4F8HMO6Gj2MnQ5yUpvXJebkVfGKMUAOQxr4hNTsJVe4EOz +6Xm6YW1MUeztsH/MDqlcUtld0SJf97n8fB0JD79xKfRjaJQggFWo9cmpFou4DfqA +fg1hAoIBACTowSPAwih1Zmvh77ySixRS3tSpnCCXC14/eG8J88pnhOEL4Yg3ZOWE +wie5gIKAFmcWFSeHqFPQmrMkanYToGhu1n57ovf7QpE9u6Coh8A+cNuNkMTyBhTT +e9Upu+GhXsB3WH+yIoFl/W11uI62mTNdrEiS+ZqYDLHjyFmLI4suyUPqnH8TmtBv +KGjnxItrU+GWaYhOTqrT/ughRZBs+VYpcRRcTRupzdzFotxrCKf24YZif/6EK0SL +0LgfvLKa7mmYV2E910gLIGB2+JqPb5p1T4xaYdrbOIRcy/yTqVd4JkZ8GIg/08ic +p7bIrIHuSJ/1PGRt8qsD8L7WhV4+Us8CggEBALMw673Z2kj+ft0jUXjY1YcFmCQi +U6zPBpbqA7rtlnl07I7GExAnG3VnyuufJMrTFOZOk6Yt2+I6pkxzk4uWmwIeE4jX +FCIrz7HL1EwPKwK2ESCU1hXJvE4LqKF+KXFQJutICsjZoqm4RhduqaAd6SCwqlaw +mAGO8yqpNbJQ0596ndUgD1ZbsNlPsaKsh97LGWQkXCp0qeuJZHZxrr0U1XXtgm/Q +eanqMO50mpuKPpqOZj2V2rjRBKPGSnBNJlPkGpPcZobdT0bGPSprE7JG83VHbfQw +00qRq6FJtBTYsSaEl15ouUtV7MpLYLw0zupKJ/Op+UGDljJt+ildR2lUuDI= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/pkcs1_encrypted_private_key.pem b/bmc-common/src/test/resources/pkcs1_encrypted_private_key.pem new file mode 100644 index 00000000000..158704ce353 --- /dev/null +++ b/bmc-common/src/test/resources/pkcs1_encrypted_private_key.pem @@ -0,0 +1,53 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-128-CBC,2CC0688F9F2864D594B1798D14CEEF38 +FR5MHEwbfC+0o+3v9fU7VVoGKpnBSC1ly7g3SbLd2fRkikqYQ/ITvLfloHC7JUvI +DjcV2tnoG2iMUq7N0duzaMkT1csolpX2pJ8U6yBX+FCvf9QK5eBox5cSeT9rkkqn +X6JeMulCEOz5kGb8tTQHlbEbyg8QeE1CjSteOfCuNnzupe40vDV3/393/gEguvou +gYHsEhUOlaQxudho6YEwPv4lK0eHRr7kndRLiQlD0GlbNalkJuzbRZfEiEa7kU68 +M6icHDLM/6sp5Rh+izvFQFAOa0zNaBBpW3Q4R8ITjZzi4e5vDkUjksuV+qqe05xd +nU2hDg8eCi+FlG6C0JmUDHtnd5IjmqqWRnm81qnTrauBSk8Be4FkGSsKkUZXGVJn +4lAsOAjPwEpcQN9l9wNBtQyBb8mOCnQY8kS5MukKZsy1TTXzGf/qHIMJBQgKwv5K +WHfjrHXqVchyyVj9KYF8mZ80levL2zEi3r5pa6g/U9JkcQwhfcc+F0IGWAPnLAfK +7ECmgVWRmHUIsY9AHOv3POjgxn+jDM0D7Nj+t1+07N1RPQhz3lLlT4rtWKsABoy+ +mAfvlID16UAFeRjjt4ix1ungZ9iTD1DShu7rW4HCDnMkxoKz7zt5i2l1BA38t/8h +OhXdUEyM1xsczoKaNPSYaufDnaOZR5UZx8h3zGvS4f8YQ1zY9WslcWDnk0Qmk/T3 +FyRbgMk8AzP8jZ9dKxTrADi+wIOZcewHDTP48UaFTCRfpz8lLe2mqeEs+dv8APHL +z/tskk/aC2iBTcUdml8Qmju3fX2JBCIsayo0bXLDzhY1RH/CVnBpWBLUY2dq5pFn +cY7eR8JCbt/ISXd65M1lLYA0dwjXPoNdepvYdjwinAwVFjGzGhbDVThvXVQpsqUM +zWK0iRb1KXxZsnzOaoqypOuP3qtrKehjl0s/XL9S3jSBm/gYFuLKfmo9+T7YWyHL +hDbBQU5fV8ZoVr9HblPisJaKnVNDiZ9VBzNlFdxluYmqpcBlZRAHpn65gVeXqeeW +Y1puA/g5Qv1CVopPfZJF4Oa+49mM4pz06ghkp3s8Cf3xJWHekGJe8skNHtV4zqzM +e6wWktOuY9t7s12kLh2n007QaE9DHm5oWBsitbX1Y6VWESWr2TtTV0rPyYxw3ZhS +dPqgY9YVDQRiE7lOmZA73CnbimC6O4+U1TR7kuM4rtYChQVSiLIm5Soxp6w0G725 +Atrm5LkSxrHB96UQPTz+/hvIQY+JgaeuYvy+8n6M8CPoLHTqlcAgt29a+6uBHWsd +xP5FctUjR78Yujoef6ODOtNNXzlVn3cpQP7TPP9WkP9tifvXrkElmUny4MRpBe7l +FcejpsFwbk63md4GUpy0n0zCx+4kwMXYenmM7EoiOVoh7hkGcJCtu11lMbX0iif5 +OdfszcNmSvA28G3B9LP5KIv2FkvhY6mhPtfSZkDmiGWS6rJ0ZFDxX3+lWbzrrOlu +h+jm0r8JUiWBX2qX59mXqimlLzSOnCUvOK5cyEUKlmnKIKKuzzYwqafh9+LrbiW0 +XncuMZIZt2qhlQQoc4PWTalz3SSP+iHi4ZaP0BiCPS6i3LLZD5V9e1A3TuevldAY +Be3PDb99oAJ7RBjBCVU7Tcf92gb+rrlVHr6E3DpEzvTEAh7eYGT9Xd0sjU0k8VkL +I+VjdiKyzghAele8soNlPHZGmEnNNEceC+21IrRYFYdmwpHknVfJOZwBl+WR8B9q +zVsmG5fCg55cRBh9h+hbNWe/uvh4l5IZd6NoKg3fymz5Ns4oTNtTfy93WHpjVvwi +nbDNbDb9j6Ah0QlSjkxm/H3FdtrWl3J5ov534117+oUzgUfMecufSeaL0WnkiR2m +CTaChm9Zw41716u8nSuVnEcaxkBLZ28Z5pjBcLpgykwTHr3PGY9Rb4UxLTqdxFs2 +vhmHjWaOLsbnqlZ0DqfiKUh9XBqiI7ZHh/bTQ0y9vAgOQlWNSLOLWcJd8mENl/Z/ +J3jMLq6OwW2BKPm4nGOlPIL0PqtEbjQ/KqgFT5Xu3vFLQnSzXOlxB1RXaH9P57rw +b+zmKB9bKuHmmSuFiBoHhgHGAsRhO7KOHKWyvYsAXyAJEYW6UbJ9adw9XTmXgIfn +FlRICh8Re0gDCvBBJBS1BSDpJIfPgXH4UyfznulbkUFL321QOWpMipAm5/BPBD1G +aQlAG/RsWmSNPI49olla3mpoky+Ku0LlKwmHTE5eRGNJ0+7wD5RI/j4g2RcPiqiv +Giu7CIX9f50ee0hzHFOp5Gx1MW7D1ZUADzel6Ea+A5/Dcr/GZUq6gsQ4M0Oodfng +iqJ3uEH8eTGEmnJtTuXLsdQRCHmz7L8QttrmM23BQazCaDhZtNq0R8mKQLXqRoSq +00rIay7xDwER3LElYHfbXMe0Hfv005uCfu54eeutBNVlIs5Nigqy6nBDraPrgEjQ +LCiNVpryAul/kpmmRGW8qFnDacOIFrfdmxHehCFvRl9sWyXflVIOFe4KGC47HyMJ +sDBaQvP3tRmiqr6yK7CGuTwQ5Tu8RaMktkWHNWkdTJDKji6JP8wkV9msjwM8wIvv +NxcTQEdppTGcCnpbA1DidEVJYG/mkmQwXABZku3eZ4u1IKS9wsBizYBwBHzt9b/n +2zP2eNlX1y+CVHw1dKhcZ7OFlE3idFyJ9BFmsasVr9K1/3vtLWxD3K9mPwzY84cw +0f9MQBY+s9DxrB1zerk1/ml6x+K//qahcqmiMPE7HQaA+AApWMrOnOlo78DnedEl +pLzb1vcYb/ZyJtN3ooZayI6Bz1TIywKVhg6EoFKrJ7JPK0SrxKZ+e36fbDSxLBcQ +H2YH/Flhm4RgM4laePqZdDouon0DapnIWFtM25nCT5zDnmoWh1O6HTAsvaOqunPy +N19PGfOSB+D9Qb7nJoikEJxYqNKXLEs+GcPK4pfJpoQ5cwqtMLYip0vbzix0guDI +OrzDxzhbs9CythnDkqClr2bnu/6WVbPlP2sBuJ8MzKCq2rpB6z9DjNp0M6E2clQD +PBTKva3vclDCe0eAFHxkyqtxnv3/nyFaiwThIYL+/FObFuXFVOxZnOlB48ATMmoV +eOc/51SX0KMMptitnOJ87Q24YIq4de7OaYe/UVR9qVe7sZiG1jABkzBgKhFMNiH7 +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/pkcs1_private_key.pem b/bmc-common/src/test/resources/pkcs1_private_key.pem new file mode 100644 index 00000000000..e250770abca --- /dev/null +++ b/bmc-common/src/test/resources/pkcs1_private_key.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAyGbtU5pXRY/35yZHR270qzWKIOx1N0SXIs2wDWASFtEejm7s +/XayXm71T+KZab6Qk+zmbP3+iBAwwg2D4wZInqso6lZqvRPrAR3lXUgeOpnZVKdz +s9FAGpMBlNKs3EVxS2rqD4X8V4P/YQxa8nnBSmTYHDgulYYHsDD9yFOzERa/NM4V +pp5Y0ArFn2GTG1lm+S0L1YUTqea3LHlyCKXXYraz7eUMn4pOBypO0M7vKx59kQBg +0KaeMXsd4nWes+sMoSHlYamImbwH0YwK0eNRLpKj/1pFNHQGCUjescQjTU5TJnan +f9/IOa/gLTXL17KZGSU64IW1IN9J53+aTfz2eQIDAQABAoIBACwRcjPVt0Y9O/Lx +GHCNZjE2A0ttI/OE2kVVfNbcHu40iycgHm44SU350WkBN+IofSuCR0OFcRDjmo05 +opxsN9Doa4Vofm1YsW9b7yGdp8QUK9XxQsCyjYmqdQkQcOG5RYojlxfVy2FFTgW9 +zUwP2SDuXxWJhzjrMcqdY1lHipOBjHQnicfFsDkbByuYf3BS0LKtDcgVkrdsAhJY +xbkfnvSj6eXsEW7aPl/z9qSFCzhMhAjBEaZ1tSS4ovJQt3rRrbtvAr+LXZzW+b/N +EfbysA216dTtAYNbAnISfbMSqP8IjzCudVDw/EXfEN9Te3NYh63p06g5/eVGYBST +8UxI5nkCgYEA+U9p3Eq/s/QXrhkktei3/sCMYFTt9g+4VqfRCBOgcU9ai5GZiU7V +QnQ5JZsyG7dX7/IPbUlEFrtXhr9NF8WQkDbPHSSkkzNp7a0puvK3MtIREQ+0UQGi +DVoyPGy680c7l/KGhGv6uyjQFUAG0Wd/k7PXLbt25Zyf4/NIBBVS2jUCgYEAzceM +fsqOIW4WEEHBkPx7iOXBiIg/vXT4qPg2ehsnRcJOmnWAijM3bQoRSyoyOPA9q4DZ +DVR302t8Gnbkmk03lGKi5IstWadcS/2giHvoHFRIPcDxGFB54qNLZVJX41EtOMBt +ehpz+RxuqTIC2T29/nyXxN0fHYwcsxxoJ5gz07UCgYEAmYuibC2RUdiUuQH9TRfu +MjUOf8nu4OwfoScsI2hLGV5BKtJamGl4CLyh8Zpayx0pSLtxauKDz+hD6NZrOafQ ++DD5cD6AKbSxmdNbbytLTz53imV8raNu1gBmDjb9ERYfCt8wn+ANBTYGqf/L8y5m +MWbCsQTTHmlPREoyYWlspL0CgYAnt3EFc8DU8PNvNdHPUvvg4z9kQ6/RuEbaDfYt +wRnmW+dh5nXltpbnA79su3swBCZS+K5r5TavZppwXSwoH+kvSY5ZAAfDuwqUXCJk +1U1qUlYTHS8rWzT7Kjs+FhOCe0N4JaO7omlp1jQBkfZ8yW7nNFLymx8LS+SqKTxt +D/JI1QKBgDgmWkgB1d/wcclscsnG2yA3sXqeH7A/mVJHj+ROiv1r1rtUEMia+xuL +IHE7ajXYsZVNdwq1O4pxARBOY6dhl02d195+dGJITJYULso5QOqCp5jSphAjVWhB ++Y/sKWdICYP4hClLdQoNMyuCnz2Mn/BmuUVeTij9UR4azWtmprlG +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/pkcs1_public_key.pem b/bmc-common/src/test/resources/pkcs1_public_key.pem new file mode 100644 index 00000000000..f4119a7be60 --- /dev/null +++ b/bmc-common/src/test/resources/pkcs1_public_key.pem @@ -0,0 +1,13 @@ +-----BEGIN RSA PUBLIC KEY----- +MIICCgKCAgEAva1oBuzswb28TDmaY1r6CE5QIv0d9ffk/5tmzEgF0hhVVz0hgeyc +9zOP38IlkFbd9naQz5jfrYezByEY6+/tuPCzl76nrhcHgpxXsenenkhEGGVMYHEF +HvsfmetdbP/TFYfaxCdjP5rcmdI5vnBI7MYEhBqo+QWaF1fy4I4L8UMl1Kzqh4bc +4s4w9r2d+JDHS7uwZBY9iwRSD4ChJyzHGYBhnCNBmHz78F+hTlGrxLgGGouQXTxs +Gu1XUTUPqUgDXPRuD+plKtiJ10VADBsL/WQaIbJF7CoWWvZNDqd1kiBNDdUmTfSw +/VIIUjLuJpJIsZlnK3PY0/nA0FWBtK71YsKNM/QFSQ6VQ78tMd0BCPEaMxCHaabs +as8QZE4zteSKAJ5EigmggcjtiP63cZnpiijX6av6myULqz94+yD4qyTGWyiA1Jtq +QACn6yBHhyUbs4y5/xTwGy9nFi0LI4IAmmFPquGOLG1Vsy6b9KCoq9HiCjPPx+S2 +8g76JDTC5cq2sU0lPJRGQfhIzUsDW7PfU0+rnUQRxi+rznMEsllj1uDQa1T608Ij +VRyF93vl4ni0QOY7ZYLH1qiK2YSAbhQ34krHOc7bUbWy7MyNRF1l+jcmgbxceC9Y +/FhKyoZT2FSYHlOG/P95osLGXKjkAQYljVTPIlD4+5ZNhWLyfzDwlAMCAwEAAQ== +-----END RSA PUBLIC KEY----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/pkcs8_encrypted_private_key.pem b/bmc-common/src/test/resources/pkcs8_encrypted_private_key.pem new file mode 100644 index 00000000000..05e0621c78b --- /dev/null +++ b/bmc-common/src/test/resources/pkcs8_encrypted_private_key.pem @@ -0,0 +1,54 @@ +-----BEGIN ENCRYPTED PRIVATE KEY----- +MIIJrTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIRZpyCAQQR8oCAggA +MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBC8h4heO8aR5NaJq5o89myBBIIJ +UDo2+MIuXH+y+hB9fx1kVe7yIogh0DEeYTnTLAraeg2yudSoNLq4xF2Ftid7Ax9Q +6BwdrY6YB8/Pk9vn7gWBoTdrfUpJZZu6DtLu7URXPTN5mgRNmJzC4uAv9y+T8CRv +sLXjwYOSbF4Vsbm8JlgJPuKPKkH1lTi3t1jxik+nNrDyAXRJOYfowkW9xnGqNSxq +GEFXN1S16msrEq+chTblSpn8liY6o2Yk405qJ2G+dz/Lv50vOjoc1GTh8vNw23ER +HckRiRS8TY/sjyVtI6tZp+30azbMcXgLEHFoMDIm/bu366/aYyRI2fI76LWJUuHA +ZmU8GYU8j0+IewLPgtAXkjkTMuvrucHgCH3/ZRDDqFI+YTj3q19r4xmPGRWoxp/c +2Oex3HfUCutLonof+89I5OGfvlnaESaQcSzLJSzPV6qXGMMTFVZ6G2ZW1gfaJGC1 +VwyL2k7Ejg8ncnOPKsf27oCFOflDLvfVQc/iW/XXZfFkGpO3xgoBE1CYq9y1w4VZ +gzbi88AwIV2oJTqUQkNFkDMYwPnCj/D4BAT1ipysMA3Q9gs4+EnfD9nMevtef9dR +wYaPNcnC/dy3Soacqm6VPOQ9RP77BIMNAQKlE95lsB++DXhPs3uDyxavar0pnJn2 +nBfPxRGbJeVc9hxyxzQtosgkrVIIt/0nEUigTukYCESpvJAd1vsupbi6v/FGXvzg +4aU2aGTYUWcPbsi4kZUQH8ysmaPAC4QmHBPumzmeA+k4LxUaGJaWwYxCqD+WBCye +D1w1utaFTjG+HSwIqGvVTxMXZswm3Tw8+bAu5UpPeIpXejWa06duCxDkvncpOW04 +En3hJuPTBEMxzCVIlYjk3Z7bNtjOayJRqxrHlY0OkHoy8BXRSN6f9O84go8S2qie +MmchFTarLfG7dir9SyDJdH2bTephRdGV3nmPLX/xza3ES4JmyHEOmYxbgqnSXsSG +8RZQ7Cg5tQVDHf1ydgyfqJ/lcG3SaehKHVuUR/Ulv8u5WpAYoxr1aGWafUtFYSoC +g/RF6E9gEbrcl/KnnPEcG5jI+86BeEsfVkpjqsh10lHG008oyeI92nXzYvZv76+d +9bshKT6qERGlA+2HYvZkNMtuwh0eUlq0sHCKQW3D7PTerfok3EP5ohiHwIZ0cME6 +Jq8Dz4ORGFFAdYi86NhCkW7s4nXtP1utppaZBeZLF7nxk0XYIb3NP+a/Ll9eQQSe +WNDdv/387J++PzpygviGmZfF3rBl253cbPX/nhhNAOiPajdN2q3qDTpAnZpE3G+v +t9OnNFtgmYZ0SEOMxo8T3kMVnmUhP3OsVoWcwcqIOjwPXmwCL8c4Dju8sxfZyCQh +rRGKsbJyON+UTXA07rpH1JzqmWSQDiir75JBsLlX56yKIzKe86CWDlohbyykVkPs +vT0qTgpSvkU8N3jErjZUJsIk29uMFVcVjvR1GmMiCOIG7jZ+KefjXx43JFl6Av4w +fjdfaMb2J2/jd9suBhGDpakftZl57Qhz/FN8yDONmetJMcum5+dwxnbB9hCP7fpJ +T5tnE/w0KNFJEtXeylOHlU225czr4+gdsj+ncKiTEwIm0htulrDDgKsN74EXPcor +ywEpc3oZZMFF8084g6j0rjAnLO/fgtf0nXfMGDGUfIGo9AJFqoYKKMu5u5vQ+XY0 +cc93QAB1lJ1a8yyRwfUoLHNbq2AJ9NMw1sNvkRV26dpk7ecZ8LgoUdizbztz5vb2 +6VfArHvT1pZEdjgPwsQnegu4i4/ELXZWTZu2hfIM/aTgP9avAQmQDiKEnOnOQZ/3 +QyFEFo5qFfH4wUKbLoQXVWslIyz7bRd+F26GoJTLPOHkPAZZ3UCCzVUHwCzc78eO +o9V4wgfVNFNkdyXi81X97v0bKKbkxfanz0+kBSDmeOUOKTDmyFOmhbC5SKLBF3k/ +gNHR6BzCET7ReGZ+qIVF10Oy6SzP7M/Fmt1TU2y58CoiM3pKPDUzDYX47NCoUU6c +S8iberxh1O4mMxDNfwQmFzXe8cst8JGBxWX2O+Oqvl9EpGojWGXY9ydut//nDRPv +sQyMngcK9KLAG8/JL4hp8plKee+JtNzelCHzbjObE18waF3cveKns8WaumqpgzyT +2nX0vct0UxBeynIefaMEwT4WbsFXu/iMrRQpsrQmxlq3LLiet5lj3UdE9EiBvQox +FftQdOR8t36zNzCDnHmPzmrxggiKEjDw6BFN4sV+jm6SZWzAlypplzBHGfexYS8t +4taG0Z6lXev9xYgAcTFZrNJRVQ18c8/8W2V+LMB86LNTG7IKa8Cbo4FMPFGQhlAZ +n3URL2jaV7Cf2tTuHq0IT4Sv4/dx/Cttx8qdFjGbTt3ILCpUsh9KjxTEjteA6Ydu +e8lYsU8C5E3mdldojkie8iZHFSjrwRuk4EyUGXRoMe900CDHXmNQ3g6Cb2cE3AgM +RQvCLTQgDpQe6WJ4/HFMRXtCE3dX6P46E1968MYlgn4RAmYel1HPIh/8oWaLmwxX +IPEO/kxjybWkrvRDw8tQxVbR8D3sdurmYuMid2EpzI1OFLPp08JcpHn+9LyvBEw9 +9w8ngP260HSt0rckOCyRm+JWmFRmql6LRwdWl0ht1yTASDn1+/BkQm9JfOyjMxlE +mXFdCHL8EK0+xcYn1IMypP0oG7TA0o1BK+vsmDoEO1pT3Qh4pTA2lFAoshWR9YBP +ZMW2Pyscia5+wkRuL06yAujyJP5OOmHnLp9uni8tpo4OtSqt4DRCYLM9hsB2zL6Y +3WvgavGznflve604cZ1jkJFkzg74WgwdXXn9XrI9OoEJm84avdQIdK2WlOiA5md5 +lMfyMVZtCZLh/6KpC8jB4t0FlOGdoQxubslWDXcJwhPFO0KvdNv+6TeWjt8ZBECI +zRMq+jAR6yLN0gld3y4YI37cll6kr6wNYBd0NoL7Bzl/WtPn8MJTrwcRpohNqQkJ +8MOrqL14yRDvPtQ2Rijzztnd3Vb9EL0Zgkrwh9uD1ZTVDyHWHnmwW7LeBOi0/vD3 +k/bi3qVGEqAc5YkCZbydMfzw0W506WsEMlysfbAhTEx+w/IV31mfD4VwpZ+ueSyE +crFUOhrrE+9a34z2mSDke3Hte1pvjhIIH6B30mjFyQh3sOoouwl9PkvbuUo8Q7v2 +ojIAhmdgVMd19lfA+ihPnmalOtR7hCwdrjoHR3N5A+Ng +-----END ENCRYPTED PRIVATE KEY----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/regions.json b/bmc-common/src/test/resources/regions.json index 22966c3ee42..775b0e6e666 100644 --- a/bmc-common/src/test/resources/regions.json +++ b/bmc-common/src/test/resources/regions.json @@ -400,5 +400,17 @@ "realmKey": "oc24", "regionIdentifier": "eu-crissier-1", "realmDomainComponent": "oraclecloud24.com" + }, + { + "regionKey": "ebb", + "realmKey": "oc23", + "regionIdentifier": "us-somerset-1", + "realmDomainComponent": "oraclecloud23.com" + }, + { + "regionKey": "ebl", + "realmKey": "oc23", + "regionIdentifier": "us-thames-1", + "realmDomainComponent": "oraclecloud23.com" } ] \ No newline at end of file diff --git a/bmc-common/src/test/resources/x509_cert.pem b/bmc-common/src/test/resources/x509_cert.pem new file mode 100644 index 00000000000..b25c65f9f46 --- /dev/null +++ b/bmc-common/src/test/resources/x509_cert.pem @@ -0,0 +1,48 @@ +-----BEGIN CERTIFICATE----- +MIIIjzCCBnegAwIBAgIRAL+BJW9R99shTiX8rgy5ixkwDQYJKoZIhvcNAQELBQAw +gakxczBxBgNVBAsTam9wYy1kZXZpY2U6YjE6ZTE6N2I6OWQ6MDI6YjI6YmY6MmE6 +NDM6ZGI6NDE6NDI6ZmU6MzI6Y2U6NzI6MjQ6MjY6NzI6Mzk6ODQ6ZjI6ZTE6YmQ6 +ZWM6MTU6YTU6NTc6ZTE6YzQ6NzE6OWExMjAwBgNVBAMTKVBLSVNWQyBJZGVudGl0 +eSBJbnRlcm1lZGlhdGUgdXMtYXNoYnVybi0xMB4XDTIxMDgyNjA4NTEyMVoXDTIx +MDgyNjEwNTIyMVowggG4MVwwWgYDVQQDE1NvY2lkMS5pbnN0YW5jZS5vYzEuaWFk +LmFudXdjbGp0NDZjbGRkeWM3N3Q3cGpzeHFxdXF3aHBuZG03YnJ1YXlmd2U2M2Zk +cmRldW80Y2VvazRwYTEeMBwGA1UECxMVb3BjLWNlcnR0eXBlOmluc3RhbmNlMWgw +ZgYDVQQLE19vcGMtY29tcGFydG1lbnQ6b2NpZDEudGVuYW5jeS5vYzEuLmFhYWFh +YWFhazdxc2o2bHRmd2VrNWN4bDZ4cHR6bmFucjJrdDdmeHJiaG83ZGkzdmNoYWY2 +bTVhcHhlcTFpMGcGA1UECxNgb3BjLWluc3RhbmNlOm9jaWQxLmluc3RhbmNlLm9j +MS5pYWQuYW51d2NsanQ0NmNsZGR5Yzc3dDdwanN4cXF1cXdocG5kbTdicnVheWZ3 +ZTYzZmRyZGV1bzRjZW9rNHBhMWMwYQYDVQQLE1pvcGMtdGVuYW50Om9jaWQxLnRl +bmFuY3kub2MxLi5hYWFhYWFhYWs3cXNqNmx0ZndlazVjeGw2eHB0em5hbnIya3Q3 +ZnhyYmhvN2RpM3ZjaGFmNm01YXB4ZXEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDIZu1TmldFj/fnJkdHbvSrNYog7HU3RJcizbANYBIW0R6Obuz9drJe +bvVP4plpvpCT7OZs/f6IEDDCDYPjBkieqyjqVmq9E+sBHeVdSB46mdlUp3Oz0UAa +kwGU0qzcRXFLauoPhfxXg/9hDFryecFKZNgcOC6VhgewMP3IU7MRFr80zhWmnljQ +CsWfYZMbWWb5LQvVhROp5rcseXIIpdditrPt5Qyfik4HKk7Qzu8rHn2RAGDQpp4x +ex3idZ6z6wyhIeVhqYiZvAfRjArR41EukqP/WkU0dAYJSN6xxCNNTlMmdqd/38g5 +r+AtNcvXspkZJTrghbUg30nnf5pN/PZ5AgMBAAGjggKeMIICmjATBgNVHSUEDDAK +BggrBgEFBQcDAjAfBgNVHSMEGDAWgBQZRwALJM1N39lEfG3qlYsy0uOYhzCCAmAG +CSsGAQQBb2IKAQSCAlEwggJNgQhpbnN0YW5jZYJTb2NpZDEuaW5zdGFuY2Uub2Mx +LmlhZC5hbnV3Y2xqdDQ2Y2xkZHljNzd0N3Bqc3hxcXVxd2hwbmRtN2JydWF5Zndl +NjNmZHJkZXVvNGNlb2s0cGGDT29jaWQxLnRlbmFuY3kub2MxLi5hYWFhYWFhYWs3 +cXNqNmx0ZndlazVjeGw2eHB0em5hbnIya3Q3ZnhyYmhvN2RpM3ZjaGFmNm01YXB4 +ZXGET29jaWQxLnRlbmFuY3kub2MxLi5hYWFhYWFhYWs3cXNqNmx0ZndlazVjeGw2 +eHB0em5hbnIya3Q3ZnhyYmhvN2RpM3ZjaGFmNm01YXB4ZXGFggFIQVFFQ0FSK0xD +QUFBQUFBQUFBQ05rTUZxd3pBTWhtR1BJdkF0NlNMSDNiS2NSamNHM1dFZHBPelFX +N0NWWW5EdFlUc0ZyL1RkRjZkMDlMaVQ0UHNsZlVoM0ovZ2lIN1N6MEdJQjYvQXhH +dlBtaVFibkQ5dCtINkNOZnFScjhrcUR0cVF1d2RDYk1DWHFscDJBTTBTR0RkdjRY +aG9xTTY0WnNpZFdNWHp4MUVkU3F3UXRpQWtLSmg2bWdsbmg1bjZ0eUVZZGt6UnVW +SUg4VVV1Nmwwb2Z0VEhwV2M5NElkMmhndUkvcG8zOU0zRnhOZkdLWTFrMUpUWmJG +SzJvVzE0dmxyamNWWEF1b0RQai90TzdiL0pSMDN4UTN2c2VuTzMwRDYzdEtzV01n +UmVJajNuZzhwZ3VoVWczRHp2L0FwcmRZUzVaQVFBQTANBgkqhkiG9w0BAQsFAAOC +AgEAT/kM7khGYVItEdY+gLTR5LjWbePq+LWQcHjzn5Lm3XDRD3jWLqgaIo27Zdyl +luGVjDdw2ZYxLZnublzjAbfVik6ykKFV2JgxXwvn+jhT8vkpD8ceW84W4awMtGfK +l+YRctrVrK8H0EIDK8JH3UfLmEQr2PFhMYW7xBic6zMUlhPU7apZf6RA/Rxk3EmU +niHcvxxDIwisUfFq5gfVzrmJ525do70It9/87+o6/bTqqoDHItwjU1foM8YCp2mS +F8y10jK2CwAb4792ovu282lO0jUpc/JAjR2c5Z7LKMb2xWJ4pPLPhJF9uDFLW3+4 +b+/sFLs8WrmvrE1eUzfr0O1JogIDiDu0pkkYeqPEYSnlCjCpg9/zzhKjHztVV6yf +AiR+SfHr3Zuk9cLjYBBLKtYDu97VkkwEr5geKsXNe6cKYRx/1FONnkGA0dWE2t+v +7I1aZVPvPB0XyOgdrhEOuqCMV3RPl+fsAjLpG0lOHculnjnZ6eHpErJC7BgHW0vJ +ZIsNayyx8hMVx4eD/5yNClAkdLmvT64r7KKGmoNDfYVINXHwELvwwf+NIbKAaf7p +Dps1CWVfTgX2CTRVRVFfPTb69E+ae/3kHg/MCECKyJt/hq+LNew0/0EviS4Cz3mV +raG3+sOHawPomtQQc8WrW3ubu7b8ggjkmBP21mHW+Mc6Lp0= +-----END CERTIFICATE----- \ No newline at end of file diff --git a/bmc-common/src/test/resources/x509_public_key.pem b/bmc-common/src/test/resources/x509_public_key.pem new file mode 100644 index 00000000000..1087f227d14 --- /dev/null +++ b/bmc-common/src/test/resources/x509_public_key.pem @@ -0,0 +1,14 @@ +-----BEGIN PUBLIC KEY----- +MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAva1oBuzswb28TDmaY1r6 +CE5QIv0d9ffk/5tmzEgF0hhVVz0hgeyc9zOP38IlkFbd9naQz5jfrYezByEY6+/t +uPCzl76nrhcHgpxXsenenkhEGGVMYHEFHvsfmetdbP/TFYfaxCdjP5rcmdI5vnBI +7MYEhBqo+QWaF1fy4I4L8UMl1Kzqh4bc4s4w9r2d+JDHS7uwZBY9iwRSD4ChJyzH +GYBhnCNBmHz78F+hTlGrxLgGGouQXTxsGu1XUTUPqUgDXPRuD+plKtiJ10VADBsL +/WQaIbJF7CoWWvZNDqd1kiBNDdUmTfSw/VIIUjLuJpJIsZlnK3PY0/nA0FWBtK71 +YsKNM/QFSQ6VQ78tMd0BCPEaMxCHaabsas8QZE4zteSKAJ5EigmggcjtiP63cZnp +iijX6av6myULqz94+yD4qyTGWyiA1JtqQACn6yBHhyUbs4y5/xTwGy9nFi0LI4IA +mmFPquGOLG1Vsy6b9KCoq9HiCjPPx+S28g76JDTC5cq2sU0lPJRGQfhIzUsDW7Pf +U0+rnUQRxi+rznMEsllj1uDQa1T608IjVRyF93vl4ni0QOY7ZYLH1qiK2YSAbhQ3 +4krHOc7bUbWy7MyNRF1l+jcmgbxceC9Y/FhKyoZT2FSYHlOG/P95osLGXKjkAQYl +jVTPIlD4+5ZNhWLyfzDwlAMCAwEAAQ== +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/bmc-computecloudatcustomer/pom.xml b/bmc-computecloudatcustomer/pom.xml index c186f256710..aea91f8aa23 100644 --- a/bmc-computecloudatcustomer/pom.xml +++ b/bmc-computecloudatcustomer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-computecloudatcustomer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-computeinstanceagent/pom.xml b/bmc-computeinstanceagent/pom.xml index f20cecf5e08..e553f042ea8 100644 --- a/bmc-computeinstanceagent/pom.xml +++ b/bmc-computeinstanceagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-computeinstanceagent @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-containerengine/pom.xml b/bmc-containerengine/pom.xml index 1d740d52127..f33ae5e825b 100644 --- a/bmc-containerengine/pom.xml +++ b/bmc-containerengine/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-containerinstances/pom.xml b/bmc-containerinstances/pom.xml index 232ed5232bf..4874c704aa4 100644 --- a/bmc-containerinstances/pom.xml +++ b/bmc-containerinstances/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-containerinstances @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-core/pom.xml b/bmc-core/pom.xml index 6083d8f4887..b65e73fa6a4 100644 --- a/bmc-core/pom.xml +++ b/bmc-core/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-workrequests - 3.50.0 + 3.50.1 diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java index 3648effb1a4..d6366add9a1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/Compute.java @@ -1279,6 +1279,11 @@ GetWindowsInstanceInitialCredentialsResponse getWindowsInstanceInitialCredential * #getAppCatalogListingResourceVersion(GetAppCatalogListingResourceVersionRequest) * getAppCatalogListingResourceVersion}. * + *

When launching an instance, you may provide the `securityAttributes` parameter in {@link + * LaunchInstanceDetails} to manage security attributes via the instance, or in the embedded + * {@link CreateVnicDetails} to manage security attributes via the VNIC directly, but not both. + * Providing `securityAttributes` in both locations will return a 400 Bad Request response. + * *

To determine whether capacity is available for a specific shape before you create an * instance, use the {@link #createComputeCapacityReport(CreateComputeCapacityReportRequest) * createComputeCapacityReport} operation. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java index b5b75db0e29..20019e0f076 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/ComputeAsync.java @@ -1287,6 +1287,11 @@ java.util.concurrent.Future instanceAction( * #getAppCatalogListingResourceVersion(GetAppCatalogListingResourceVersionRequest, Consumer, * Consumer) getAppCatalogListingResourceVersion}. * + *

When launching an instance, you may provide the `securityAttributes` parameter in {@link + * LaunchInstanceDetails} to manage security attributes via the instance, or in the embedded + * {@link CreateVnicDetails} to manage security attributes via the VNIC directly, but not both. + * Providing `securityAttributes` in both locations will return a 400 Bad Request response. + * *

To determine whether capacity is available for a specific shape before you create an * instance, use the {@link #createComputeCapacityReport(CreateComputeCapacityReportRequest, * Consumer, Consumer) createComputeCapacityReport} operation. diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java index 93e28276515..dc4b9f21f3c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetwork.java @@ -137,7 +137,8 @@ AddDrgRouteDistributionStatementsResponse addDrgRouteDistributionStatements( AddIpv6VcnCidrResponse addIpv6VcnCidr(AddIpv6VcnCidrRequest request); /** - * Adds one or more security rules to the specified network security group. + * Adds up to 25 security rules to the specified network security group. Adding more than 25 + * rules requires multiple operations. * * @param request The request object containing the details to send * @return A response object containing details about the completed operation @@ -1359,6 +1360,9 @@ CreateRemotePeeringConnectionResponse createRemotePeeringConnection( * is provided. It does not have to be unique, and you can change it. Avoid entering * confidential information. * + *

Use the {@link #listServices(ListServicesRequest) listServices} operation to find service + * CIDR labels available in the region. + * * @param request The request object containing the details to send * @return A response object containing details about the completed operation * @throws BmcException when an error occurs. This operation will not retry by default, users @@ -4016,8 +4020,8 @@ ListVirtualCircuitAssociatedTunnelsResponse listVirtualCircuitAssociatedTunnels( ListVirtualCircuitAssociatedTunnelsRequest request); /** - * The deprecated operation lists available bandwidth levels for virtual circuits. For the - * compartment ID, provide the + * The operation lists available bandwidth levels for virtual circuits. For the compartment ID, + * provide the * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your * tenancy (the root compartment). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java index d246e4d3400..83d8a7f925c 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsync.java @@ -134,7 +134,8 @@ java.util.concurrent.Future addIpv6VcnCidr( handler); /** - * Adds one or more security rules to the specified network security group. + * Adds up to 25 security rules to the specified network security group. Adding more than 25 + * rules requires multiple operations. * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. @@ -1356,6 +1357,9 @@ java.util.concurrent.Future createSecurityList( * is provided. It does not have to be unique, and you can change it. Avoid entering * confidential information. * + *

Use the {@link #listServices(ListServicesRequest, Consumer, Consumer) listServices} + * operation to find service CIDR labels available in the region. + * * @param request The request object containing the details to send * @param handler The request handler to invoke upon completion, may be null. * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, @@ -3983,8 +3987,8 @@ java.util.concurrent.Future listVcns( handler); /** - * The deprecated operation lists available bandwidth levels for virtual circuits. For the - * compartment ID, provide the + * The operation lists available bandwidth levels for virtual circuits. For the compartment ID, + * provide the * [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of your * tenancy (the root compartment). * diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java index c5e16d3144d..bba6020fd48 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkAsyncClient.java @@ -5848,7 +5848,7 @@ public java.util.concurrent.Future listIpInventory( .serviceDetails( "VirtualNetwork", "ListIpInventory", - "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ListIpInventory") + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/ListIpInventory") .method(com.oracle.bmc.http.client.Method.POST) .requestBuilder(ListIpInventoryRequest::builder) .basePath("/20160918") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java index c50fc24181b..9daf95884bf 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/VirtualNetworkClient.java @@ -5250,7 +5250,7 @@ public ListIpInventoryResponse listIpInventory(ListIpInventoryRequest request) { .serviceDetails( "VirtualNetwork", "ListIpInventory", - "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/Vcn/ListIpInventory") + "https://docs.oracle.com/iaas/api/#/en/iaas/20160918/IpInventoryCollection/ListIpInventory") .method(com.oracle.bmc.http.client.Method.POST) .requestBuilder(ListIpInventoryRequest::builder) .basePath("/20160918") diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java index 7d837fbb89e..65d4a205671 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/AddNetworkSecurityGroupSecurityRulesDetails.java @@ -32,12 +32,18 @@ public AddNetworkSecurityGroupSecurityRulesDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { - /** The NSG security rules to add. */ + /** + * An array of security rules to add to the NSG. You can add up to 25 rules in a single + * {@code AddNetworkSecurityGroupSecurityRules} operation. Adding more than 25 rules + * requires multiple operations. + */ @com.fasterxml.jackson.annotation.JsonProperty("securityRules") private java.util.List securityRules; /** - * The NSG security rules to add. + * An array of security rules to add to the NSG. You can add up to 25 rules in a single + * {@code AddNetworkSecurityGroupSecurityRules} operation. Adding more than 25 rules + * requires multiple operations. * * @param securityRules the value to set * @return this builder @@ -78,12 +84,18 @@ public Builder toBuilder() { return new Builder().copy(this); } - /** The NSG security rules to add. */ + /** + * An array of security rules to add to the NSG. You can add up to 25 rules in a single {@code + * AddNetworkSecurityGroupSecurityRules} operation. Adding more than 25 rules requires multiple + * operations. + */ @com.fasterxml.jackson.annotation.JsonProperty("securityRules") private final java.util.List securityRules; /** - * The NSG security rules to add. + * An array of security rules to add to the NSG. You can add up to 25 rules in a single {@code + * AddNetworkSecurityGroupSecurityRules} operation. Adding more than 25 rules requires multiple + * operations. * * @return the value */ diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java index 29f8a97ef44..0e7bf504ac2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateServiceGatewayDetails.java @@ -53,15 +53,15 @@ public CreateServiceGatewayDetails( @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") public static class Builder { /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of - * the compartment to contain the service gateway. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * compartment to contain the service gateway. */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private String compartmentId; /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of - * the compartment to contain the service gateway. + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * compartment to contain the service gateway. * * @param compartmentId the value to set * @return this builder @@ -285,14 +285,14 @@ public Builder toBuilder() { } /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * compartment to contain the service gateway. */ @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") private final String compartmentId; /** - * The [OCID] (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * compartment to contain the service gateway. * * @return the value diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java index 88fe185fc2f..2dfb08775a5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVcnDetails.java @@ -33,6 +33,7 @@ public final class CreateVcnDetails "displayName", "dnsLabel", "freeformTags", + "securityAttributes", "isIpv6Enabled" }) public CreateVcnDetails( @@ -46,6 +47,7 @@ public CreateVcnDetails( String displayName, String dnsLabel, java.util.Map freeformTags, + java.util.Map> securityAttributes, Boolean isIpv6Enabled) { super(); this.cidrBlock = cidrBlock; @@ -58,6 +60,7 @@ public CreateVcnDetails( this.displayName = displayName; this.dnsLabel = dnsLabel; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.isIpv6Enabled = isIpv6Enabled; } @@ -308,6 +311,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Whether IPv6 is enabled for the VCN. Default is {@code false}. If enabled, Oracle will * assign the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 @@ -354,6 +383,7 @@ public CreateVcnDetails build() { this.displayName, this.dnsLabel, this.freeformTags, + this.securityAttributes, this.isIpv6Enabled); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -393,6 +423,9 @@ public Builder copy(CreateVcnDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("isIpv6Enabled")) { this.isIpv6Enabled(model.getIsIpv6Enabled()); } @@ -631,6 +664,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Whether IPv6 is enabled for the VCN. Default is {@code false}. If enabled, Oracle will assign * the VCN a IPv6 /56 CIDR block. You may skip having Oracle allocate the VCN a IPv6 /56 CIDR @@ -684,6 +740,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", dnsLabel=").append(String.valueOf(this.dnsLabel)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", isIpv6Enabled=").append(String.valueOf(this.isIpv6Enabled)); sb.append(")"); return sb.toString(); @@ -710,6 +767,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.dnsLabel, other.dnsLabel) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.isIpv6Enabled, other.isIpv6Enabled) && super.equals(other); } @@ -742,6 +800,11 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.dnsLabel == null ? 43 : this.dnsLabel.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.isIpv6Enabled == null ? 43 : this.isIpv6Enabled.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java index 3dd877f6c1f..52d0a8c68dd 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/CreateVnicDetails.java @@ -33,6 +33,7 @@ public final class CreateVnicDetails "definedTags", "displayName", "freeformTags", + "securityAttributes", "hostnameLabel", "ipv6AddressIpv6SubnetCidrPairDetails", "nsgIds", @@ -48,6 +49,7 @@ public CreateVnicDetails( java.util.Map> definedTags, String displayName, java.util.Map freeformTags, + java.util.Map> securityAttributes, String hostnameLabel, java.util.List ipv6AddressIpv6SubnetCidrPairDetails, @@ -63,6 +65,7 @@ public CreateVnicDetails( this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.hostnameLabel = hostnameLabel; this.ipv6AddressIpv6SubnetCidrPairDetails = ipv6AddressIpv6SubnetCidrPairDetails; this.nsgIds = nsgIds; @@ -251,6 +254,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) (for example, @@ -512,6 +541,7 @@ public CreateVnicDetails build() { this.definedTags, this.displayName, this.freeformTags, + this.securityAttributes, this.hostnameLabel, this.ipv6AddressIpv6SubnetCidrPairDetails, this.nsgIds, @@ -545,6 +575,9 @@ public Builder copy(CreateVnicDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -744,6 +777,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) (for example, {@code @@ -992,6 +1048,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", ipv6AddressIpv6SubnetCidrPairDetails=") .append(String.valueOf(this.ipv6AddressIpv6SubnetCidrPairDetails)); @@ -1021,6 +1078,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals( this.ipv6AddressIpv6SubnetCidrPairDetails, @@ -1049,6 +1107,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java index 155cdb137d0..a1abe981170 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Instance.java @@ -49,6 +49,8 @@ public final class Instance extends com.oracle.bmc.http.client.internal.Explicit "clusterPlacementGroupId", "dedicatedVmHostId", "definedTags", + "securityAttributes", + "securityAttributesState", "displayName", "extendedMetadata", "faultDomain", @@ -82,6 +84,8 @@ public Instance( String clusterPlacementGroupId, String dedicatedVmHostId, java.util.Map> definedTags, + java.util.Map> securityAttributes, + SecurityAttributesState securityAttributesState, String displayName, java.util.Map extendedMetadata, String faultDomain, @@ -114,6 +118,8 @@ public Instance( this.clusterPlacementGroupId = clusterPlacementGroupId; this.dedicatedVmHostId = dedicatedVmHostId; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; + this.securityAttributesState = securityAttributesState; this.displayName = displayName; this.extendedMetadata = extendedMetadata; this.faultDomain = faultDomain; @@ -258,6 +264,47 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + /** The lifecycle state of the {@code securityAttributes} */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributesState") + private SecurityAttributesState securityAttributesState; + + /** + * The lifecycle state of the {@code securityAttributes} + * + * @param securityAttributesState the value to set + * @return this builder + */ + public Builder securityAttributesState(SecurityAttributesState securityAttributesState) { + this.securityAttributesState = securityAttributesState; + this.__explicitlySet__.add("securityAttributesState"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -755,6 +802,8 @@ public Instance build() { this.clusterPlacementGroupId, this.dedicatedVmHostId, this.definedTags, + this.securityAttributes, + this.securityAttributesState, this.displayName, this.extendedMetadata, this.faultDomain, @@ -806,6 +855,12 @@ public Builder copy(Instance model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + if (model.wasPropertyExplicitlySet("securityAttributesState")) { + this.securityAttributesState(model.getSecurityAttributesState()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -996,6 +1051,88 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + /** The lifecycle state of the {@code securityAttributes} */ + public enum SecurityAttributesState implements com.oracle.bmc.http.internal.BmcEnum { + Stable("STABLE"), + Updating("UPDATING"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SecurityAttributesState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SecurityAttributesState v : SecurityAttributesState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + SecurityAttributesState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SecurityAttributesState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'SecurityAttributesState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** The lifecycle state of the {@code securityAttributes} */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributesState") + private final SecurityAttributesState securityAttributesState; + + /** + * The lifecycle state of the {@code securityAttributes} + * + * @return the value + */ + public SecurityAttributesState getSecurityAttributesState() { + return securityAttributesState; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -1556,6 +1693,9 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.clusterPlacementGroupId)); sb.append(", dedicatedVmHostId=").append(String.valueOf(this.dedicatedVmHostId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(", securityAttributesState=") + .append(String.valueOf(this.securityAttributesState)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", extendedMetadata=").append(String.valueOf(this.extendedMetadata)); sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); @@ -1605,6 +1745,9 @@ public boolean equals(Object o) { this.clusterPlacementGroupId, other.clusterPlacementGroupId) && java.util.Objects.equals(this.dedicatedVmHostId, other.dedicatedVmHostId) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && java.util.Objects.equals( + this.securityAttributesState, other.securityAttributesState) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.extendedMetadata, other.extendedMetadata) && java.util.Objects.equals(this.faultDomain, other.faultDomain) @@ -1662,6 +1805,16 @@ public int hashCode() { (result * PRIME) + (this.dedicatedVmHostId == null ? 43 : this.dedicatedVmHostId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = + (result * PRIME) + + (this.securityAttributesState == null + ? 43 + : this.securityAttributesState.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java index 466a5dbf379..65a8253d128 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationCreateVnicDetails.java @@ -33,6 +33,7 @@ public final class InstanceConfigurationCreateVnicDetails "definedTags", "displayName", "freeformTags", + "securityAttributes", "ipv6AddressIpv6SubnetCidrPairDetails", "hostnameLabel", "nsgIds", @@ -47,6 +48,7 @@ public InstanceConfigurationCreateVnicDetails( java.util.Map> definedTags, String displayName, java.util.Map freeformTags, + java.util.Map> securityAttributes, java.util.List ipv6AddressIpv6SubnetCidrPairDetails, String hostnameLabel, @@ -61,6 +63,7 @@ public InstanceConfigurationCreateVnicDetails( this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.ipv6AddressIpv6SubnetCidrPairDetails = ipv6AddressIpv6SubnetCidrPairDetails; this.hostnameLabel = hostnameLabel; this.nsgIds = nsgIds; @@ -202,6 +205,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. You can * provide only the prefix and OCI selects an available address from the range. You can @@ -336,6 +365,7 @@ public InstanceConfigurationCreateVnicDetails build() { this.definedTags, this.displayName, this.freeformTags, + this.securityAttributes, this.ipv6AddressIpv6SubnetCidrPairDetails, this.hostnameLabel, this.nsgIds, @@ -368,6 +398,9 @@ public Builder copy(InstanceConfigurationCreateVnicDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("ipv6AddressIpv6SubnetCidrPairDetails")) { this.ipv6AddressIpv6SubnetCidrPairDetails( model.getIpv6AddressIpv6SubnetCidrPairDetails()); @@ -518,6 +551,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A list of IPv6 prefixes from which the VNIC should be assigned an IPv6 address. You can * provide only the prefix and OCI selects an available address from the range. You can @@ -647,6 +703,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", ipv6AddressIpv6SubnetCidrPairDetails=") .append(String.valueOf(this.ipv6AddressIpv6SubnetCidrPairDetails)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); @@ -675,6 +732,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals( this.ipv6AddressIpv6SubnetCidrPairDetails, other.ipv6AddressIpv6SubnetCidrPairDetails) @@ -702,6 +760,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.ipv6AddressIpv6SubnetCidrPairDetails == null diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java index aea2c14781d..fa5166558c1 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/InstanceConfigurationLaunchInstanceDetails.java @@ -34,6 +34,7 @@ public final class InstanceConfigurationLaunchInstanceDetails "clusterPlacementGroupId", "createVnicDetails", "definedTags", + "securityAttributes", "displayName", "extendedMetadata", "freeformTags", @@ -61,6 +62,7 @@ public InstanceConfigurationLaunchInstanceDetails( String clusterPlacementGroupId, InstanceConfigurationCreateVnicDetails createVnicDetails, java.util.Map> definedTags, + java.util.Map> securityAttributes, String displayName, java.util.Map extendedMetadata, java.util.Map freeformTags, @@ -87,6 +89,7 @@ public InstanceConfigurationLaunchInstanceDetails( this.clusterPlacementGroupId = clusterPlacementGroupId; this.createVnicDetails = createVnicDetails; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.displayName = displayName; this.extendedMetadata = extendedMetadata; this.freeformTags = freeformTags; @@ -217,6 +220,32 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -705,6 +734,7 @@ public InstanceConfigurationLaunchInstanceDetails build() { this.clusterPlacementGroupId, this.createVnicDetails, this.definedTags, + this.securityAttributes, this.displayName, this.extendedMetadata, this.freeformTags, @@ -750,6 +780,9 @@ public Builder copy(InstanceConfigurationLaunchInstanceDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -914,6 +947,29 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -1465,6 +1521,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.clusterPlacementGroupId)); sb.append(", createVnicDetails=").append(String.valueOf(this.createVnicDetails)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", extendedMetadata=").append(String.valueOf(this.extendedMetadata)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); @@ -1509,6 +1566,7 @@ public boolean equals(Object o) { this.clusterPlacementGroupId, other.clusterPlacementGroupId) && java.util.Objects.equals(this.createVnicDetails, other.createVnicDetails) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.extendedMetadata, other.extendedMetadata) && java.util.Objects.equals(this.freeformTags, other.freeformTags) @@ -1560,6 +1618,11 @@ public int hashCode() { (result * PRIME) + (this.createVnicDetails == null ? 43 : this.createVnicDetails.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java index 1103613bfff..3a80ae16463 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/LaunchInstanceDetails.java @@ -31,6 +31,7 @@ public final class LaunchInstanceDetails "createVnicDetails", "dedicatedVmHostId", "definedTags", + "securityAttributes", "displayName", "extendedMetadata", "faultDomain", @@ -62,6 +63,7 @@ public LaunchInstanceDetails( CreateVnicDetails createVnicDetails, String dedicatedVmHostId, java.util.Map> definedTags, + java.util.Map> securityAttributes, String displayName, java.util.Map extendedMetadata, String faultDomain, @@ -92,6 +94,7 @@ public LaunchInstanceDetails( this.createVnicDetails = createVnicDetails; this.dedicatedVmHostId = dedicatedVmHostId; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.displayName = displayName; this.extendedMetadata = extendedMetadata; this.faultDomain = faultDomain; @@ -228,6 +231,32 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -785,6 +814,7 @@ public LaunchInstanceDetails build() { this.createVnicDetails, this.dedicatedVmHostId, this.definedTags, + this.securityAttributes, this.displayName, this.extendedMetadata, this.faultDomain, @@ -834,6 +864,9 @@ public Builder copy(LaunchInstanceDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -1012,6 +1045,29 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -1520,6 +1576,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", createVnicDetails=").append(String.valueOf(this.createVnicDetails)); sb.append(", dedicatedVmHostId=").append(String.valueOf(this.dedicatedVmHostId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", extendedMetadata=").append(String.valueOf(this.extendedMetadata)); sb.append(", faultDomain=").append(String.valueOf(this.faultDomain)); @@ -1568,6 +1625,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.createVnicDetails, other.createVnicDetails) && java.util.Objects.equals(this.dedicatedVmHostId, other.dedicatedVmHostId) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.extendedMetadata, other.extendedMetadata) && java.util.Objects.equals(this.faultDomain, other.faultDomain) @@ -1623,6 +1681,11 @@ public int hashCode() { (result * PRIME) + (this.dedicatedVmHostId == null ? 43 : this.dedicatedVmHostId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java index b986218196f..a4b452f9627 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/ServiceGateway.java @@ -7,10 +7,11 @@ /** * Represents a router that lets your VCN privately access specific Oracle services such as Object * Storage without exposing the VCN to the public internet. Traffic leaving the VCN and destined for - * a supported Oracle service (see {@link #listServices(ListServicesRequest) listServices}) is - * routed through the service gateway and does not traverse the internet. The instances in the VCN - * do not need to have public IP addresses nor be in a public subnet. The VCN does not need an - * internet gateway for this traffic. For more information, see [Access to Oracle Services: Service + * a supported Oracle service (use the {@link #listServices(ListServicesRequest) listServices} + * operation to find available service CIDR labels) is routed through the service gateway and does + * not traverse the internet. The instances in the VCN do not need to have public IP addresses nor + * be in a public subnet. The VCN does not need an internet gateway for this traffic. For more + * information, see [Access to Oracle Services: Service * Gateway](https://docs.cloud.oracle.com/iaas/Content/Network/Tasks/servicegateway.htm). * *

To use any of the API operations, you must be authorized in an IAM policy. If you're not diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java index 4ca74570866..883d1511635 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateInstanceDetails.java @@ -26,6 +26,7 @@ public final class UpdateInstanceDetails @java.beans.ConstructorProperties({ "capacityReservationId", "definedTags", + "securityAttributes", "displayName", "freeformTags", "agentConfig", @@ -46,6 +47,7 @@ public final class UpdateInstanceDetails public UpdateInstanceDetails( String capacityReservationId, java.util.Map> definedTags, + java.util.Map> securityAttributes, String displayName, java.util.Map freeformTags, UpdateInstanceAgentConfigDetails agentConfig, @@ -65,6 +67,7 @@ public UpdateInstanceDetails( super(); this.capacityReservationId = capacityReservationId; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.displayName = displayName; this.freeformTags = freeformTags; this.agentConfig = agentConfig; @@ -134,6 +137,32 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -529,6 +558,7 @@ public UpdateInstanceDetails build() { new UpdateInstanceDetails( this.capacityReservationId, this.definedTags, + this.securityAttributes, this.displayName, this.freeformTags, this.agentConfig, @@ -559,6 +589,9 @@ public Builder copy(UpdateInstanceDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } @@ -664,6 +697,29 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering * confidential information. @@ -1069,6 +1125,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("super=").append(super.toString()); sb.append("capacityReservationId=").append(String.valueOf(this.capacityReservationId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", agentConfig=").append(String.valueOf(this.agentConfig)); @@ -1103,6 +1160,7 @@ public boolean equals(Object o) { UpdateInstanceDetails other = (UpdateInstanceDetails) o; return java.util.Objects.equals(this.capacityReservationId, other.capacityReservationId) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.agentConfig, other.agentConfig) @@ -1134,6 +1192,11 @@ public int hashCode() { ? 43 : this.capacityReservationId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.agentConfig == null ? 43 : this.agentConfig.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java index 290af34a194..3feaa66d4e5 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVcnDetails.java @@ -22,15 +22,22 @@ public final class UpdateVcnDetails extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { @Deprecated - @java.beans.ConstructorProperties({"definedTags", "displayName", "freeformTags"}) + @java.beans.ConstructorProperties({ + "definedTags", + "displayName", + "freeformTags", + "securityAttributes" + }) public UpdateVcnDetails( java.util.Map> definedTags, String displayName, - java.util.Map freeformTags) { + java.util.Map freeformTags, + java.util.Map> securityAttributes) { super(); this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -105,13 +112,43 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); public UpdateVcnDetails build() { UpdateVcnDetails model = - new UpdateVcnDetails(this.definedTags, this.displayName, this.freeformTags); + new UpdateVcnDetails( + this.definedTags, + this.displayName, + this.freeformTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -129,6 +166,9 @@ public Builder copy(UpdateVcnDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -205,6 +245,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -223,6 +286,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -240,6 +304,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -250,6 +315,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java index 289b53d3fb0..fc4363ebe77 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/UpdateVnicDetails.java @@ -27,6 +27,7 @@ public final class UpdateVnicDetails "definedTags", "displayName", "freeformTags", + "securityAttributes", "hostnameLabel", "nsgIds", "skipSourceDestCheck" @@ -35,6 +36,7 @@ public UpdateVnicDetails( java.util.Map> definedTags, String displayName, java.util.Map freeformTags, + java.util.Map> securityAttributes, String hostnameLabel, java.util.List nsgIds, Boolean skipSourceDestCheck) { @@ -42,6 +44,7 @@ public UpdateVnicDetails( this.definedTags = definedTags; this.displayName = displayName; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.hostnameLabel = hostnameLabel; this.nsgIds = nsgIds; this.skipSourceDestCheck = skipSourceDestCheck; @@ -119,6 +122,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) (for example, @@ -232,6 +261,7 @@ public UpdateVnicDetails build() { this.definedTags, this.displayName, this.freeformTags, + this.securityAttributes, this.hostnameLabel, this.nsgIds, this.skipSourceDestCheck); @@ -252,6 +282,9 @@ public Builder copy(UpdateVnicDetails model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("hostnameLabel")) { this.hostnameLabel(model.getHostnameLabel()); } @@ -337,6 +370,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The hostname for the VNIC's primary private IP. Used for DNS. The value is the hostname * portion of the primary private IP's fully qualified domain name (FQDN) (for example, {@code @@ -450,6 +506,7 @@ public String toString(boolean includeByteArrayContents) { sb.append("definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", skipSourceDestCheck=").append(String.valueOf(this.skipSourceDestCheck)); @@ -470,6 +527,7 @@ public boolean equals(Object o) { return java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.skipSourceDestCheck, other.skipSourceDestCheck) @@ -483,6 +541,11 @@ public int hashCode() { result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.hostnameLabel == null ? 43 : this.hostnameLabel.hashCode()); diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java index 61b06263b9b..8215ff362e2 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vcn.java @@ -41,6 +41,7 @@ public final class Vcn extends com.oracle.bmc.http.client.internal.ExplicitlySet "displayName", "dnsLabel", "freeformTags", + "securityAttributes", "id", "ipv6CidrBlocks", "lifecycleState", @@ -60,6 +61,7 @@ public Vcn( String displayName, String dnsLabel, java.util.Map freeformTags, + java.util.Map> securityAttributes, String id, java.util.List ipv6CidrBlocks, LifecycleState lifecycleState, @@ -78,6 +80,7 @@ public Vcn( this.displayName = displayName; this.dnsLabel = dnsLabel; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.id = id; this.ipv6CidrBlocks = ipv6CidrBlocks; this.lifecycleState = lifecycleState; @@ -342,6 +345,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The VCN's Oracle ID * ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). @@ -466,6 +495,7 @@ public Vcn build() { this.displayName, this.dnsLabel, this.freeformTags, + this.securityAttributes, this.id, this.ipv6CidrBlocks, this.lifecycleState, @@ -515,6 +545,9 @@ public Builder copy(Vcn model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("id")) { this.id(model.getId()); } @@ -773,6 +806,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The VCN's Oracle ID * ([OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm)). @@ -944,6 +1000,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", displayName=").append(String.valueOf(this.displayName)); sb.append(", dnsLabel=").append(String.valueOf(this.dnsLabel)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", id=").append(String.valueOf(this.id)); sb.append(", ipv6CidrBlocks=").append(String.valueOf(this.ipv6CidrBlocks)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); @@ -975,6 +1032,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.displayName, other.displayName) && java.util.Objects.equals(this.dnsLabel, other.dnsLabel) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.id, other.id) && java.util.Objects.equals(this.ipv6CidrBlocks, other.ipv6CidrBlocks) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) @@ -1019,6 +1077,11 @@ public int hashCode() { result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); result = (result * PRIME) + (this.dnsLabel == null ? 43 : this.dnsLabel.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java index 8250441627c..22f82390cbf 100644 --- a/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java +++ b/bmc-core/src/main/java/com/oracle/bmc/core/model/Vnic.java @@ -45,6 +45,7 @@ public final class Vnic extends com.oracle.bmc.http.client.internal.ExplicitlySe "compartmentId", "definedTags", "displayName", + "securityAttributes", "freeformTags", "hostnameLabel", "id", @@ -65,6 +66,7 @@ public Vnic( String compartmentId, java.util.Map> definedTags, String displayName, + java.util.Map> securityAttributes, java.util.Map freeformTags, String hostnameLabel, String id, @@ -84,6 +86,7 @@ public Vnic( this.compartmentId = compartmentId; this.definedTags = definedTags; this.displayName = displayName; + this.securityAttributes = securityAttributes; this.freeformTags = freeformTags; this.hostnameLabel = hostnameLabel; this.id = id; @@ -187,6 +190,32 @@ public Builder displayName(String displayName) { this.__explicitlySet__.add("displayName"); return this; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * 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 @@ -532,6 +561,7 @@ public Vnic build() { this.compartmentId, this.definedTags, this.displayName, + this.securityAttributes, this.freeformTags, this.hostnameLabel, this.id, @@ -566,6 +596,9 @@ public Builder copy(Vnic model) { if (model.wasPropertyExplicitlySet("displayName")) { this.displayName(model.getDisplayName()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } @@ -697,6 +730,29 @@ public String getDisplayName() { return displayName; } + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. This is unique to ZPR, and helps identify which + * resources are allowed to be accessed by what permission controls. + * + *

Example: {@code {"Oracle-DataSecurity-ZPR": {"MaxEgressCount": + * {"value":"42","mode":"audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * 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 @@ -1068,6 +1124,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", displayName=").append(String.valueOf(this.displayName)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", hostnameLabel=").append(String.valueOf(this.hostnameLabel)); sb.append(", id=").append(String.valueOf(this.id)); @@ -1100,6 +1157,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.compartmentId, other.compartmentId) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.displayName, other.displayName) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.hostnameLabel, other.hostnameLabel) && java.util.Objects.equals(this.id, other.id) @@ -1131,6 +1189,11 @@ public int hashCode() { + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.displayName == null ? 43 : this.displayName.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) diff --git a/bmc-core/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-core/reflect-config.json b/bmc-core/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-core/reflect-config.json index da8adc7d2ea..b003a6b09fc 100644 --- a/bmc-core/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-core/reflect-config.json +++ b/bmc-core/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-core/reflect-config.json @@ -4785,6 +4785,12 @@ "allDeclaredMethods": true, "allDeclaredConstructors": true }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.core.model.Instance$SecurityAttributesState", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, "name": "com.oracle.bmc.core.model.Instance$LaunchMode", diff --git a/bmc-dashboardservice/pom.xml b/bmc-dashboardservice/pom.xml index fd4cbc7ed1e..a3ef024df6d 100644 --- a/bmc-dashboardservice/pom.xml +++ b/bmc-dashboardservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-dashboardservice @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-database/pom.xml b/bmc-database/pom.xml index 124b1423277..b1af11826aa 100644 --- a/bmc-database/pom.xml +++ b/bmc-database/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-workrequests - 3.50.0 + 3.50.1 diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java index 23adac6bf22..df919dab41c 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabase.java @@ -73,6 +73,7 @@ public final class AutonomousDatabase "usedDataStorageSizeInTBs", "freeformTags", "definedTags", + "securityAttributes", "subnetId", "nsgIds", "privateEndpoint", @@ -195,6 +196,7 @@ public AutonomousDatabase( Integer usedDataStorageSizeInTBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String subnetId, java.util.List nsgIds, String privateEndpoint, @@ -316,6 +318,7 @@ public AutonomousDatabase( this.usedDataStorageSizeInTBs = usedDataStorageSizeInTBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.subnetId = subnetId; this.nsgIds = nsgIds; this.privateEndpoint = privateEndpoint; @@ -1422,6 +1425,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * subnet the resource is associated with. @@ -3050,6 +3077,7 @@ public AutonomousDatabase build() { this.usedDataStorageSizeInTBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.subnetId, this.nsgIds, this.privateEndpoint, @@ -3279,6 +3307,9 @@ public Builder copy(AutonomousDatabase model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } @@ -4645,6 +4676,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * subnet the resource is associated with. @@ -6829,6 +6881,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.usedDataStorageSizeInTBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", privateEndpoint=").append(String.valueOf(this.privateEndpoint)); @@ -7004,6 +7057,7 @@ public boolean equals(Object o) { this.usedDataStorageSizeInTBs, other.usedDataStorageSizeInTBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.privateEndpoint, other.privateEndpoint) @@ -7260,6 +7314,11 @@ public int hashCode() { : this.usedDataStorageSizeInTBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java index 96c7a1cbe06..bcf103ba380 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/AutonomousDatabaseSummary.java @@ -76,6 +76,7 @@ public final class AutonomousDatabaseSummary "usedDataStorageSizeInTBs", "freeformTags", "definedTags", + "securityAttributes", "subnetId", "nsgIds", "privateEndpoint", @@ -198,6 +199,7 @@ public AutonomousDatabaseSummary( Integer usedDataStorageSizeInTBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String subnetId, java.util.List nsgIds, String privateEndpoint, @@ -319,6 +321,7 @@ public AutonomousDatabaseSummary( this.usedDataStorageSizeInTBs = usedDataStorageSizeInTBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.subnetId = subnetId; this.nsgIds = nsgIds; this.privateEndpoint = privateEndpoint; @@ -1425,6 +1428,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * subnet the resource is associated with. @@ -3053,6 +3080,7 @@ public AutonomousDatabaseSummary build() { this.usedDataStorageSizeInTBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.subnetId, this.nsgIds, this.privateEndpoint, @@ -3282,6 +3310,9 @@ public Builder copy(AutonomousDatabaseSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("subnetId")) { this.subnetId(model.getSubnetId()); } @@ -4648,6 +4679,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * subnet the resource is associated with. @@ -6832,6 +6884,7 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.usedDataStorageSizeInTBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", subnetId=").append(String.valueOf(this.subnetId)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", privateEndpoint=").append(String.valueOf(this.privateEndpoint)); @@ -7007,6 +7060,7 @@ public boolean equals(Object o) { this.usedDataStorageSizeInTBs, other.usedDataStorageSizeInTBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.subnetId, other.subnetId) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.privateEndpoint, other.privateEndpoint) @@ -7263,6 +7317,11 @@ public int hashCode() { : this.usedDataStorageSizeInTBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.subnetId == null ? 43 : this.subnetId.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java index f829126d571..f9efbb384cb 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmCluster.java @@ -58,6 +58,7 @@ public final class CloudAutonomousVmCluster "scanListenerPortNonTls", "freeformTags", "definedTags", + "securityAttributes", "timeDatabaseSslCertificateExpires", "timeOrdsCertificateExpires", "availableCpus", @@ -117,6 +118,7 @@ public CloudAutonomousVmCluster( Integer scanListenerPortNonTls, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Date timeDatabaseSslCertificateExpires, java.util.Date timeOrdsCertificateExpires, Float availableCpus, @@ -175,6 +177,7 @@ public CloudAutonomousVmCluster( this.scanListenerPortNonTls = scanListenerPortNonTls; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.timeDatabaseSslCertificateExpires = timeDatabaseSslCertificateExpires; this.timeOrdsCertificateExpires = timeOrdsCertificateExpires; this.availableCpus = availableCpus; @@ -838,6 +841,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** The date and time of Database SSL certificate expiration. */ @com.fasterxml.jackson.annotation.JsonProperty("timeDatabaseSslCertificateExpires") private java.util.Date timeDatabaseSslCertificateExpires; @@ -1265,6 +1292,7 @@ public CloudAutonomousVmCluster build() { this.scanListenerPortNonTls, this.freeformTags, this.definedTags, + this.securityAttributes, this.timeDatabaseSslCertificateExpires, this.timeOrdsCertificateExpires, this.availableCpus, @@ -1398,6 +1426,9 @@ public Builder copy(CloudAutonomousVmCluster model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("timeDatabaseSslCertificateExpires")) { this.timeDatabaseSslCertificateExpires( model.getTimeDatabaseSslCertificateExpires()); @@ -2212,6 +2243,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** The date and time of Database SSL certificate expiration. */ @com.fasterxml.jackson.annotation.JsonProperty("timeDatabaseSslCertificateExpires") private final java.util.Date timeDatabaseSslCertificateExpires; @@ -2588,6 +2640,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanListenerPortNonTls=").append(String.valueOf(this.scanListenerPortNonTls)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", timeDatabaseSslCertificateExpires=") .append(String.valueOf(this.timeDatabaseSslCertificateExpires)); sb.append(", timeOrdsCertificateExpires=") @@ -2677,6 +2730,7 @@ public boolean equals(Object o) { this.scanListenerPortNonTls, other.scanListenerPortNonTls) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals( this.timeDatabaseSslCertificateExpires, other.timeDatabaseSslCertificateExpires) @@ -2819,6 +2873,11 @@ public int hashCode() { : this.scanListenerPortNonTls.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.timeDatabaseSslCertificateExpires == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java index 3e9530ceb66..3b2b332fcf7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudAutonomousVmClusterSummary.java @@ -58,6 +58,7 @@ public final class CloudAutonomousVmClusterSummary "scanListenerPortNonTls", "freeformTags", "definedTags", + "securityAttributes", "timeDatabaseSslCertificateExpires", "timeOrdsCertificateExpires", "availableCpus", @@ -117,6 +118,7 @@ public CloudAutonomousVmClusterSummary( Integer scanListenerPortNonTls, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Date timeDatabaseSslCertificateExpires, java.util.Date timeOrdsCertificateExpires, Float availableCpus, @@ -175,6 +177,7 @@ public CloudAutonomousVmClusterSummary( this.scanListenerPortNonTls = scanListenerPortNonTls; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.timeDatabaseSslCertificateExpires = timeDatabaseSslCertificateExpires; this.timeOrdsCertificateExpires = timeOrdsCertificateExpires; this.availableCpus = availableCpus; @@ -838,6 +841,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** The date and time of Database SSL certificate expiration. */ @com.fasterxml.jackson.annotation.JsonProperty("timeDatabaseSslCertificateExpires") private java.util.Date timeDatabaseSslCertificateExpires; @@ -1265,6 +1292,7 @@ public CloudAutonomousVmClusterSummary build() { this.scanListenerPortNonTls, this.freeformTags, this.definedTags, + this.securityAttributes, this.timeDatabaseSslCertificateExpires, this.timeOrdsCertificateExpires, this.availableCpus, @@ -1398,6 +1426,9 @@ public Builder copy(CloudAutonomousVmClusterSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("timeDatabaseSslCertificateExpires")) { this.timeDatabaseSslCertificateExpires( model.getTimeDatabaseSslCertificateExpires()); @@ -2212,6 +2243,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** The date and time of Database SSL certificate expiration. */ @com.fasterxml.jackson.annotation.JsonProperty("timeDatabaseSslCertificateExpires") private final java.util.Date timeDatabaseSslCertificateExpires; @@ -2588,6 +2640,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanListenerPortNonTls=").append(String.valueOf(this.scanListenerPortNonTls)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", timeDatabaseSslCertificateExpires=") .append(String.valueOf(this.timeDatabaseSslCertificateExpires)); sb.append(", timeOrdsCertificateExpires=") @@ -2677,6 +2730,7 @@ public boolean equals(Object o) { this.scanListenerPortNonTls, other.scanListenerPortNonTls) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals( this.timeDatabaseSslCertificateExpires, other.timeDatabaseSslCertificateExpires) @@ -2819,6 +2873,11 @@ public int hashCode() { : this.scanListenerPortNonTls.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.timeDatabaseSslCertificateExpires == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java index 5cc7eede2d8..25809ebaa76 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmCluster.java @@ -65,6 +65,7 @@ public final class CloudVmCluster "scanDnsRecordId", "freeformTags", "definedTags", + "securityAttributes", "systemTags", "scanDnsName", "zoneId", @@ -117,6 +118,7 @@ public CloudVmCluster( String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Map> systemTags, String scanDnsName, String zoneId, @@ -168,6 +170,7 @@ public CloudVmCluster( this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.systemTags = systemTags; this.scanDnsName = scanDnsName; this.zoneId = zoneId; @@ -981,6 +984,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -1161,6 +1188,7 @@ public CloudVmCluster build() { this.scanDnsRecordId, this.freeformTags, this.definedTags, + this.securityAttributes, this.systemTags, this.scanDnsName, this.zoneId, @@ -1303,6 +1331,9 @@ public Builder copy(CloudVmCluster model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -2197,6 +2228,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -2371,6 +2423,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); sb.append(", zoneId=").append(String.valueOf(this.zoneId)); @@ -2440,6 +2493,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) && java.util.Objects.equals(this.zoneId, other.zoneId) @@ -2559,6 +2613,11 @@ public int hashCode() { + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java index 6bf17b23996..1721cb91fae 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CloudVmClusterSummary.java @@ -65,6 +65,7 @@ public final class CloudVmClusterSummary "scanDnsRecordId", "freeformTags", "definedTags", + "securityAttributes", "systemTags", "scanDnsName", "zoneId", @@ -116,6 +117,7 @@ public CloudVmClusterSummary( String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Map> systemTags, String scanDnsName, String zoneId, @@ -166,6 +168,7 @@ public CloudVmClusterSummary( this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.systemTags = systemTags; this.scanDnsName = scanDnsName; this.zoneId = zoneId; @@ -970,6 +973,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -1149,6 +1176,7 @@ public CloudVmClusterSummary build() { this.scanDnsRecordId, this.freeformTags, this.definedTags, + this.securityAttributes, this.systemTags, this.scanDnsName, this.zoneId, @@ -1288,6 +1316,9 @@ public Builder copy(CloudVmClusterSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -2175,6 +2206,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -2348,6 +2400,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); sb.append(", zoneId=").append(String.valueOf(this.zoneId)); @@ -2416,6 +2469,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) && java.util.Objects.equals(this.zoneId, other.zoneId) @@ -2532,6 +2586,11 @@ public int hashCode() { + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java index 22b4110063e..114096601bc 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseBase.java @@ -102,6 +102,7 @@ public class CreateAutonomousDatabaseBase "privateEndpointLabel", "freeformTags", "definedTags", + "securityAttributes", "privateEndpointIp", "dbVersion", "customerContacts", @@ -154,6 +155,7 @@ protected CreateAutonomousDatabaseBase( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -205,6 +207,7 @@ protected CreateAutonomousDatabaseBase( this.privateEndpointLabel = privateEndpointLabel; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.privateEndpointIp = privateEndpointIp; this.dbVersion = dbVersion; this.customerContacts = customerContacts; @@ -1357,6 +1360,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** The private endpoint Ip address for the resource. */ @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private final String privateEndpointIp; @@ -1704,6 +1728,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", privateEndpointLabel=").append(String.valueOf(this.privateEndpointLabel)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", privateEndpointIp=").append(String.valueOf(this.privateEndpointIp)); sb.append(", dbVersion=").append(String.valueOf(this.dbVersion)); sb.append(", customerContacts=").append(String.valueOf(this.customerContacts)); @@ -1778,6 +1803,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.privateEndpointLabel, other.privateEndpointLabel) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.privateEndpointIp, other.privateEndpointIp) && java.util.Objects.equals(this.dbVersion, other.dbVersion) && java.util.Objects.equals(this.customerContacts, other.customerContacts) @@ -1905,6 +1931,11 @@ public int hashCode() { : this.privateEndpointLabel.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.privateEndpointIp == null ? 43 : this.privateEndpointIp.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java index bac12a8d129..f2e895353d9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseCloneDetails.java @@ -363,6 +363,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -559,6 +569,7 @@ public CreateAutonomousDatabaseCloneDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -694,6 +705,9 @@ public Builder copy(CreateAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -792,6 +806,7 @@ public CreateAutonomousDatabaseCloneDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -845,6 +860,7 @@ public CreateAutonomousDatabaseCloneDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java index 3060b723d12..3ba0de01320 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseDetails.java @@ -363,6 +363,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -525,6 +535,7 @@ public CreateAutonomousDatabaseDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -658,6 +669,9 @@ public Builder copy(CreateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -750,6 +764,7 @@ public CreateAutonomousDatabaseDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -801,6 +816,7 @@ public CreateAutonomousDatabaseDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java index 27364267159..6f6bdc45860 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupDetails.java @@ -364,6 +364,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -562,6 +572,7 @@ public CreateAutonomousDatabaseFromBackupDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -697,6 +708,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -795,6 +809,7 @@ public CreateAutonomousDatabaseFromBackupDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -848,6 +863,7 @@ public CreateAutonomousDatabaseFromBackupDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java index 949e704c9ca..eb4dc7a1f42 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateAutonomousDatabaseFromBackupTimestampDetails.java @@ -365,6 +365,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -596,6 +606,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -733,6 +744,9 @@ public Builder copy(CreateAutonomousDatabaseFromBackupTimestampDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -838,6 +852,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -893,6 +908,7 @@ public CreateAutonomousDatabaseFromBackupTimestampDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java index 1e57b77f372..130899f2eeb 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudAutonomousVmClusterDetails.java @@ -43,7 +43,8 @@ public final class CreateCloudAutonomousVmClusterDetails "licenseModel", "nsgIds", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public CreateCloudAutonomousVmClusterDetails( String compartmentId, @@ -65,7 +66,8 @@ public CreateCloudAutonomousVmClusterDetails( LicenseModel licenseModel, java.util.List nsgIds, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.compartmentId = compartmentId; this.description = description; @@ -87,6 +89,7 @@ public CreateCloudAutonomousVmClusterDetails( this.nsgIds = nsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -478,6 +481,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -504,7 +531,8 @@ public CreateCloudAutonomousVmClusterDetails build() { this.licenseModel, this.nsgIds, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -573,6 +601,9 @@ public Builder copy(CreateCloudAutonomousVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -1014,6 +1045,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -1054,6 +1106,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -1095,6 +1148,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -1162,6 +1216,11 @@ public int hashCode() { result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java index a2d5b10c436..a55e6c8d2b3 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCloudVmClusterDetails.java @@ -54,6 +54,7 @@ public final class CreateCloudVmClusterDetails "giVersion", "freeformTags", "definedTags", + "securityAttributes", "dataCollectionOptions", "systemVersion", "fileSystemConfigurationDetails" @@ -88,6 +89,7 @@ public CreateCloudVmClusterDetails( String giVersion, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DataCollectionOptions dataCollectionOptions, String systemVersion, java.util.List fileSystemConfigurationDetails) { @@ -121,6 +123,7 @@ public CreateCloudVmClusterDetails( this.giVersion = giVersion; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; this.systemVersion = systemVersion; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; @@ -718,6 +721,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private DataCollectionOptions dataCollectionOptions; @@ -794,6 +821,7 @@ public CreateCloudVmClusterDetails build() { this.giVersion, this.freeformTags, this.definedTags, + this.securityAttributes, this.dataCollectionOptions, this.systemVersion, this.fileSystemConfigurationDetails); @@ -892,6 +920,9 @@ public Builder copy(CreateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } @@ -1471,6 +1502,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private final DataCollectionOptions dataCollectionOptions; @@ -1550,6 +1602,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", giVersion=").append(String.valueOf(this.giVersion)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); sb.append(", fileSystemConfigurationDetails=") @@ -1601,6 +1654,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.giVersion, other.giVersion) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && java.util.Objects.equals(this.systemVersion, other.systemVersion) && java.util.Objects.equals( @@ -1689,6 +1743,11 @@ public int hashCode() { result = (result * PRIME) + (this.giVersion == null ? 43 : this.giVersion.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dataCollectionOptions == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java index b80b7a9f5cf..7f033326ea0 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionAutonomousDatabaseDataGuardDetails.java @@ -378,6 +378,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -561,6 +571,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -695,6 +706,9 @@ public Builder copy(CreateCrossRegionAutonomousDatabaseDataGuardDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -790,6 +804,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -842,6 +857,7 @@ public CreateCrossRegionAutonomousDatabaseDataGuardDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java index 6f64d1c9084..9d2e298ff58 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossRegionDisasterRecoveryDetails.java @@ -376,6 +376,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -604,6 +614,7 @@ public CreateCrossRegionDisasterRecoveryDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -740,6 +751,9 @@ public Builder copy(CreateCrossRegionDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -841,6 +855,7 @@ public CreateCrossRegionDisasterRecoveryDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -895,6 +910,7 @@ public CreateCrossRegionDisasterRecoveryDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java index d62568c451e..d900fc7f693 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateCrossTenancyDisasterRecoveryDetails.java @@ -374,6 +374,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -602,6 +612,7 @@ public CreateCrossTenancyDisasterRecoveryDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -738,6 +749,9 @@ public Builder copy(CreateCrossTenancyDisasterRecoveryDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -839,6 +853,7 @@ public CreateCrossTenancyDisasterRecoveryDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -893,6 +908,7 @@ public CreateCrossTenancyDisasterRecoveryDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java index 3cfadad1de4..beda604c6f9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateDataGuardAssociationWithNewDbSystemDetails.java @@ -502,6 +502,30 @@ public Builder dbSystemDefinedTags( this.__explicitlySet__.add("dbSystemDefinedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("dbSystemSecurityAttributes") + private java.util.Map> dbSystemSecurityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param dbSystemSecurityAttributes the value to set + * @return this builder + */ + public Builder dbSystemSecurityAttributes( + java.util.Map> dbSystemSecurityAttributes) { + this.dbSystemSecurityAttributes = dbSystemSecurityAttributes; + this.__explicitlySet__.add("dbSystemSecurityAttributes"); + return this; + } /** * 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 @@ -589,6 +613,7 @@ public CreateDataGuardAssociationWithNewDbSystemDetails build() { this.licenseModel, this.dbSystemFreeformTags, this.dbSystemDefinedTags, + this.dbSystemSecurityAttributes, this.databaseFreeformTags, this.databaseDefinedTags, this.dataCollectionOptions); @@ -672,6 +697,9 @@ public Builder copy(CreateDataGuardAssociationWithNewDbSystemDetails model) { if (model.wasPropertyExplicitlySet("dbSystemDefinedTags")) { this.dbSystemDefinedTags(model.getDbSystemDefinedTags()); } + if (model.wasPropertyExplicitlySet("dbSystemSecurityAttributes")) { + this.dbSystemSecurityAttributes(model.getDbSystemSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("databaseFreeformTags")) { this.databaseFreeformTags(model.getDatabaseFreeformTags()); } @@ -720,6 +748,7 @@ public CreateDataGuardAssociationWithNewDbSystemDetails( LicenseModel licenseModel, java.util.Map dbSystemFreeformTags, java.util.Map> dbSystemDefinedTags, + java.util.Map> dbSystemSecurityAttributes, java.util.Map databaseFreeformTags, java.util.Map> databaseDefinedTags, DataCollectionOptions dataCollectionOptions) { @@ -748,6 +777,7 @@ public CreateDataGuardAssociationWithNewDbSystemDetails( this.licenseModel = licenseModel; this.dbSystemFreeformTags = dbSystemFreeformTags; this.dbSystemDefinedTags = dbSystemDefinedTags; + this.dbSystemSecurityAttributes = dbSystemSecurityAttributes; this.databaseFreeformTags = databaseFreeformTags; this.databaseDefinedTags = databaseDefinedTags; this.dataCollectionOptions = dataCollectionOptions; @@ -1191,6 +1221,27 @@ public java.util.Map> getDbSystemDefinedTa return dbSystemDefinedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("dbSystemSecurityAttributes") + private final java.util.Map> dbSystemSecurityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getDbSystemSecurityAttributes() { + return dbSystemSecurityAttributes; + } + /** * 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 @@ -1273,6 +1324,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); sb.append(", dbSystemFreeformTags=").append(String.valueOf(this.dbSystemFreeformTags)); sb.append(", dbSystemDefinedTags=").append(String.valueOf(this.dbSystemDefinedTags)); + sb.append(", dbSystemSecurityAttributes=") + .append(String.valueOf(this.dbSystemSecurityAttributes)); sb.append(", databaseFreeformTags=").append(String.valueOf(this.databaseFreeformTags)); sb.append(", databaseDefinedTags=").append(String.valueOf(this.databaseDefinedTags)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); @@ -1309,6 +1362,8 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.licenseModel, other.licenseModel) && java.util.Objects.equals(this.dbSystemFreeformTags, other.dbSystemFreeformTags) && java.util.Objects.equals(this.dbSystemDefinedTags, other.dbSystemDefinedTags) + && java.util.Objects.equals( + this.dbSystemSecurityAttributes, other.dbSystemSecurityAttributes) && java.util.Objects.equals(this.databaseFreeformTags, other.databaseFreeformTags) && java.util.Objects.equals(this.databaseDefinedTags, other.databaseDefinedTags) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) @@ -1356,6 +1411,11 @@ public int hashCode() { + (this.dbSystemDefinedTags == null ? 43 : this.dbSystemDefinedTags.hashCode()); + result = + (result * PRIME) + + (this.dbSystemSecurityAttributes == null + ? 43 + : this.dbSystemSecurityAttributes.hashCode()); result = (result * PRIME) + (this.databaseFreeformTags == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java index ac01fe0aba2..9fa01bc675b 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateExadbVmClusterDetails.java @@ -51,6 +51,7 @@ public final class CreateExadbVmClusterDetails "systemVersion", "freeformTags", "definedTags", + "securityAttributes", "dataCollectionOptions" }) public CreateExadbVmClusterDetails( @@ -80,6 +81,7 @@ public CreateExadbVmClusterDetails( String systemVersion, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DataCollectionOptions dataCollectionOptions) { super(); this.compartmentId = compartmentId; @@ -108,6 +110,7 @@ public CreateExadbVmClusterDetails( this.systemVersion = systemVersion; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; } @@ -636,6 +639,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private DataCollectionOptions dataCollectionOptions; @@ -678,6 +705,7 @@ public CreateExadbVmClusterDetails build() { this.systemVersion, this.freeformTags, this.definedTags, + this.securityAttributes, this.dataCollectionOptions); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -765,6 +793,9 @@ public Builder copy(CreateExadbVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } @@ -1277,6 +1308,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private final DataCollectionOptions dataCollectionOptions; @@ -1326,6 +1378,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(")"); return sb.toString(); @@ -1369,6 +1422,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.systemVersion, other.systemVersion) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && super.equals(other); } @@ -1441,6 +1495,11 @@ public int hashCode() { + (this.systemVersion == null ? 43 : this.systemVersion.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dataCollectionOptions == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java index 3e3e5d6e532..e9e93ed8dd5 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/CreateRefreshableAutonomousDatabaseCloneDetails.java @@ -364,6 +364,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -658,6 +668,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -797,6 +808,9 @@ public Builder copy(CreateRefreshableAutonomousDatabaseCloneDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -907,6 +921,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -964,6 +979,7 @@ public CreateRefreshableAutonomousDatabaseCloneDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java index cd08703d4b2..22a088c0440 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystem.java @@ -69,6 +69,7 @@ public final class DbSystem extends com.oracle.bmc.http.client.internal.Explicit "nextMaintenanceRunId", "freeformTags", "definedTags", + "securityAttributes", "sourceDbSystemId", "pointInTimeDataDiskCloneTimestamp", "dataCollectionOptions" @@ -121,6 +122,7 @@ public DbSystem( String nextMaintenanceRunId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String sourceDbSystemId, java.util.Date pointInTimeDataDiskCloneTimestamp, DataCollectionOptions dataCollectionOptions) { @@ -172,6 +174,7 @@ public DbSystem( this.nextMaintenanceRunId = nextMaintenanceRunId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.sourceDbSystemId = sourceDbSystemId; this.pointInTimeDataDiskCloneTimestamp = pointInTimeDataDiskCloneTimestamp; this.dataCollectionOptions = dataCollectionOptions; @@ -1062,6 +1065,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * DB system. @@ -1164,6 +1191,7 @@ public DbSystem build() { this.nextMaintenanceRunId, this.freeformTags, this.definedTags, + this.securityAttributes, this.sourceDbSystemId, this.pointInTimeDataDiskCloneTimestamp, this.dataCollectionOptions); @@ -1316,6 +1344,9 @@ public Builder copy(DbSystem model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("sourceDbSystemId")) { this.sourceDbSystemId(model.getSourceDbSystemId()); } @@ -2365,6 +2396,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB * system. @@ -2470,6 +2522,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nextMaintenanceRunId=").append(String.valueOf(this.nextMaintenanceRunId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", sourceDbSystemId=").append(String.valueOf(this.sourceDbSystemId)); sb.append(", pointInTimeDataDiskCloneTimestamp=") .append(String.valueOf(this.pointInTimeDataDiskCloneTimestamp)); @@ -2537,6 +2590,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nextMaintenanceRunId, other.nextMaintenanceRunId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.sourceDbSystemId, other.sourceDbSystemId) && java.util.Objects.equals( this.pointInTimeDataDiskCloneTimestamp, @@ -2660,6 +2714,11 @@ public int hashCode() { : this.nextMaintenanceRunId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.sourceDbSystemId == null ? 43 : this.sourceDbSystemId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java index ccc7026ee97..394eb922e61 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/DbSystemSummary.java @@ -100,6 +100,7 @@ public final class DbSystemSummary "nextMaintenanceRunId", "freeformTags", "definedTags", + "securityAttributes", "sourceDbSystemId", "pointInTimeDataDiskCloneTimestamp", "dataCollectionOptions" @@ -151,6 +152,7 @@ public DbSystemSummary( String nextMaintenanceRunId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String sourceDbSystemId, java.util.Date pointInTimeDataDiskCloneTimestamp, DataCollectionOptions dataCollectionOptions) { @@ -201,6 +203,7 @@ public DbSystemSummary( this.nextMaintenanceRunId = nextMaintenanceRunId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.sourceDbSystemId = sourceDbSystemId; this.pointInTimeDataDiskCloneTimestamp = pointInTimeDataDiskCloneTimestamp; this.dataCollectionOptions = dataCollectionOptions; @@ -1082,6 +1085,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the * DB system. @@ -1183,6 +1210,7 @@ public DbSystemSummary build() { this.nextMaintenanceRunId, this.freeformTags, this.definedTags, + this.securityAttributes, this.sourceDbSystemId, this.pointInTimeDataDiskCloneTimestamp, this.dataCollectionOptions); @@ -1332,6 +1360,9 @@ public Builder copy(DbSystemSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("sourceDbSystemId")) { this.sourceDbSystemId(model.getSourceDbSystemId()); } @@ -2374,6 +2405,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the DB * system. @@ -2478,6 +2530,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nextMaintenanceRunId=").append(String.valueOf(this.nextMaintenanceRunId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", sourceDbSystemId=").append(String.valueOf(this.sourceDbSystemId)); sb.append(", pointInTimeDataDiskCloneTimestamp=") .append(String.valueOf(this.pointInTimeDataDiskCloneTimestamp)); @@ -2544,6 +2597,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nextMaintenanceRunId, other.nextMaintenanceRunId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.sourceDbSystemId, other.sourceDbSystemId) && java.util.Objects.equals( this.pointInTimeDataDiskCloneTimestamp, @@ -2664,6 +2718,11 @@ public int hashCode() { : this.nextMaintenanceRunId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.sourceDbSystemId == null ? 43 : this.sourceDbSystemId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java index f561f3397ac..40f94761832 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmCluster.java @@ -55,6 +55,7 @@ public final class ExadbVmCluster "scanDnsRecordId", "freeformTags", "definedTags", + "securityAttributes", "systemTags", "scanDnsName", "zoneId", @@ -102,6 +103,7 @@ public ExadbVmCluster( String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Map> systemTags, String scanDnsName, String zoneId, @@ -148,6 +150,7 @@ public ExadbVmCluster( this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.systemTags = systemTags; this.scanDnsName = scanDnsName; this.zoneId = zoneId; @@ -800,6 +803,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -1051,6 +1078,7 @@ public ExadbVmCluster build() { this.scanDnsRecordId, this.freeformTags, this.definedTags, + this.securityAttributes, this.systemTags, this.scanDnsName, this.zoneId, @@ -1166,6 +1194,9 @@ public Builder copy(ExadbVmCluster model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -1928,6 +1959,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -2159,6 +2211,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); sb.append(", zoneId=").append(String.valueOf(this.zoneId)); @@ -2221,6 +2274,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) && java.util.Objects.equals(this.zoneId, other.zoneId) @@ -2307,6 +2361,11 @@ public int hashCode() { + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java index 1ab18ffe866..6981d91a156 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/ExadbVmClusterSummary.java @@ -55,6 +55,7 @@ public final class ExadbVmClusterSummary "scanDnsRecordId", "freeformTags", "definedTags", + "securityAttributes", "systemTags", "scanDnsName", "zoneId", @@ -101,6 +102,7 @@ public ExadbVmClusterSummary( String scanDnsRecordId, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, java.util.Map> systemTags, String scanDnsName, String zoneId, @@ -146,6 +148,7 @@ public ExadbVmClusterSummary( this.scanDnsRecordId = scanDnsRecordId; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.systemTags = systemTags; this.scanDnsName = scanDnsName; this.zoneId = zoneId; @@ -789,6 +792,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -1039,6 +1066,7 @@ public ExadbVmClusterSummary build() { this.scanDnsRecordId, this.freeformTags, this.definedTags, + this.securityAttributes, this.systemTags, this.scanDnsName, this.zoneId, @@ -1151,6 +1179,9 @@ public Builder copy(ExadbVmClusterSummary model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("systemTags")) { this.systemTags(model.getSystemTags()); } @@ -1906,6 +1937,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * System tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -2136,6 +2188,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", scanDnsRecordId=").append(String.valueOf(this.scanDnsRecordId)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(", scanDnsName=").append(String.valueOf(this.scanDnsName)); sb.append(", zoneId=").append(String.valueOf(this.zoneId)); @@ -2197,6 +2250,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.scanDnsRecordId, other.scanDnsRecordId) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.systemTags, other.systemTags) && java.util.Objects.equals(this.scanDnsName, other.scanDnsName) && java.util.Objects.equals(this.zoneId, other.zoneId) @@ -2280,6 +2334,11 @@ public int hashCode() { + (this.scanDnsRecordId == null ? 43 : this.scanDnsRecordId.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + (this.scanDnsName == null ? 43 : this.scanDnsName.hashCode()); result = (result * PRIME) + (this.zoneId == null ? 43 : this.zoneId.hashCode()); diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java index daf3a6db477..8e39515ba64 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemBase.java @@ -68,6 +68,7 @@ public class LaunchDbSystemBase extends com.oracle.bmc.http.client.internal.Expl "nodeCount", "freeformTags", "definedTags", + "securityAttributes", "privateIp", "dataCollectionOptions" }) @@ -97,6 +98,7 @@ protected LaunchDbSystemBase( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions) { super(); @@ -125,6 +127,7 @@ protected LaunchDbSystemBase( this.nodeCount = nodeCount; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.privateIp = privateIp; this.dataCollectionOptions = dataCollectionOptions; } @@ -720,6 +723,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * A private IP address of your choice. Must be an available IP address within the subnet's * CIDR. If you don't specify a value, Oracle automatically assigns a private IP address from @@ -788,6 +812,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nodeCount=").append(String.valueOf(this.nodeCount)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", privateIp=").append(String.valueOf(this.privateIp)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(")"); @@ -831,6 +856,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nodeCount, other.nodeCount) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.privateIp, other.privateIp) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && super.equals(other); @@ -897,6 +923,11 @@ public int hashCode() { result = (result * PRIME) + (this.nodeCount == null ? 43 : this.nodeCount.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.privateIp == null ? 43 : this.privateIp.hashCode()); result = (result * PRIME) diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java index 460d3e901bb..1faae37d7a9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemDetails.java @@ -255,6 +255,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -381,6 +391,7 @@ public LaunchDbSystemDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.dbHome, @@ -471,6 +482,9 @@ public Builder copy(LaunchDbSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -532,6 +546,7 @@ public LaunchDbSystemDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, CreateDbHomeDetails dbHome, @@ -565,6 +580,7 @@ public LaunchDbSystemDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.dbHome = dbHome; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java index 1451ff79644..69a12f68c98 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromBackupDetails.java @@ -254,6 +254,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -371,6 +381,7 @@ public LaunchDbSystemFromBackupDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.dbHome, @@ -460,6 +471,9 @@ public Builder copy(LaunchDbSystemFromBackupDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -518,6 +532,7 @@ public LaunchDbSystemFromBackupDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, CreateDbHomeFromBackupDetails dbHome, @@ -550,6 +565,7 @@ public LaunchDbSystemFromBackupDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.dbHome = dbHome; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java index 6b95ee655b3..c17b5c6e058 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDatabaseDetails.java @@ -254,6 +254,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -371,6 +381,7 @@ public LaunchDbSystemFromDatabaseDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.dbHome, @@ -460,6 +471,9 @@ public Builder copy(LaunchDbSystemFromDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -518,6 +532,7 @@ public LaunchDbSystemFromDatabaseDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, CreateDbHomeFromDatabaseDetails dbHome, @@ -550,6 +565,7 @@ public LaunchDbSystemFromDatabaseDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.dbHome = dbHome; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java index ec72e924b60..9ac58a1d8a7 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/LaunchDbSystemFromDbSystemDetails.java @@ -254,6 +254,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateIp") private String privateIp; @@ -350,6 +360,7 @@ public LaunchDbSystemFromDbSystemDetails build() { this.nodeCount, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateIp, this.dataCollectionOptions, this.sourceDbSystemId, @@ -438,6 +449,9 @@ public Builder copy(LaunchDbSystemFromDbSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateIp")) { this.privateIp(model.getPrivateIp()); } @@ -493,6 +507,7 @@ public LaunchDbSystemFromDbSystemDetails( Integer nodeCount, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateIp, DataCollectionOptions dataCollectionOptions, String sourceDbSystemId, @@ -524,6 +539,7 @@ public LaunchDbSystemFromDbSystemDetails( nodeCount, freeformTags, definedTags, + securityAttributes, privateIp, dataCollectionOptions); this.sourceDbSystemId = sourceDbSystemId; diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java index 40cfa2141b2..d6b4ea631fb 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UndeleteAutonomousDatabaseDetails.java @@ -363,6 +363,16 @@ public Builder definedTags( return this; } + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + @com.fasterxml.jackson.annotation.JsonProperty("privateEndpointIp") private String privateEndpointIp; @@ -544,6 +554,7 @@ public UndeleteAutonomousDatabaseDetails build() { this.privateEndpointLabel, this.freeformTags, this.definedTags, + this.securityAttributes, this.privateEndpointIp, this.dbVersion, this.customerContacts, @@ -678,6 +689,9 @@ public Builder copy(UndeleteAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("privateEndpointIp")) { this.privateEndpointIp(model.getPrivateEndpointIp()); } @@ -773,6 +787,7 @@ public UndeleteAutonomousDatabaseDetails( String privateEndpointLabel, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String privateEndpointIp, String dbVersion, java.util.List customerContacts, @@ -825,6 +840,7 @@ public UndeleteAutonomousDatabaseDetails( privateEndpointLabel, freeformTags, definedTags, + securityAttributes, privateEndpointIp, dbVersion, customerContacts, diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java index 4113bdac4e5..585cffa2b77 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateAutonomousDatabaseDetails.java @@ -49,6 +49,7 @@ public final class UpdateAutonomousDatabaseDetails "dbName", "freeformTags", "definedTags", + "securityAttributes", "dbWorkload", "licenseModel", "byolComputeCountLimit", @@ -101,6 +102,7 @@ public UpdateAutonomousDatabaseDetails( String dbName, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DbWorkload dbWorkload, LicenseModel licenseModel, Float byolComputeCountLimit, @@ -152,6 +154,7 @@ public UpdateAutonomousDatabaseDetails( this.dbName = dbName; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dbWorkload = dbWorkload; this.licenseModel = licenseModel; this.byolComputeCountLimit = byolComputeCountLimit; @@ -691,6 +694,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The Autonomous Database workload type. The following values are valid: * @@ -1715,6 +1742,7 @@ public UpdateAutonomousDatabaseDetails build() { this.dbName, this.freeformTags, this.definedTags, + this.securityAttributes, this.dbWorkload, this.licenseModel, this.byolComputeCountLimit, @@ -1808,6 +1836,9 @@ public Builder copy(UpdateAutonomousDatabaseDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dbWorkload")) { this.dbWorkload(model.getDbWorkload()); } @@ -2413,6 +2444,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The Autonomous Database workload type. The following values are valid: * @@ -3561,6 +3613,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", dbName=").append(String.valueOf(this.dbName)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dbWorkload=").append(String.valueOf(this.dbWorkload)); sb.append(", licenseModel=").append(String.valueOf(this.licenseModel)); sb.append(", byolComputeCountLimit=").append(String.valueOf(this.byolComputeCountLimit)); @@ -3635,6 +3688,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.dbName, other.dbName) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dbWorkload, other.dbWorkload) && java.util.Objects.equals(this.licenseModel, other.licenseModel) && java.util.Objects.equals(this.byolComputeCountLimit, other.byolComputeCountLimit) @@ -3726,6 +3780,11 @@ public int hashCode() { result = (result * PRIME) + (this.dbName == null ? 43 : this.dbName.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dbWorkload == null ? 43 : this.dbWorkload.hashCode()); result = (result * PRIME) + (this.licenseModel == null ? 43 : this.licenseModel.hashCode()); result = diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java index 9bae3846166..11223981380 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudAutonomousVmClusterDetails.java @@ -33,7 +33,8 @@ public final class UpdateCloudAutonomousVmClusterDetails "licenseModel", "nsgIds", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public UpdateCloudAutonomousVmClusterDetails( String description, @@ -45,7 +46,8 @@ public UpdateCloudAutonomousVmClusterDetails( LicenseModel licenseModel, java.util.List nsgIds, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.description = description; this.displayName = displayName; @@ -57,6 +59,7 @@ public UpdateCloudAutonomousVmClusterDetails( this.nsgIds = nsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -276,6 +279,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -292,7 +319,8 @@ public UpdateCloudAutonomousVmClusterDetails build() { this.licenseModel, this.nsgIds, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -331,6 +359,9 @@ public Builder copy(UpdateCloudAutonomousVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -582,6 +613,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -610,6 +662,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -637,6 +690,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -670,6 +724,11 @@ public int hashCode() { result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java index f1dfc20554e..04e336ce49d 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateCloudVmClusterDetails.java @@ -39,6 +39,7 @@ public final class UpdateCloudVmClusterDetails "storageSizeInGBs", "freeformTags", "definedTags", + "securityAttributes", "dataCollectionOptions", "fileSystemConfigurationDetails" }) @@ -58,6 +59,7 @@ public UpdateCloudVmClusterDetails( Integer storageSizeInGBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DataCollectionOptions dataCollectionOptions, java.util.List fileSystemConfigurationDetails) { super(); @@ -76,6 +78,7 @@ public UpdateCloudVmClusterDetails( this.storageSizeInGBs = storageSizeInGBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; this.fileSystemConfigurationDetails = fileSystemConfigurationDetails; } @@ -358,6 +361,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private DataCollectionOptions dataCollectionOptions; @@ -405,6 +432,7 @@ public UpdateCloudVmClusterDetails build() { this.storageSizeInGBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.dataCollectionOptions, this.fileSystemConfigurationDetails); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -460,6 +488,9 @@ public Builder copy(UpdateCloudVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } @@ -754,6 +785,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private final DataCollectionOptions dataCollectionOptions; @@ -804,6 +856,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", storageSizeInGBs=").append(String.valueOf(this.storageSizeInGBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(", fileSystemConfigurationDetails=") .append(String.valueOf(this.fileSystemConfigurationDetails)); @@ -837,6 +890,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.storageSizeInGBs, other.storageSizeInGBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && java.util.Objects.equals( this.fileSystemConfigurationDetails, other.fileSystemConfigurationDetails) @@ -882,6 +936,11 @@ public int hashCode() { + (this.storageSizeInGBs == null ? 43 : this.storageSizeInGBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dataCollectionOptions == null diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java index f767703b325..3047060b869 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateDbSystemDetails.java @@ -34,6 +34,7 @@ public final class UpdateDbSystemDetails "recoStorageSizeInGBs", "freeformTags", "definedTags", + "securityAttributes", "shape", "nsgIds", "backupNetworkNsgIds", @@ -49,6 +50,7 @@ public UpdateDbSystemDetails( Integer recoStorageSizeInGBs, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, String shape, java.util.List nsgIds, java.util.List backupNetworkNsgIds, @@ -63,6 +65,7 @@ public UpdateDbSystemDetails( this.recoStorageSizeInGBs = recoStorageSizeInGBs; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.shape = shape; this.nsgIds = nsgIds; this.backupNetworkNsgIds = backupNetworkNsgIds; @@ -215,6 +218,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * The shape of the DB system. The shape determines resources allocated to the DB system. - * For virtual machine shapes, the number of CPU cores and memory @@ -349,6 +376,7 @@ public UpdateDbSystemDetails build() { this.recoStorageSizeInGBs, this.freeformTags, this.definedTags, + this.securityAttributes, this.shape, this.nsgIds, this.backupNetworkNsgIds, @@ -384,6 +412,9 @@ public Builder copy(UpdateDbSystemDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("shape")) { this.shape(model.getShape()); } @@ -540,6 +571,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * The shape of the DB system. The shape determines resources allocated to the DB system. - For * virtual machine shapes, the number of CPU cores and memory @@ -702,6 +754,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", recoStorageSizeInGBs=").append(String.valueOf(this.recoStorageSizeInGBs)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", nsgIds=").append(String.valueOf(this.nsgIds)); sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); @@ -730,6 +783,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.recoStorageSizeInGBs, other.recoStorageSizeInGBs) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.shape, other.shape) && java.util.Objects.equals(this.nsgIds, other.nsgIds) && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) @@ -761,6 +815,11 @@ public int hashCode() { : this.recoStorageSizeInGBs.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.shape == null ? 43 : this.shape.hashCode()); result = (result * PRIME) + (this.nsgIds == null ? 43 : this.nsgIds.hashCode()); result = diff --git a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java index e99a75bcabf..ce003e237d9 100644 --- a/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java +++ b/bmc-database/src/main/java/com/oracle/bmc/database/model/UpdateExadbVmClusterDetails.java @@ -36,6 +36,7 @@ public final class UpdateExadbVmClusterDetails "backupNetworkNsgIds", "freeformTags", "definedTags", + "securityAttributes", "dataCollectionOptions", "systemVersion", "gridImageId", @@ -53,6 +54,7 @@ public UpdateExadbVmClusterDetails( java.util.List backupNetworkNsgIds, java.util.Map freeformTags, java.util.Map> definedTags, + java.util.Map> securityAttributes, DataCollectionOptions dataCollectionOptions, String systemVersion, String gridImageId, @@ -69,6 +71,7 @@ public UpdateExadbVmClusterDetails( this.backupNetworkNsgIds = backupNetworkNsgIds; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; this.dataCollectionOptions = dataCollectionOptions; this.systemVersion = systemVersion; this.gridImageId = gridImageId; @@ -293,6 +296,30 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * Example: {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private DataCollectionOptions dataCollectionOptions; @@ -383,6 +410,7 @@ public UpdateExadbVmClusterDetails build() { this.backupNetworkNsgIds, this.freeformTags, this.definedTags, + this.securityAttributes, this.dataCollectionOptions, this.systemVersion, this.gridImageId, @@ -428,6 +456,9 @@ public Builder copy(UpdateExadbVmClusterDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("dataCollectionOptions")) { this.dataCollectionOptions(model.getDataCollectionOptions()); } @@ -678,6 +709,27 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security Attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"Oracle-ZPR": {"MaxEgressCount": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @com.fasterxml.jackson.annotation.JsonProperty("dataCollectionOptions") private final DataCollectionOptions dataCollectionOptions; @@ -801,6 +853,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backupNetworkNsgIds=").append(String.valueOf(this.backupNetworkNsgIds)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", dataCollectionOptions=").append(String.valueOf(this.dataCollectionOptions)); sb.append(", systemVersion=").append(String.valueOf(this.systemVersion)); sb.append(", gridImageId=").append(String.valueOf(this.gridImageId)); @@ -830,6 +883,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backupNetworkNsgIds, other.backupNetworkNsgIds) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.dataCollectionOptions, other.dataCollectionOptions) && java.util.Objects.equals(this.systemVersion, other.systemVersion) && java.util.Objects.equals(this.gridImageId, other.gridImageId) @@ -866,6 +920,11 @@ public int hashCode() { : this.backupNetworkNsgIds.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.dataCollectionOptions == null diff --git a/bmc-databasemanagement/pom.xml b/bmc-databasemanagement/pom.xml index 3a6ce38e895..40df8a11d26 100644 --- a/bmc-databasemanagement/pom.xml +++ b/bmc-databasemanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-databasemanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-databasemigration/pom.xml b/bmc-databasemigration/pom.xml index fc31a75e03f..9865f7a0475 100644 --- a/bmc-databasemigration/pom.xml +++ b/bmc-databasemigration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-databasemigration @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-databasetools/pom.xml b/bmc-databasetools/pom.xml index 7afaf28a708..edf2593e085 100644 --- a/bmc-databasetools/pom.xml +++ b/bmc-databasetools/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-databasetools @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-datacatalog/pom.xml b/bmc-datacatalog/pom.xml index 26cc12cd197..6c6b675af2b 100644 --- a/bmc-datacatalog/pom.xml +++ b/bmc-datacatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-datacatalog @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-dataflow/pom.xml b/bmc-dataflow/pom.xml index d8e5a7b50f4..8775a08ab52 100644 --- a/bmc-dataflow/pom.xml +++ b/bmc-dataflow/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-dataflow @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-dataintegration/pom.xml b/bmc-dataintegration/pom.xml index 98c72c68a4a..addf5817884 100644 --- a/bmc-dataintegration/pom.xml +++ b/bmc-dataintegration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-dataintegration @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-datalabelingservice/pom.xml b/bmc-datalabelingservice/pom.xml index 578b4bdf38f..9c9699f1a52 100644 --- a/bmc-datalabelingservice/pom.xml +++ b/bmc-datalabelingservice/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-datalabelingservice @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-datalabelingservicedataplane/pom.xml b/bmc-datalabelingservicedataplane/pom.xml index 91663f6ab63..49f9145df15 100644 --- a/bmc-datalabelingservicedataplane/pom.xml +++ b/bmc-datalabelingservicedataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-datalabelingservicedataplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-datasafe/pom.xml b/bmc-datasafe/pom.xml index 09c9679831d..5c6ce3f8587 100644 --- a/bmc-datasafe/pom.xml +++ b/bmc-datasafe/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-datasafe @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-datascience/pom.xml b/bmc-datascience/pom.xml index 8feaea5ba74..78c99ad1d2e 100644 --- a/bmc-datascience/pom.xml +++ b/bmc-datascience/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-datascience @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-delegateaccesscontrol/pom.xml b/bmc-delegateaccesscontrol/pom.xml index 0657103d709..f48aa536524 100644 --- a/bmc-delegateaccesscontrol/pom.xml +++ b/bmc-delegateaccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-delegateaccesscontrol @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-demandsignal/pom.xml b/bmc-demandsignal/pom.xml index 5b367faa89a..c10fa897582 100644 --- a/bmc-demandsignal/pom.xml +++ b/bmc-demandsignal/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-demandsignal @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-desktops/pom.xml b/bmc-desktops/pom.xml index bbc03fd5c2d..e13f6fbb3a2 100644 --- a/bmc-desktops/pom.xml +++ b/bmc-desktops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-desktops @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-devops/pom.xml b/bmc-devops/pom.xml index 9aaa2019532..71d66c8a8d9 100644 --- a/bmc-devops/pom.xml +++ b/bmc-devops/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-devops @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-disasterrecovery/pom.xml b/bmc-disasterrecovery/pom.xml index 899f8a072b3..3ed599c02eb 100644 --- a/bmc-disasterrecovery/pom.xml +++ b/bmc-disasterrecovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-disasterrecovery @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-dns/pom.xml b/bmc-dns/pom.xml index 2f6b009fdbf..fcfb635a427 100644 --- a/bmc-dns/pom.xml +++ b/bmc-dns/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-workrequests - 3.50.0 + 3.50.1 diff --git a/bmc-dts/pom.xml b/bmc-dts/pom.xml index cbce13bd8c6..eddc9cd5862 100644 --- a/bmc-dts/pom.xml +++ b/bmc-dts/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-dts @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-email/pom.xml b/bmc-email/pom.xml index f7863e8c3ba..28da189945a 100644 --- a/bmc-email/pom.xml +++ b/bmc-email/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-emaildataplane/pom.xml b/bmc-emaildataplane/pom.xml index 701353ede88..4dab5c6cfa2 100644 --- a/bmc-emaildataplane/pom.xml +++ b/bmc-emaildataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-emaildataplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-emwarehouse/pom.xml b/bmc-emwarehouse/pom.xml index 437c0d011d9..ebe28664bc2 100644 --- a/bmc-emwarehouse/pom.xml +++ b/bmc-emwarehouse/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-emwarehouse @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-encryption/pom.xml b/bmc-encryption/pom.xml index 8c15e2c8b17..a1551d41d6d 100644 --- a/bmc-encryption/pom.xml +++ b/bmc-encryption/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,17 +18,17 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-common-httpclient - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-keymanagement - 3.50.0 + 3.50.1 com.fasterxml.jackson.core @@ -43,7 +43,7 @@ com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 test diff --git a/bmc-enforcer-rules/pom.xml b/bmc-enforcer-rules/pom.xml index b73a01705f5..4de4bee61fb 100644 --- a/bmc-enforcer-rules/pom.xml +++ b/bmc-enforcer-rules/pom.xml @@ -6,7 +6,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 oci-java-sdk-enforcer-rules diff --git a/bmc-events/pom.xml b/bmc-events/pom.xml index 1957c24531c..ad791f0a524 100644 --- a/bmc-events/pom.xml +++ b/bmc-events/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-events @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-examples/pom.xml b/bmc-examples/pom.xml index db1506ad45f..760cbe93161 100644 --- a/bmc-examples/pom.xml +++ b/bmc-examples/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-examples @@ -71,14 +71,14 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 pom import @@ -730,5 +730,13 @@ com.oracle.oci.sdk oci-java-sdk-generativeaiagentruntime + + com.oracle.oci.sdk + oci-java-sdk-securityattribute + + + com.oracle.oci.sdk + oci-java-sdk-zpr + \ No newline at end of file diff --git a/bmc-examples/src/main/java/AutonomousDatawarehouseExample.java b/bmc-examples/src/main/java/AutonomousDataWarehouseExample.java similarity index 99% rename from bmc-examples/src/main/java/AutonomousDatawarehouseExample.java rename to bmc-examples/src/main/java/AutonomousDataWarehouseExample.java index 710f1ba3f66..eb7717da4b4 100644 --- a/bmc-examples/src/main/java/AutonomousDatawarehouseExample.java +++ b/bmc-examples/src/main/java/AutonomousDataWarehouseExample.java @@ -27,7 +27,8 @@ import java.util.zip.ZipInputStream; import java.util.Random; -public class AutonomousDatawarehouseExample { +/** See also: AutonomousDatabaseExample */ +public class AutonomousDataWarehouseExample { public static void main(String[] args) throws Exception { String configurationFilePath = "~/.oci/config"; diff --git a/bmc-examples/src/main/java/AutonomousDatabaseCrossRegionDisasterRecoveryExample.java b/bmc-examples/src/main/java/AutonomousDatabaseCrossRegionDisasterRecoveryExample.java new file mode 100644 index 00000000000..6d0b4c0fb6e --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousDatabaseCrossRegionDisasterRecoveryExample.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.model.AutonomousDatabase; +import com.oracle.bmc.database.model.AutonomousDatabasePeerSummary; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseBase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseDetails; +import com.oracle.bmc.database.model.CreateCrossRegionDisasterRecoveryDetails; +import com.oracle.bmc.database.model.DisasterRecoveryConfiguration; +import com.oracle.bmc.database.requests.CreateAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.ListAutonomousDatabasePeersRequest; +import com.oracle.bmc.database.requests.SwitchoverAutonomousDatabaseRequest; +import com.oracle.bmc.database.responses.CreateAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.DeleteAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.ListAutonomousDatabasePeersResponse; +import com.oracle.bmc.database.responses.SwitchoverAutonomousDatabaseResponse; + +/** See also: AutonomousDataWarehouseExample */ +public class AutonomousDatabaseCrossRegionDisasterRecoveryExample { + public static void main(String[] args) throws Exception { + final String profile = "DEFAULT"; + + if (args.length != 2) { + throw new IllegalArgumentException( + String.format( + "Unexpected number of arguments. Expected 3, got %s", args.length)); + } + + // get values from arguments + final String compartmentId = args[0]; + final String password = args[1]; + + // Configuring the AuthenticationDetailsProvider. It's assuming there is a default OCI + // config file + // "~/.oci/config", and a profile in that config with the name "DEFAULT". Make changes to + // the following + // line if needed and use ConfigFileReader.parse(configurationFilePath, profile); + + final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault(); + + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + + final DatabaseClient dbClientPhoenix = + DatabaseClient.builder().region(Region.US_PHOENIX_1).build(provider); + final DatabaseClient dbClientAshburn = + DatabaseClient.builder().region(Region.US_ASHBURN_1).build(provider); + + System.out.println( + "Example - Creating a database, then enabling Cross Region Disaster Recovery, and performing a switchover"); + CreateAutonomousDatabaseDetails createAutonomousDatabaseCloneDetails = + CreateAutonomousDatabaseDetails.builder() + .compartmentId(compartmentId) + .adminPassword(password) + .computeCount(4f) + .computeModel(CreateAutonomousDatabaseBase.ComputeModel.Ecpu) + .dataStorageSizeInGBs(20) + .dbName("exampleCloneAdb") + .dbWorkload(CreateAutonomousDatabaseBase.DbWorkload.Oltp) + .build(); + + CreateAutonomousDatabaseResponse createAutonomousDatabaseResponse = + dbClientPhoenix.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails( + createAutonomousDatabaseCloneDetails) + .build()); + + AutonomousDatabase autonomousDatabaseAdgSource = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + // Create the cross region disaster recovery peer, using Autonomous Data Guard disaster + // recovery + CreateCrossRegionDisasterRecoveryDetails createCrossRegionDisasterRecoveryDetails = + CreateCrossRegionDisasterRecoveryDetails.builder() + .compartmentId(compartmentId) + .remoteDisasterRecoveryType( + DisasterRecoveryConfiguration.DisasterRecoveryType.BackupBased) + .sourceId(autonomousDatabaseAdgSource.getId()) + .build(); + + // note: this is peer is being created in Ashburn and not Phoenix + createAutonomousDatabaseResponse = + dbClientAshburn.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails( + createCrossRegionDisasterRecoveryDetails) + .build()); + + AutonomousDatabase autonomousDatabaseAdgPeer = + waitForInstanceToBecomeAvailable( + dbClientAshburn, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.printf( + "For %s database, the role is %s%n", + autonomousDatabaseAdgSource.getId(), autonomousDatabaseAdgSource.getRole()); + + System.out.printf( + "For %s database, the role is %s%n", + autonomousDatabaseAdgPeer.getId(), autonomousDatabaseAdgPeer.getRole()); + + // let's also list the peers of each database + ListAutonomousDatabasePeersResponse listAutonomousDatabasePeersResponse = + dbClientPhoenix.listAutonomousDatabasePeers( + ListAutonomousDatabasePeersRequest.builder() + .autonomousDatabaseId(autonomousDatabaseAdgSource.getId()) + .build()); + + System.out.printf( + "%s database has the following peers:%n", autonomousDatabaseAdgSource.getId()); + listAutonomousDatabasePeersResponse.getAutonomousDatabasePeerCollection().getItems() + .stream() + .map(AutonomousDatabasePeerSummary::getId) + .forEach(System.out::println); + System.out.println(); + + listAutonomousDatabasePeersResponse = + dbClientAshburn.listAutonomousDatabasePeers( + ListAutonomousDatabasePeersRequest.builder() + .autonomousDatabaseId(autonomousDatabaseAdgPeer.getId()) + .build()); + + System.out.printf( + "%s database has the following peers:%n", autonomousDatabaseAdgPeer.getId()); + listAutonomousDatabasePeersResponse.getAutonomousDatabasePeerCollection().getItems() + .stream() + .map(AutonomousDatabasePeerSummary::getId) + .forEach(System.out::println); + System.out.println(); + + // now let's perform a switchover from PHX to IAD + SwitchoverAutonomousDatabaseResponse switchoverAutonomousDatabaseResponse = + dbClientAshburn.switchoverAutonomousDatabase( + SwitchoverAutonomousDatabaseRequest.builder() + .peerDbId(autonomousDatabaseAdgSource.getId()) + .autonomousDatabaseId(autonomousDatabaseAdgPeer.getId()) + .build()); + System.out.printf( + "The switchover work request is %s%n", + switchoverAutonomousDatabaseResponse.getOpcWorkRequestId()); + + // wait for both instances to become available again + autonomousDatabaseAdgSource = + waitForInstanceToBecomeAvailable(dbClientPhoenix, autonomousDatabaseAdgSource); + autonomousDatabaseAdgPeer = + waitForInstanceToBecomeAvailable(dbClientAshburn, autonomousDatabaseAdgPeer); + + System.out.printf( + "For %s database, the role is %s%n", + autonomousDatabaseAdgSource.getId(), autonomousDatabaseAdgSource.getRole()); + + System.out.printf( + "For %s database, the role is %s%n", + autonomousDatabaseAdgPeer.getId(), autonomousDatabaseAdgPeer.getRole()); + + System.out.println("Cleaning up all the resources created during this example:"); + DeleteAutonomousDatabaseResponse deleteAutonomousDatabaseResponse = + dbClientPhoenix.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabaseAdgSource.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientPhoenix, autonomousDatabaseAdgSource); + deleteAutonomousDatabaseResponse = + dbClientAshburn.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabaseAdgPeer.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientAshburn, autonomousDatabaseAdgPeer); + System.out.println("All resources created during this example have been cleaned up!"); + } + + private static AutonomousDatabase waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Available, + AutonomousDatabase.LifecycleState.Standby) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBecomeTerminated( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Terminated) + .execute(); + + return response.getAutonomousDatabase(); + } +} diff --git a/bmc-examples/src/main/java/AutonomousDatabaseKMSExample.java b/bmc-examples/src/main/java/AutonomousDatabaseKMSExample.java new file mode 100644 index 00000000000..3a60f0f3bd0 --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousDatabaseKMSExample.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.model.AutonomousDatabase; +import com.oracle.bmc.database.model.ConfigureAutonomousDatabaseVaultKeyDetails; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseBase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseDetails; +import com.oracle.bmc.database.requests.ConfigureAutonomousDatabaseVaultKeyRequest; +import com.oracle.bmc.database.requests.CreateAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDatabaseRequest; +import com.oracle.bmc.database.responses.ConfigureAutonomousDatabaseVaultKeyResponse; +import com.oracle.bmc.database.responses.CreateAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.DeleteAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDatabaseResponse; + +/** See also: AutonomousDataWarehouseExample */ +public class AutonomousDatabaseKMSExample { + public static void main(String[] args) throws Exception { + final String profile = "DEFAULT"; + + if (args.length != 4) { + throw new IllegalArgumentException( + String.format( + "Unexpected number of arguments. Expected 4, got %s", args.length)); + } + + // get values from arguments + final String compartmentId = args[0]; + final String password = args[1]; + final String kmsKeyId = args[2]; + final String kmsVaultId = args[3]; + + // Configuring the AuthenticationDetailsProvider. It's assuming there is a default OCI + // config file + // "~/.oci/config", and a profile in that config with the name "DEFAULT". Make changes to + // the following + // line if needed and use ConfigFileReader.parse(configurationFilePath, profile); + + final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault(); + + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + + final DatabaseClient dbClientPhoenix = + DatabaseClient.builder().region(Region.US_PHOENIX_1).build(provider); + + System.out.println("Example - Creating a database and using KMS to manage its encryption:"); + CreateAutonomousDatabaseDetails createAutonomousDatabaseDetails = + CreateAutonomousDatabaseDetails.builder() + .compartmentId(compartmentId) + .vaultId(kmsVaultId) + .kmsKeyId(kmsKeyId) + .adminPassword(password) + .computeCount(4f) + .computeModel(CreateAutonomousDatabaseBase.ComputeModel.Ecpu) + .dataStorageSizeInGBs(20) + .dbName("exampleKMSAdb") + .dbWorkload(CreateAutonomousDatabaseBase.DbWorkload.Oltp) + .build(); + + CreateAutonomousDatabaseResponse createAutonomousDatabaseResponse = + dbClientPhoenix.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails(createAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "Created %s database, now waiting for it to become available...%n", + createAutonomousDatabaseResponse.getAutonomousDatabase().getId()); + + // waiting for the instance to become available in order to perform other operations + AutonomousDatabase autonomousDatabase = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.printf( + "%s database is now available, with KMS key: %s %n", + autonomousDatabase.getId(), autonomousDatabase.getKmsKeyId()); + + System.out.printf( + "Disabling KMS on %s database, switching to an Oracle managed key: %n", + autonomousDatabase.getId()); + ConfigureAutonomousDatabaseVaultKeyResponse configureAutonomousDatabaseVaultKeyResponse = + dbClientPhoenix.configureAutonomousDatabaseVaultKey( + ConfigureAutonomousDatabaseVaultKeyRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .configureAutonomousDatabaseVaultKeyDetails( + ConfigureAutonomousDatabaseVaultKeyDetails.builder() + .kmsKeyId(null) + .build()) // set the key id to null to disable + .build()); + + System.out.printf( + "Work request id to disable KMS %s%n", + configureAutonomousDatabaseVaultKeyResponse.getOpcWorkRequestId()); + + // waiting for the instance to become available in order to perform other operations + autonomousDatabase = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.println("Cleaning up all the resources created during this example:"); + DeleteAutonomousDatabaseResponse deleteAutonomousDatabaseResponse = + dbClientPhoenix.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientPhoenix, autonomousDatabase); + System.out.println("All resources created during this example have been cleaned up!"); + } + + private static AutonomousDatabase waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Available) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBecomeTerminated( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Terminated) + .execute(); + + return response.getAutonomousDatabase(); + } +} diff --git a/bmc-examples/src/main/java/AutonomousDatabasePrivateEndpointExample.java b/bmc-examples/src/main/java/AutonomousDatabasePrivateEndpointExample.java new file mode 100644 index 00000000000..f9afcc37ffd --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousDatabasePrivateEndpointExample.java @@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.auth.SessionTokenAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.model.AutonomousDatabase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseBase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseDetails; +import com.oracle.bmc.database.model.UpdateAutonomousDatabaseDetails; +import com.oracle.bmc.database.requests.CreateAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.UpdateAutonomousDatabaseRequest; +import com.oracle.bmc.database.responses.CreateAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.DeleteAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.UpdateAutonomousDatabaseResponse; + +/** See also: AutonomousDataWarehouseExample */ +public class AutonomousDatabasePrivateEndpointExample { + public static void main(String[] args) throws Exception { + final String profile = "DEFAULT"; + + if (args.length != 3) { + throw new IllegalArgumentException( + String.format( + "Unexpected number of arguments. Expected 3, got %s", args.length)); + } + + // get values from arguments + final String compartmentId = args[0]; + final String password = args[1]; + final String subnetId = args[2]; + + // Configuring the AuthenticationDetailsProvider. It's assuming there is a default OCI + // config file + // "~/.oci/config", and a profile in that config with the name "DEFAULT". Make changes to + // the following + // line if needed and use ConfigFileReader.parse(configurationFilePath, profile); + + final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault(); + + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + + final DatabaseClient dbClientPhoenix = + DatabaseClient.builder().region(Region.US_PHOENIX_1).build(provider); + + System.out.println( + "Example - Creating a database with fairly minimal parameters and enabling Private Endpoint"); + CreateAutonomousDatabaseDetails createAutonomousDatabaseDetails = + CreateAutonomousDatabaseDetails.builder() + .compartmentId(compartmentId) + .adminPassword(password) + .computeCount(4f) + .computeModel(CreateAutonomousDatabaseBase.ComputeModel.Ecpu) + .dataStorageSizeInTBs(1) + .dbName("exampleAdb") + .dbWorkload(CreateAutonomousDatabaseBase.DbWorkload.Oltp) + .build(); + + CreateAutonomousDatabaseResponse createAutonomousDatabaseResponse = + dbClientPhoenix.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails(createAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "Created %s database, now waiting for it to become available...%n", + createAutonomousDatabaseResponse.getAutonomousDatabase().getId()); + + // waiting for the instance to become available in order to perform other operations + AutonomousDatabase autonomousDatabase = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + // let's enable private endpoint within the subnet id given and the host name prefix set to + // "hostname-prefix" + UpdateAutonomousDatabaseDetails updateAutonomousDatabaseDetails = + UpdateAutonomousDatabaseDetails.builder() + .subnetId(subnetId) + .privateEndpointLabel("hostname-prefix") + .build(); + + UpdateAutonomousDatabaseResponse updateAutonomousDatabaseResponse = + dbClientPhoenix.updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .updateAutonomousDatabaseDetails(updateAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "Work request id to enable private endpoint %s%n", + updateAutonomousDatabaseResponse.getOpcWorkRequestId()); + + autonomousDatabase = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, updateAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.printf( + "For %s database, the subnet id is %s and the host name prefix is %s%n", + autonomousDatabase.getId(), + autonomousDatabase.getSubnetId(), + autonomousDatabase.getPrivateEndpointLabel()); + + System.out.println("Cleaning up all the resources created during this example:"); + DeleteAutonomousDatabaseResponse deleteAutonomousDatabaseResponse = + dbClientPhoenix.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientPhoenix, autonomousDatabase); + System.out.println("All resources created during this example have been cleaned up!"); + } + + private static AutonomousDatabase waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Available) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBecomeTerminated( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Terminated) + .execute(); + + return response.getAutonomousDatabase(); + } +} diff --git a/bmc-examples/src/main/java/AutonomousDatabaseResourcePoolExample.java b/bmc-examples/src/main/java/AutonomousDatabaseResourcePoolExample.java new file mode 100644 index 00000000000..e73e3c85066 --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousDatabaseResourcePoolExample.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.model.AutonomousDatabase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseBase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseDetails; +import com.oracle.bmc.database.model.ResourcePoolSummary; +import com.oracle.bmc.database.model.UpdateAutonomousDatabaseDetails; +import com.oracle.bmc.database.requests.CreateAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.UpdateAutonomousDatabaseRequest; +import com.oracle.bmc.database.responses.CreateAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.DeleteAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.UpdateAutonomousDatabaseResponse; + +/** See also: AutonomousDataWarehouseExample */ +public class AutonomousDatabaseResourcePoolExample { + public static void main(String[] args) throws Exception { + final String profile = "DEFAULT"; + + if (args.length != 2) { + throw new IllegalArgumentException( + String.format( + "Unexpected number of arguments. Expected 2, got %s", args.length)); + } + + // get values from arguments + final String compartmentId = args[0]; + final String password = args[1]; + + // Configuring the AuthenticationDetailsProvider. It's assuming there is a default OCI + // config file + // "~/.oci/config", and a profile in that config with the name "DEFAULT". Make changes to + // the following + // line if needed and use ConfigFileReader.parse(configurationFilePath, profile); + + final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault(); + + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + + final DatabaseClient dbClientPhoenix = + DatabaseClient.builder().region(Region.US_PHOENIX_1).build(provider); + + System.out.println( + "Example 3 - creating a resource pool, having a database join the pool, then disabling resource pool"); + CreateAutonomousDatabaseDetails createAutonomousDatabaseDetailsWithResourcePool = + CreateAutonomousDatabaseDetails.builder() + .compartmentId(compartmentId) + .adminPassword(password) + .computeCount(4f) + .computeModel(CreateAutonomousDatabaseBase.ComputeModel.Ecpu) + .dataStorageSizeInTBs(1) + .dbName("examplePoolAdb") + .dbWorkload(CreateAutonomousDatabaseBase.DbWorkload.Oltp) + .resourcePoolSummary( + ResourcePoolSummary.builder() + .poolSize(128) + .build()) // pool has 128 ECPU of which this ADB will use 4 + .build(); + + CreateAutonomousDatabaseResponse createAutonomousDatabaseResponse = + dbClientPhoenix.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails( + createAutonomousDatabaseDetailsWithResourcePool) + .build()); + + System.out.printf( + "Created %s database, now waiting for it to become available...%n", + createAutonomousDatabaseResponse.getAutonomousDatabase().getId()); + + // waiting for the instance to become available in order to perform other operations + AutonomousDatabase autonomousDatabasePoolLeader = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.printf( + "For %s database, pool size is %s%n", + autonomousDatabasePoolLeader.getId(), + autonomousDatabasePoolLeader.getResourcePoolSummary().getPoolSize()); + + // Let's create another database that we can add to the pool + CreateAutonomousDatabaseDetails createAutonomousDatabaseDetails = + CreateAutonomousDatabaseDetails.builder() + .compartmentId(compartmentId) + .adminPassword(password) + .computeCount(4f) + .computeModel(CreateAutonomousDatabaseBase.ComputeModel.Ecpu) + .dataStorageSizeInTBs(1) + .dbName("examplePoolMemberAdb") + .dbWorkload(CreateAutonomousDatabaseBase.DbWorkload.Oltp) + .build(); + + createAutonomousDatabaseResponse = + dbClientPhoenix.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails(createAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "Created %s database, now waiting for it to become available...%n", + createAutonomousDatabaseResponse.getAutonomousDatabase().getId()); + + // waiting for the instance to become available in order to perform other operations + AutonomousDatabase autonomousDatabasePoolMember = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + UpdateAutonomousDatabaseDetails updateAutonomousDatabaseDetails = + UpdateAutonomousDatabaseDetails.builder() + .resourcePoolLeaderId(autonomousDatabasePoolLeader.getId()) + .build(); + + UpdateAutonomousDatabaseResponse updateAutonomousDatabaseResponse = + dbClientPhoenix.updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabasePoolMember.getId()) + .updateAutonomousDatabaseDetails(updateAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "The work request to join the resource pool is %s%n", + updateAutonomousDatabaseResponse.getOpcWorkRequestId()); + + autonomousDatabasePoolMember = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, updateAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.printf( + "%s database is in a resource pool lead by %s%n", + autonomousDatabasePoolMember.getId(), + autonomousDatabasePoolMember.getResourcePoolLeaderId()); + + System.out.println("Cleaning up all the resource pool member created during this example:"); + DeleteAutonomousDatabaseResponse deleteAutonomousDatabaseResponse = + dbClientPhoenix.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabasePoolMember.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientPhoenix, autonomousDatabasePoolMember); + + System.out.println("Disabling resource pool on the leader:"); + updateAutonomousDatabaseDetails = + UpdateAutonomousDatabaseDetails.builder() + .resourcePoolSummary(ResourcePoolSummary.builder().build()) + .build(); + + updateAutonomousDatabaseResponse = + dbClientPhoenix.updateAutonomousDatabase( + UpdateAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabasePoolLeader.getId()) + .updateAutonomousDatabaseDetails(updateAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "The work request to disable the resource pool is %s%n", + updateAutonomousDatabaseResponse.getOpcWorkRequestId()); + + autonomousDatabasePoolLeader = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, updateAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.println("Cleaning up all the resource pool leader created during this example:"); + deleteAutonomousDatabaseResponse = + dbClientPhoenix.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabasePoolLeader.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientPhoenix, autonomousDatabasePoolLeader); + System.out.println("All resources created during this example have been cleaned up!"); + } + + private static AutonomousDatabase waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Available) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBecomeTerminated( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Terminated) + .execute(); + + return response.getAutonomousDatabase(); + } +} diff --git a/bmc-examples/src/main/java/AutonomousDatabaseSecretIdExample.java b/bmc-examples/src/main/java/AutonomousDatabaseSecretIdExample.java new file mode 100644 index 00000000000..41dbd280baa --- /dev/null +++ b/bmc-examples/src/main/java/AutonomousDatabaseSecretIdExample.java @@ -0,0 +1,117 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +import com.oracle.bmc.ConfigFileReader; +import com.oracle.bmc.Region; +import com.oracle.bmc.auth.AuthenticationDetailsProvider; +import com.oracle.bmc.auth.ConfigFileAuthenticationDetailsProvider; +import com.oracle.bmc.database.DatabaseClient; +import com.oracle.bmc.database.model.AutonomousDatabase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseBase; +import com.oracle.bmc.database.model.CreateAutonomousDatabaseDetails; +import com.oracle.bmc.database.requests.CreateAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.DeleteAutonomousDatabaseRequest; +import com.oracle.bmc.database.requests.GetAutonomousDatabaseRequest; +import com.oracle.bmc.database.responses.CreateAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.DeleteAutonomousDatabaseResponse; +import com.oracle.bmc.database.responses.GetAutonomousDatabaseResponse; + +/** See also: AutonomousDataWarehouseExample */ +public class AutonomousDatabaseSecretIdExample { + public static void main(String[] args) throws Exception { + final String profile = "DEFAULT"; + + if (args.length != 3) { + throw new IllegalArgumentException( + String.format( + "Unexpected number of arguments. Expected 3, got %s", args.length)); + } + + // get values from arguments + final String compartmentId = args[0]; + final String secretId = args[1]; + final String secretVersionNumber = args[2]; + + // Configuring the AuthenticationDetailsProvider. It's assuming there is a default OCI + // config file + // "~/.oci/config", and a profile in that config with the name "DEFAULT". Make changes to + // the following + // line if needed and use ConfigFileReader.parse(configurationFilePath, profile); + + final ConfigFileReader.ConfigFile configFile = ConfigFileReader.parseDefault(); + + final AuthenticationDetailsProvider provider = + new ConfigFileAuthenticationDetailsProvider(configFile); + + final DatabaseClient dbClientPhoenix = + DatabaseClient.builder().region(Region.US_PHOENIX_1).build(provider); + + System.out.println( + "Example - Creating a database using a password stored in a managed secret instead of passing an admin password during provisioning:"); + CreateAutonomousDatabaseDetails createAutonomousDatabaseDetails = + CreateAutonomousDatabaseDetails.builder() + .compartmentId(compartmentId) + .secretVersionNumber(Integer.parseInt(secretVersionNumber)) + .secretId(secretId) + .computeCount(4f) + .computeModel(CreateAutonomousDatabaseBase.ComputeModel.Ecpu) + .dataStorageSizeInGBs(20) + .dbName("exampleVaultSecretAdb") + .dbWorkload(CreateAutonomousDatabaseBase.DbWorkload.Oltp) + .build(); + + CreateAutonomousDatabaseResponse createAutonomousDatabaseResponse = + dbClientPhoenix.createAutonomousDatabase( + CreateAutonomousDatabaseRequest.builder() + .createAutonomousDatabaseDetails(createAutonomousDatabaseDetails) + .build()); + + System.out.printf( + "Created %s database, now waiting for it to become available...%n", + createAutonomousDatabaseResponse.getAutonomousDatabase().getId()); + + // waiting for the instance to become available in order to perform other operations + AutonomousDatabase autonomousDatabase = + waitForInstanceToBecomeAvailable( + dbClientPhoenix, createAutonomousDatabaseResponse.getAutonomousDatabase()); + + System.out.println("Cleaning up all the resources created during this example:"); + DeleteAutonomousDatabaseResponse deleteAutonomousDatabaseResponse = + dbClientPhoenix.deleteAutonomousDatabase( + DeleteAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build()); + System.out.println(deleteAutonomousDatabaseResponse.getOpcWorkRequestId()); + waitForInstanceToBecomeTerminated(dbClientPhoenix, autonomousDatabase); + System.out.println("All resources created during this example have been cleaned up!"); + } + + private static AutonomousDatabase waitForInstanceToBecomeAvailable( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Available) + .execute(); + + return response.getAutonomousDatabase(); + } + + private static AutonomousDatabase waitForInstanceToBecomeTerminated( + DatabaseClient dbClient, AutonomousDatabase autonomousDatabase) throws Exception { + final GetAutonomousDatabaseResponse response = + dbClient.getWaiters() + .forAutonomousDatabase( + GetAutonomousDatabaseRequest.builder() + .autonomousDatabaseId(autonomousDatabase.getId()) + .build(), + AutonomousDatabase.LifecycleState.Terminated) + .execute(); + + return response.getAutonomousDatabase(); + } +} diff --git a/bmc-filestorage/pom.xml b/bmc-filestorage/pom.xml index 7274a9790cf..bc5fb792d25 100644 --- a/bmc-filestorage/pom.xml +++ b/bmc-filestorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-fleetappsmanagement/pom.xml b/bmc-fleetappsmanagement/pom.xml index 5d80bafbca1..7c7a5044272 100644 --- a/bmc-fleetappsmanagement/pom.xml +++ b/bmc-fleetappsmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-fleetappsmanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-fleetsoftwareupdate/pom.xml b/bmc-fleetsoftwareupdate/pom.xml index b6742532ebc..30ff6205295 100644 --- a/bmc-fleetsoftwareupdate/pom.xml +++ b/bmc-fleetsoftwareupdate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-fleetsoftwareupdate @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-full/pom.xml b/bmc-full/pom.xml index 9a5ed210233..bfd21d4fd3c 100644 --- a/bmc-full/pom.xml +++ b/bmc-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-full @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import @@ -611,5 +611,13 @@ com.oracle.oci.sdk oci-java-sdk-generativeaiagentruntime + + com.oracle.oci.sdk + oci-java-sdk-securityattribute + + + com.oracle.oci.sdk + oci-java-sdk-zpr + \ No newline at end of file diff --git a/bmc-functions/pom.xml b/bmc-functions/pom.xml index 153c601990a..c8490dc3eee 100644 --- a/bmc-functions/pom.xml +++ b/bmc-functions/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-functions @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-fusionapps/pom.xml b/bmc-fusionapps/pom.xml index a2c5b0aebf2..e1cf315c1a6 100644 --- a/bmc-fusionapps/pom.xml +++ b/bmc-fusionapps/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-fusionapps @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-generativeai/pom.xml b/bmc-generativeai/pom.xml index 4e941b3c493..f6e8a56bd3d 100644 --- a/bmc-generativeai/pom.xml +++ b/bmc-generativeai/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-generativeai @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-generativeaiagent/pom.xml b/bmc-generativeaiagent/pom.xml index f90b0a0956a..42754874664 100644 --- a/bmc-generativeaiagent/pom.xml +++ b/bmc-generativeaiagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-generativeaiagent @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-generativeaiagentruntime/pom.xml b/bmc-generativeaiagentruntime/pom.xml index 6a14249093b..1c286941e3d 100644 --- a/bmc-generativeaiagentruntime/pom.xml +++ b/bmc-generativeaiagentruntime/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-generativeaiagentruntime @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-generativeaiinference/pom.xml b/bmc-generativeaiinference/pom.xml index 66a295d1e5d..85c4548c085 100644 --- a/bmc-generativeaiinference/pom.xml +++ b/bmc-generativeaiinference/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-generativeaiinference @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-genericartifactscontent/pom.xml b/bmc-genericartifactscontent/pom.xml index 1e3afc512c6..8ee64868cd2 100644 --- a/bmc-genericartifactscontent/pom.xml +++ b/bmc-genericartifactscontent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-genericartifactscontent @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-globallydistributeddatabase/pom.xml b/bmc-globallydistributeddatabase/pom.xml index a3a9a532bb1..b6b942f6840 100644 --- a/bmc-globallydistributeddatabase/pom.xml +++ b/bmc-globallydistributeddatabase/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-globallydistributeddatabase @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-goldengate/pom.xml b/bmc-goldengate/pom.xml index e5cf3e59c45..c4938f5dce4 100644 --- a/bmc-goldengate/pom.xml +++ b/bmc-goldengate/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-goldengate @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-governancerulescontrolplane/pom.xml b/bmc-governancerulescontrolplane/pom.xml index b8b97a95ee9..a1d1106e34c 100644 --- a/bmc-governancerulescontrolplane/pom.xml +++ b/bmc-governancerulescontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-governancerulescontrolplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-healthchecks/pom.xml b/bmc-healthchecks/pom.xml index 83dd8598e22..cbcfd13c42a 100644 --- a/bmc-healthchecks/pom.xml +++ b/bmc-healthchecks/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-healthchecks @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-identity/pom.xml b/bmc-identity/pom.xml index 4e0eeaf8886..8adcdd02cfb 100644 --- a/bmc-identity/pom.xml +++ b/bmc-identity/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-identitydataplane/pom.xml b/bmc-identitydataplane/pom.xml index e8bdfa64257..86b499b0155 100644 --- a/bmc-identitydataplane/pom.xml +++ b/bmc-identitydataplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-identitydataplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-identitydomains/pom.xml b/bmc-identitydomains/pom.xml index 9bcf5694c7a..8cb0c39bc95 100644 --- a/bmc-identitydomains/pom.xml +++ b/bmc-identitydomains/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-identitydomains @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-integration/pom.xml b/bmc-integration/pom.xml index 9548ddd8020..c1a3d506174 100644 --- a/bmc-integration/pom.xml +++ b/bmc-integration/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-integration @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java index 1363f5be301..11fefb11352 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstance.java @@ -166,6 +166,26 @@ CreateIntegrationInstanceResponse createIntegrationInstance( DeleteIntegrationInstanceResponse deleteIntegrationInstance( DeleteIntegrationInstanceRequest request); + /** + * Allows failover for disaster recovery. Called in the context of integration instance in that + * region. Upon calling the failover api in the region where given instance was created, the + * intigration instance if primary will be switched to standby and crossRegion integration + * instance will be switched to primary and vice-versa. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * DisasterRecoveryFailover API. + */ + DisasterRecoveryFailoverResponse disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request); + /** * Enable Process Automation for given Integration Instance * diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java index fcea29872bf..1021d0b4050 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsync.java @@ -165,6 +165,25 @@ java.util.concurrent.Future deleteIntegration DeleteIntegrationInstanceRequest, DeleteIntegrationInstanceResponse> handler); + /** + * Allows failover for disaster recovery. Called in the context of integration instance in that + * region. Upon calling the failover api in the region where given instance was created, the + * intigration instance if primary will be switched to standby and crossRegion integration + * instance will be switched to primary and vice-versa. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request, + com.oracle.bmc.responses.AsyncHandler< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse> + handler); + /** * Enable Process Automation for given Integration Instance * diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java index d26212acfe6..4a19b9eaf6a 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceAsyncClient.java @@ -327,6 +327,41 @@ public java.util.concurrent.Future deleteInte .callAsync(handler); } + @Override + public java.util.concurrent.Future disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DisasterRecoveryFailoverRequest, DisasterRecoveryFailoverResponse> + handler) { + + Validate.notBlank( + request.getIntegrationInstanceId(), "integrationInstanceId must not be blank"); + + return clientCall(request, DisasterRecoveryFailoverResponse::builder) + .logger(LOG, "disasterRecoveryFailover") + .serviceDetails( + "IntegrationInstance", + "DisasterRecoveryFailover", + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/DisasterRecoveryFailover") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(DisasterRecoveryFailoverRequest::builder) + .basePath("/20190131") + .appendPathParam("integrationInstances") + .appendPathParam(request.getIntegrationInstanceId()) + .appendPathParam("actions") + .appendPathParam("failover") + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .handleResponseHeaderString( + "opc-work-request-id", + DisasterRecoveryFailoverResponse.Builder::opcWorkRequestId) + .handleResponseHeaderString( + "opc-request-id", DisasterRecoveryFailoverResponse.Builder::opcRequestId) + .callAsync(handler); + } + @Override public java.util.concurrent.Future enableProcessAutomation( EnableProcessAutomationRequest request, diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java index d10cdeaf3b9..36689492557 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/IntegrationInstanceClient.java @@ -333,6 +333,39 @@ public DeleteIntegrationInstanceResponse deleteIntegrationInstance( .callSync(); } + @Override + public DisasterRecoveryFailoverResponse disasterRecoveryFailover( + DisasterRecoveryFailoverRequest request) { + + Validate.notBlank( + request.getIntegrationInstanceId(), "integrationInstanceId must not be blank"); + + return clientCall(request, DisasterRecoveryFailoverResponse::builder) + .logger(LOG, "disasterRecoveryFailover") + .serviceDetails( + "IntegrationInstance", + "DisasterRecoveryFailover", + "https://docs.oracle.com/iaas/api/#/en/integration/20190131/IntegrationInstance/DisasterRecoveryFailover") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(DisasterRecoveryFailoverRequest::builder) + .basePath("/20190131") + .appendPathParam("integrationInstances") + .appendPathParam(request.getIntegrationInstanceId()) + .appendPathParam("actions") + .appendPathParam("failover") + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .handleResponseHeaderString( + "opc-work-request-id", + DisasterRecoveryFailoverResponse.Builder::opcWorkRequestId) + .handleResponseHeaderString( + "opc-request-id", DisasterRecoveryFailoverResponse.Builder::opcRequestId) + .callSync(); + } + @Override public EnableProcessAutomationResponse enableProcessAutomation( EnableProcessAutomationRequest request) { diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java index 54b7bec81ec..697a880908c 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CreateIntegrationInstanceDetails.java @@ -40,6 +40,7 @@ public final class CreateIntegrationInstanceDetails "alternateCustomEndpoints", "consumptionModel", "isFileServerEnabled", + "isDisasterRecoveryEnabled", "networkEndpointDetails", "shape", "domainId" @@ -58,6 +59,7 @@ public CreateIntegrationInstanceDetails( java.util.List alternateCustomEndpoints, ConsumptionModel consumptionModel, Boolean isFileServerEnabled, + Boolean isDisasterRecoveryEnabled, NetworkEndpointDetails networkEndpointDetails, Shape shape, String domainId) { @@ -75,6 +77,7 @@ public CreateIntegrationInstanceDetails( this.alternateCustomEndpoints = alternateCustomEndpoints; this.consumptionModel = consumptionModel; this.isFileServerEnabled = isFileServerEnabled; + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; this.networkEndpointDetails = networkEndpointDetails; this.shape = shape; this.domainId = domainId; @@ -297,6 +300,21 @@ public Builder isFileServerEnabled(Boolean isFileServerEnabled) { this.__explicitlySet__.add("isFileServerEnabled"); return this; } + /** Is Disaster Recovery enabled or not. */ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled or not. + * + * @param isDisasterRecoveryEnabled the value to set + * @return this builder + */ + public Builder isDisasterRecoveryEnabled(Boolean isDisasterRecoveryEnabled) { + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.__explicitlySet__.add("isDisasterRecoveryEnabled"); + return this; + } @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") private NetworkEndpointDetails networkEndpointDetails; @@ -362,6 +380,7 @@ public CreateIntegrationInstanceDetails build() { this.alternateCustomEndpoints, this.consumptionModel, this.isFileServerEnabled, + this.isDisasterRecoveryEnabled, this.networkEndpointDetails, this.shape, this.domainId); @@ -412,6 +431,9 @@ public Builder copy(CreateIntegrationInstanceDetails model) { if (model.wasPropertyExplicitlySet("isFileServerEnabled")) { this.isFileServerEnabled(model.getIsFileServerEnabled()); } + if (model.wasPropertyExplicitlySet("isDisasterRecoveryEnabled")) { + this.isDisasterRecoveryEnabled(model.getIsDisasterRecoveryEnabled()); + } if (model.wasPropertyExplicitlySet("networkEndpointDetails")) { this.networkEndpointDetails(model.getNetworkEndpointDetails()); } @@ -697,6 +719,19 @@ public Boolean getIsFileServerEnabled() { return isFileServerEnabled; } + /** Is Disaster Recovery enabled or not. */ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private final Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled or not. + * + * @return the value + */ + public Boolean getIsDisasterRecoveryEnabled() { + return isDisasterRecoveryEnabled; + } + @com.fasterxml.jackson.annotation.JsonProperty("networkEndpointDetails") private final NetworkEndpointDetails networkEndpointDetails; @@ -799,6 +834,8 @@ public String toString(boolean includeByteArrayContents) { .append(String.valueOf(this.alternateCustomEndpoints)); sb.append(", consumptionModel=").append(String.valueOf(this.consumptionModel)); sb.append(", isFileServerEnabled=").append(String.valueOf(this.isFileServerEnabled)); + sb.append(", isDisasterRecoveryEnabled=") + .append(String.valueOf(this.isDisasterRecoveryEnabled)); sb.append(", networkEndpointDetails=").append(String.valueOf(this.networkEndpointDetails)); sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", domainId=").append(String.valueOf(this.domainId)); @@ -832,6 +869,8 @@ public boolean equals(Object o) { this.alternateCustomEndpoints, other.alternateCustomEndpoints) && java.util.Objects.equals(this.consumptionModel, other.consumptionModel) && java.util.Objects.equals(this.isFileServerEnabled, other.isFileServerEnabled) + && java.util.Objects.equals( + this.isDisasterRecoveryEnabled, other.isDisasterRecoveryEnabled) && java.util.Objects.equals( this.networkEndpointDetails, other.networkEndpointDetails) && java.util.Objects.equals(this.shape, other.shape) @@ -878,6 +917,11 @@ public int hashCode() { + (this.isFileServerEnabled == null ? 43 : this.isFileServerEnabled.hashCode()); + result = + (result * PRIME) + + (this.isDisasterRecoveryEnabled == null + ? 43 + : this.isDisasterRecoveryEnabled.hashCode()); result = (result * PRIME) + (this.networkEndpointDetails == null diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java new file mode 100644 index 00000000000..6eb312a60ef --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/CrossRegionIntegrationInstanceDetails.java @@ -0,0 +1,289 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.model; + +/** + * Details of integration instance created in cross region for disaster recovery.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CrossRegionIntegrationInstanceDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class CrossRegionIntegrationInstanceDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"role", "id", "region", "timeRoleChanged"}) + public CrossRegionIntegrationInstanceDetails( + Role role, String id, String region, java.util.Date timeRoleChanged) { + super(); + this.role = role; + this.id = id; + this.region = region; + this.timeRoleChanged = timeRoleChanged; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** Role of the integration instance in the region */ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * Role of the integration instance in the region + * + * @param role the value to set + * @return this builder + */ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + /** Cross region integration instance identifier */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * Cross region integration instance identifier + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** Cross region where integration instance is created */ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private String region; + + /** + * Cross region where integration instance is created + * + * @param region the value to set + * @return this builder + */ + public Builder region(String region) { + this.region = region; + this.__explicitlySet__.add("region"); + return this; + } + /** Time when cross region integration instance role was changed */ + @com.fasterxml.jackson.annotation.JsonProperty("timeRoleChanged") + private java.util.Date timeRoleChanged; + + /** + * Time when cross region integration instance role was changed + * + * @param timeRoleChanged the value to set + * @return this builder + */ + public Builder timeRoleChanged(java.util.Date timeRoleChanged) { + this.timeRoleChanged = timeRoleChanged; + this.__explicitlySet__.add("timeRoleChanged"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CrossRegionIntegrationInstanceDetails build() { + CrossRegionIntegrationInstanceDetails model = + new CrossRegionIntegrationInstanceDetails( + this.role, this.id, this.region, this.timeRoleChanged); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CrossRegionIntegrationInstanceDetails model) { + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("region")) { + this.region(model.getRegion()); + } + if (model.wasPropertyExplicitlySet("timeRoleChanged")) { + this.timeRoleChanged(model.getTimeRoleChanged()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** Role of the integration instance in the region */ + public enum Role implements com.oracle.bmc.http.internal.BmcEnum { + Primary("PRIMARY"), + Secondary("SECONDARY"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Role.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** Role of the integration instance in the region */ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * Role of the integration instance in the region + * + * @return the value + */ + public Role getRole() { + return role; + } + + /** Cross region integration instance identifier */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * Cross region integration instance identifier + * + * @return the value + */ + public String getId() { + return id; + } + + /** Cross region where integration instance is created */ + @com.fasterxml.jackson.annotation.JsonProperty("region") + private final String region; + + /** + * Cross region where integration instance is created + * + * @return the value + */ + public String getRegion() { + return region; + } + + /** Time when cross region integration instance role was changed */ + @com.fasterxml.jackson.annotation.JsonProperty("timeRoleChanged") + private final java.util.Date timeRoleChanged; + + /** + * Time when cross region integration instance role was changed + * + * @return the value + */ + public java.util.Date getTimeRoleChanged() { + return timeRoleChanged; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CrossRegionIntegrationInstanceDetails("); + sb.append("super=").append(super.toString()); + sb.append("role=").append(String.valueOf(this.role)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", region=").append(String.valueOf(this.region)); + sb.append(", timeRoleChanged=").append(String.valueOf(this.timeRoleChanged)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CrossRegionIntegrationInstanceDetails)) { + return false; + } + + CrossRegionIntegrationInstanceDetails other = (CrossRegionIntegrationInstanceDetails) o; + return java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.region, other.region) + && java.util.Objects.equals(this.timeRoleChanged, other.timeRoleChanged) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.role == null ? 43 : this.role.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.region == null ? 43 : this.region.hashCode()); + result = + (result * PRIME) + + (this.timeRoleChanged == null ? 43 : this.timeRoleChanged.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java new file mode 100644 index 00000000000..3c2c3c6fb32 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/DisasterRecoveryDetails.java @@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.model; + +/** + * Disaster recovery details for the integration instance created in the region.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DisasterRecoveryDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class DisasterRecoveryDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "role", + "regionalInstanceUrl", + "crossRegionIntegrationInstanceDetails" + }) + public DisasterRecoveryDetails( + Role role, + String regionalInstanceUrl, + CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails) { + super(); + this.role = role; + this.regionalInstanceUrl = regionalInstanceUrl; + this.crossRegionIntegrationInstanceDetails = crossRegionIntegrationInstanceDetails; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** Role of the integration instance in the region */ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private Role role; + + /** + * Role of the integration instance in the region + * + * @param role the value to set + * @return this builder + */ + public Builder role(Role role) { + this.role = role; + this.__explicitlySet__.add("role"); + return this; + } + /** Region specific instance url for the integration instance in the region */ + @com.fasterxml.jackson.annotation.JsonProperty("regionalInstanceUrl") + private String regionalInstanceUrl; + + /** + * Region specific instance url for the integration instance in the region + * + * @param regionalInstanceUrl the value to set + * @return this builder + */ + public Builder regionalInstanceUrl(String regionalInstanceUrl) { + this.regionalInstanceUrl = regionalInstanceUrl; + this.__explicitlySet__.add("regionalInstanceUrl"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("crossRegionIntegrationInstanceDetails") + private CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails; + + public Builder crossRegionIntegrationInstanceDetails( + CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails) { + this.crossRegionIntegrationInstanceDetails = crossRegionIntegrationInstanceDetails; + this.__explicitlySet__.add("crossRegionIntegrationInstanceDetails"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DisasterRecoveryDetails build() { + DisasterRecoveryDetails model = + new DisasterRecoveryDetails( + this.role, + this.regionalInstanceUrl, + this.crossRegionIntegrationInstanceDetails); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DisasterRecoveryDetails model) { + if (model.wasPropertyExplicitlySet("role")) { + this.role(model.getRole()); + } + if (model.wasPropertyExplicitlySet("regionalInstanceUrl")) { + this.regionalInstanceUrl(model.getRegionalInstanceUrl()); + } + if (model.wasPropertyExplicitlySet("crossRegionIntegrationInstanceDetails")) { + this.crossRegionIntegrationInstanceDetails( + model.getCrossRegionIntegrationInstanceDetails()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** Role of the integration instance in the region */ + public enum Role implements com.oracle.bmc.http.internal.BmcEnum { + Primary("PRIMARY"), + Secondary("SECONDARY"), + Unknown("UNKNOWN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(Role.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (Role v : Role.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + Role(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static Role create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'Role', returning UnknownEnumValue", key); + return UnknownEnumValue; + } + }; + /** Role of the integration instance in the region */ + @com.fasterxml.jackson.annotation.JsonProperty("role") + private final Role role; + + /** + * Role of the integration instance in the region + * + * @return the value + */ + public Role getRole() { + return role; + } + + /** Region specific instance url for the integration instance in the region */ + @com.fasterxml.jackson.annotation.JsonProperty("regionalInstanceUrl") + private final String regionalInstanceUrl; + + /** + * Region specific instance url for the integration instance in the region + * + * @return the value + */ + public String getRegionalInstanceUrl() { + return regionalInstanceUrl; + } + + @com.fasterxml.jackson.annotation.JsonProperty("crossRegionIntegrationInstanceDetails") + private final CrossRegionIntegrationInstanceDetails crossRegionIntegrationInstanceDetails; + + public CrossRegionIntegrationInstanceDetails getCrossRegionIntegrationInstanceDetails() { + return crossRegionIntegrationInstanceDetails; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DisasterRecoveryDetails("); + sb.append("super=").append(super.toString()); + sb.append("role=").append(String.valueOf(this.role)); + sb.append(", regionalInstanceUrl=").append(String.valueOf(this.regionalInstanceUrl)); + sb.append(", crossRegionIntegrationInstanceDetails=") + .append(String.valueOf(this.crossRegionIntegrationInstanceDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisasterRecoveryDetails)) { + return false; + } + + DisasterRecoveryDetails other = (DisasterRecoveryDetails) o; + return java.util.Objects.equals(this.role, other.role) + && java.util.Objects.equals(this.regionalInstanceUrl, other.regionalInstanceUrl) + && java.util.Objects.equals( + this.crossRegionIntegrationInstanceDetails, + other.crossRegionIntegrationInstanceDetails) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.role == null ? 43 : this.role.hashCode()); + result = + (result * PRIME) + + (this.regionalInstanceUrl == null + ? 43 + : this.regionalInstanceUrl.hashCode()); + result = + (result * PRIME) + + (this.crossRegionIntegrationInstanceDetails == null + ? 43 + : this.crossRegionIntegrationInstanceDetails.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java index f6b8e7ae9f9..3b8fdb73e7e 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstance.java @@ -31,6 +31,7 @@ public final class IntegrationInstance "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "stateMessage", "freeformTags", "definedTags", @@ -49,6 +50,8 @@ public final class IntegrationInstance "attachments", "shape", "privateEndpointOutboundConnection", + "isDisasterRecoveryEnabled", + "disasterRecoveryDetails", "dataRetentionPeriod" }) public IntegrationInstance( @@ -59,6 +62,7 @@ public IntegrationInstance( java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, + String lifecycleDetails, String stateMessage, java.util.Map freeformTags, java.util.Map> definedTags, @@ -77,6 +81,8 @@ public IntegrationInstance( java.util.List attachments, Shape shape, OutboundConnection privateEndpointOutboundConnection, + Boolean isDisasterRecoveryEnabled, + DisasterRecoveryDetails disasterRecoveryDetails, DataRetentionPeriod dataRetentionPeriod) { super(); this.id = id; @@ -86,6 +92,7 @@ public IntegrationInstance( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.stateMessage = stateMessage; this.freeformTags = freeformTags; this.definedTags = definedTags; @@ -104,6 +111,8 @@ public IntegrationInstance( this.attachments = attachments; this.shape = shape; this.privateEndpointOutboundConnection = privateEndpointOutboundConnection; + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.disasterRecoveryDetails = disasterRecoveryDetails; this.dataRetentionPeriod = dataRetentionPeriod; } @@ -220,6 +229,21 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** Additional details of lifecycleState or substates */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * + * @param lifecycleDetails the value to set + * @return this builder + */ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * An message describing the current state in more detail. For example, can be used to * provide actionable information for a resource in Failed state. @@ -485,6 +509,30 @@ public Builder privateEndpointOutboundConnection( this.__explicitlySet__.add("privateEndpointOutboundConnection"); return this; } + /** Is Disaster Recovery enabled for the integrationInstance */ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * + * @param isDisasterRecoveryEnabled the value to set + * @return this builder + */ + public Builder isDisasterRecoveryEnabled(Boolean isDisasterRecoveryEnabled) { + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.__explicitlySet__.add("isDisasterRecoveryEnabled"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disasterRecoveryDetails") + private DisasterRecoveryDetails disasterRecoveryDetails; + + public Builder disasterRecoveryDetails(DisasterRecoveryDetails disasterRecoveryDetails) { + this.disasterRecoveryDetails = disasterRecoveryDetails; + this.__explicitlySet__.add("disasterRecoveryDetails"); + return this; + } /** Data retention period set for given integration instance */ @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") private DataRetentionPeriod dataRetentionPeriod; @@ -514,6 +562,7 @@ public IntegrationInstance build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.stateMessage, this.freeformTags, this.definedTags, @@ -532,6 +581,8 @@ public IntegrationInstance build() { this.attachments, this.shape, this.privateEndpointOutboundConnection, + this.isDisasterRecoveryEnabled, + this.disasterRecoveryDetails, this.dataRetentionPeriod); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -562,6 +613,9 @@ public Builder copy(IntegrationInstance model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("stateMessage")) { this.stateMessage(model.getStateMessage()); } @@ -617,6 +671,12 @@ public Builder copy(IntegrationInstance model) { this.privateEndpointOutboundConnection( model.getPrivateEndpointOutboundConnection()); } + if (model.wasPropertyExplicitlySet("isDisasterRecoveryEnabled")) { + this.isDisasterRecoveryEnabled(model.getIsDisasterRecoveryEnabled()); + } + if (model.wasPropertyExplicitlySet("disasterRecoveryDetails")) { + this.disasterRecoveryDetails(model.getDisasterRecoveryDetails()); + } if (model.wasPropertyExplicitlySet("dataRetentionPeriod")) { this.dataRetentionPeriod(model.getDataRetentionPeriod()); } @@ -831,6 +891,19 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** Additional details of lifecycleState or substates */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * + * @return the value + */ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * An message describing the current state in more detail. For example, can be used to provide * actionable information for a resource in Failed state. @@ -1149,6 +1222,26 @@ public OutboundConnection getPrivateEndpointOutboundConnection() { return privateEndpointOutboundConnection; } + /** Is Disaster Recovery enabled for the integrationInstance */ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private final Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * + * @return the value + */ + public Boolean getIsDisasterRecoveryEnabled() { + return isDisasterRecoveryEnabled; + } + + @com.fasterxml.jackson.annotation.JsonProperty("disasterRecoveryDetails") + private final DisasterRecoveryDetails disasterRecoveryDetails; + + public DisasterRecoveryDetails getDisasterRecoveryDetails() { + return disasterRecoveryDetails; + } + /** Data retention period set for given integration instance */ public enum DataRetentionPeriod implements com.oracle.bmc.http.internal.BmcEnum { Months1("MONTHS_1"), @@ -1232,6 +1325,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", stateMessage=").append(String.valueOf(this.stateMessage)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); @@ -1252,6 +1346,10 @@ public String toString(boolean includeByteArrayContents) { sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", privateEndpointOutboundConnection=") .append(String.valueOf(this.privateEndpointOutboundConnection)); + sb.append(", isDisasterRecoveryEnabled=") + .append(String.valueOf(this.isDisasterRecoveryEnabled)); + sb.append(", disasterRecoveryDetails=") + .append(String.valueOf(this.disasterRecoveryDetails)); sb.append(", dataRetentionPeriod=").append(String.valueOf(this.dataRetentionPeriod)); sb.append(")"); return sb.toString(); @@ -1275,6 +1373,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.stateMessage, other.stateMessage) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) @@ -1298,6 +1397,10 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.privateEndpointOutboundConnection, other.privateEndpointOutboundConnection) + && java.util.Objects.equals( + this.isDisasterRecoveryEnabled, other.isDisasterRecoveryEnabled) + && java.util.Objects.equals( + this.disasterRecoveryDetails, other.disasterRecoveryDetails) && java.util.Objects.equals(this.dataRetentionPeriod, other.dataRetentionPeriod) && super.equals(other); } @@ -1321,6 +1424,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.stateMessage == null ? 43 : this.stateMessage.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); @@ -1367,6 +1473,16 @@ public int hashCode() { + (this.privateEndpointOutboundConnection == null ? 43 : this.privateEndpointOutboundConnection.hashCode()); + result = + (result * PRIME) + + (this.isDisasterRecoveryEnabled == null + ? 43 + : this.isDisasterRecoveryEnabled.hashCode()); + result = + (result * PRIME) + + (this.disasterRecoveryDetails == null + ? 43 + : this.disasterRecoveryDetails.hashCode()); result = (result * PRIME) + (this.dataRetentionPeriod == null diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java index 4d959c97fd7..26188d27aaf 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/IntegrationInstanceSummary.java @@ -31,6 +31,7 @@ public final class IntegrationInstanceSummary "timeCreated", "timeUpdated", "lifecycleState", + "lifecycleDetails", "stateMessage", "isByol", "instanceUrl", @@ -47,6 +48,7 @@ public final class IntegrationInstanceSummary "systemTags", "shape", "privateEndpointOutboundConnection", + "isDisasterRecoveryEnabled", "dataRetentionPeriod" }) public IntegrationInstanceSummary( @@ -57,6 +59,7 @@ public IntegrationInstanceSummary( java.util.Date timeCreated, java.util.Date timeUpdated, LifecycleState lifecycleState, + String lifecycleDetails, String stateMessage, Boolean isByol, String instanceUrl, @@ -73,6 +76,7 @@ public IntegrationInstanceSummary( java.util.Map> systemTags, Shape shape, OutboundConnection privateEndpointOutboundConnection, + Boolean isDisasterRecoveryEnabled, DataRetentionPeriod dataRetentionPeriod) { super(); this.id = id; @@ -82,6 +86,7 @@ public IntegrationInstanceSummary( this.timeCreated = timeCreated; this.timeUpdated = timeUpdated; this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; this.stateMessage = stateMessage; this.isByol = isByol; this.instanceUrl = instanceUrl; @@ -98,6 +103,7 @@ public IntegrationInstanceSummary( this.systemTags = systemTags; this.shape = shape; this.privateEndpointOutboundConnection = privateEndpointOutboundConnection; + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; this.dataRetentionPeriod = dataRetentionPeriod; } @@ -214,6 +220,21 @@ public Builder lifecycleState(LifecycleState lifecycleState) { this.__explicitlySet__.add("lifecycleState"); return this; } + /** Additional details of lifecycleState or substates */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * + * @param lifecycleDetails the value to set + * @return this builder + */ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } /** * An message describing the current state in more detail. For example, can be used to * provide actionable information for a resource in Failed state. @@ -455,6 +476,21 @@ public Builder privateEndpointOutboundConnection( this.__explicitlySet__.add("privateEndpointOutboundConnection"); return this; } + /** Is Disaster Recovery enabled for the integrationInstance */ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * + * @param isDisasterRecoveryEnabled the value to set + * @return this builder + */ + public Builder isDisasterRecoveryEnabled(Boolean isDisasterRecoveryEnabled) { + this.isDisasterRecoveryEnabled = isDisasterRecoveryEnabled; + this.__explicitlySet__.add("isDisasterRecoveryEnabled"); + return this; + } /** Data retention period set for given integration instance */ @com.fasterxml.jackson.annotation.JsonProperty("dataRetentionPeriod") private DataRetentionPeriod dataRetentionPeriod; @@ -484,6 +520,7 @@ public IntegrationInstanceSummary build() { this.timeCreated, this.timeUpdated, this.lifecycleState, + this.lifecycleDetails, this.stateMessage, this.isByol, this.instanceUrl, @@ -500,6 +537,7 @@ public IntegrationInstanceSummary build() { this.systemTags, this.shape, this.privateEndpointOutboundConnection, + this.isDisasterRecoveryEnabled, this.dataRetentionPeriod); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); @@ -530,6 +568,9 @@ public Builder copy(IntegrationInstanceSummary model) { if (model.wasPropertyExplicitlySet("lifecycleState")) { this.lifecycleState(model.getLifecycleState()); } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } if (model.wasPropertyExplicitlySet("stateMessage")) { this.stateMessage(model.getStateMessage()); } @@ -579,6 +620,9 @@ public Builder copy(IntegrationInstanceSummary model) { this.privateEndpointOutboundConnection( model.getPrivateEndpointOutboundConnection()); } + if (model.wasPropertyExplicitlySet("isDisasterRecoveryEnabled")) { + this.isDisasterRecoveryEnabled(model.getIsDisasterRecoveryEnabled()); + } if (model.wasPropertyExplicitlySet("dataRetentionPeriod")) { this.dataRetentionPeriod(model.getDataRetentionPeriod()); } @@ -793,6 +837,19 @@ public LifecycleState getLifecycleState() { return lifecycleState; } + /** Additional details of lifecycleState or substates */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * Additional details of lifecycleState or substates + * + * @return the value + */ + public String getLifecycleDetails() { + return lifecycleDetails; + } + /** * An message describing the current state in more detail. For example, can be used to provide * actionable information for a resource in Failed state. @@ -1091,6 +1148,19 @@ public OutboundConnection getPrivateEndpointOutboundConnection() { return privateEndpointOutboundConnection; } + /** Is Disaster Recovery enabled for the integrationInstance */ + @com.fasterxml.jackson.annotation.JsonProperty("isDisasterRecoveryEnabled") + private final Boolean isDisasterRecoveryEnabled; + + /** + * Is Disaster Recovery enabled for the integrationInstance + * + * @return the value + */ + public Boolean getIsDisasterRecoveryEnabled() { + return isDisasterRecoveryEnabled; + } + /** Data retention period set for given integration instance */ public enum DataRetentionPeriod implements com.oracle.bmc.http.internal.BmcEnum { Months1("MONTHS_1"), @@ -1174,6 +1244,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); sb.append(", stateMessage=").append(String.valueOf(this.stateMessage)); sb.append(", isByol=").append(String.valueOf(this.isByol)); sb.append(", instanceUrl=").append(String.valueOf(this.instanceUrl)); @@ -1192,6 +1263,8 @@ public String toString(boolean includeByteArrayContents) { sb.append(", shape=").append(String.valueOf(this.shape)); sb.append(", privateEndpointOutboundConnection=") .append(String.valueOf(this.privateEndpointOutboundConnection)); + sb.append(", isDisasterRecoveryEnabled=") + .append(String.valueOf(this.isDisasterRecoveryEnabled)); sb.append(", dataRetentionPeriod=").append(String.valueOf(this.dataRetentionPeriod)); sb.append(")"); return sb.toString(); @@ -1215,6 +1288,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.timeCreated, other.timeCreated) && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) && java.util.Objects.equals(this.stateMessage, other.stateMessage) && java.util.Objects.equals(this.isByol, other.isByol) && java.util.Objects.equals(this.instanceUrl, other.instanceUrl) @@ -1236,6 +1310,8 @@ public boolean equals(Object o) { && java.util.Objects.equals( this.privateEndpointOutboundConnection, other.privateEndpointOutboundConnection) + && java.util.Objects.equals( + this.isDisasterRecoveryEnabled, other.isDisasterRecoveryEnabled) && java.util.Objects.equals(this.dataRetentionPeriod, other.dataRetentionPeriod) && super.equals(other); } @@ -1259,6 +1335,9 @@ public int hashCode() { result = (result * PRIME) + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); result = (result * PRIME) + (this.stateMessage == null ? 43 : this.stateMessage.hashCode()); result = (result * PRIME) + (this.isByol == null ? 43 : this.isByol.hashCode()); result = (result * PRIME) + (this.instanceUrl == null ? 43 : this.instanceUrl.hashCode()); @@ -1303,6 +1382,11 @@ public int hashCode() { + (this.privateEndpointOutboundConnection == null ? 43 : this.privateEndpointOutboundConnection.hashCode()); + result = + (result * PRIME) + + (this.isDisasterRecoveryEnabled == null + ? 43 + : this.isDisasterRecoveryEnabled.hashCode()); result = (result * PRIME) + (this.dataRetentionPeriod == null diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java index fe35a99bffe..311efa70be6 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequest.java @@ -287,6 +287,7 @@ public enum OperationType implements com.oracle.bmc.http.internal.BmcEnum { ChangePrivateEndpointOutboundConnection("CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION"), EnableProcessAutomation("ENABLE_PROCESS_AUTOMATION"), ExtendDataRetention("EXTEND_DATA_RETENTION"), + DisasterRecoveryFailover("DISASTER_RECOVERY_FAILOVER"), CreateCustomEndpoint("CREATE_CUSTOM_ENDPOINT"), DeleteCustomEndpoint("DELETE_CUSTOM_ENDPOINT"), diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java index 82597c2e1f4..fc146454ee8 100644 --- a/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/model/WorkRequestSummary.java @@ -289,6 +289,7 @@ public enum OperationType implements com.oracle.bmc.http.internal.BmcEnum { ChangePrivateEndpointOutboundConnection("CHANGE_PRIVATE_ENDPOINT_OUTBOUND_CONNECTION"), EnableProcessAutomation("ENABLE_PROCESS_AUTOMATION"), ExtendDataRetention("EXTEND_DATA_RETENTION"), + DisasterRecoveryFailover("DISASTER_RECOVERY_FAILOVER"), CreateCustomEndpoint("CREATE_CUSTOM_ENDPOINT"), DeleteCustomEndpoint("DELETE_CUSTOM_ENDPOINT"), diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java new file mode 100644 index 00000000000..9a9ef19d932 --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/requests/DisasterRecoveryFailoverRequest.java @@ -0,0 +1,295 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.requests; + +import com.oracle.bmc.integration.model.*; +/** + * Example: Click here to see how to use + * DisasterRecoveryFailoverRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class DisasterRecoveryFailoverRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** Unique Integration Instance identifier. */ + private String integrationInstanceId; + + /** Unique Integration Instance identifier. */ + public String getIntegrationInstanceId() { + return integrationInstanceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** The client request ID for tracing. */ + private String opcRequestId; + + /** The client request ID for tracing. */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * 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. + */ + private String opcRetryToken; + + /** + * 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. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DisasterRecoveryFailoverRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** Unique Integration Instance identifier. */ + private String integrationInstanceId = null; + + /** + * Unique Integration Instance identifier. + * + * @param integrationInstanceId the value to set + * @return this builder instance + */ + public Builder integrationInstanceId(String integrationInstanceId) { + this.integrationInstanceId = integrationInstanceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** The client request ID for tracing. */ + private String opcRequestId = null; + + /** + * The client request ID for tracing. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * 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. + */ + private String opcRetryToken = null; + + /** + * 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 opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(DisasterRecoveryFailoverRequest o) { + integrationInstanceId(o.getIntegrationInstanceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DisasterRecoveryFailoverRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of DisasterRecoveryFailoverRequest + */ + public DisasterRecoveryFailoverRequest build() { + DisasterRecoveryFailoverRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DisasterRecoveryFailoverRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DisasterRecoveryFailoverRequest + */ + public DisasterRecoveryFailoverRequest buildWithoutInvocationCallback() { + DisasterRecoveryFailoverRequest request = new DisasterRecoveryFailoverRequest(); + request.integrationInstanceId = integrationInstanceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DisasterRecoveryFailoverRequest(integrationInstanceId, ifMatch, opcRequestId, + // opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .integrationInstanceId(integrationInstanceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",integrationInstanceId=").append(String.valueOf(this.integrationInstanceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisasterRecoveryFailoverRequest)) { + return false; + } + + DisasterRecoveryFailoverRequest other = (DisasterRecoveryFailoverRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.integrationInstanceId, other.integrationInstanceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.integrationInstanceId == null + ? 43 + : this.integrationInstanceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java new file mode 100644 index 00000000000..0b8579aa88f --- /dev/null +++ b/bmc-integration/src/main/java/com/oracle/bmc/integration/responses/DisasterRecoveryFailoverResponse.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.integration.responses; + +import com.oracle.bmc.integration.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20190131") +public class DisasterRecoveryFailoverResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcWorkRequestId", + "opcRequestId" + }) + private DisasterRecoveryFailoverResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcWorkRequestId, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcWorkRequestId = opcWorkRequestId; + this.opcRequestId = opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + DisasterRecoveryFailoverResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(DisasterRecoveryFailoverResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcWorkRequestId(o.getOpcWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public DisasterRecoveryFailoverResponse build() { + return new DisasterRecoveryFailoverResponse( + __httpStatusCode__, headers, opcWorkRequestId, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DisasterRecoveryFailoverResponse)) { + return false; + } + + DisasterRecoveryFailoverResponse other = (DisasterRecoveryFailoverResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-integration/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-integration/reflect-config.json b/bmc-integration/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-integration/reflect-config.json index 372bc1ce24c..056c68f47b0 100644 --- a/bmc-integration/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-integration/reflect-config.json +++ b/bmc-integration/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-integration/reflect-config.json @@ -127,6 +127,26 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.integration.model.CrossRegionIntegrationInstanceDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.integration.model.CrossRegionIntegrationInstanceDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.integration.model.CrossRegionIntegrationInstanceDetails$Role", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, "name": "com.oracle.bmc.integration.model.CustomEndpointDetails", @@ -153,6 +173,26 @@ "allDeclaredFields": true, "allDeclaredMethods": true }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.integration.model.DisasterRecoveryDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.integration.model.DisasterRecoveryDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.integration.model.DisasterRecoveryDetails$Role", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, { "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, "name": "com.oracle.bmc.integration.model.ExtendDataRetentionDetails", diff --git a/bmc-jms/pom.xml b/bmc-jms/pom.xml index 729d5def36e..36ea6694258 100644 --- a/bmc-jms/pom.xml +++ b/bmc-jms/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-jms @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-jmsjavadownloads/pom.xml b/bmc-jmsjavadownloads/pom.xml index 00b9d2713b9..7d273682af5 100644 --- a/bmc-jmsjavadownloads/pom.xml +++ b/bmc-jmsjavadownloads/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-jmsjavadownloads @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-keymanagement/pom.xml b/bmc-keymanagement/pom.xml index 2cc7a8d7090..0aa9fbaca76 100644 --- a/bmc-keymanagement/pom.xml +++ b/bmc-keymanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-keymanagement @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-licensemanager/pom.xml b/bmc-licensemanager/pom.xml index 5a270e058ba..dfc6803bac8 100644 --- a/bmc-licensemanager/pom.xml +++ b/bmc-licensemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-licensemanager @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-limits/pom.xml b/bmc-limits/pom.xml index c052d5cadb7..fc4477502b6 100644 --- a/bmc-limits/pom.xml +++ b/bmc-limits/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-limits @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-loadbalancer/pom.xml b/bmc-loadbalancer/pom.xml index b7247d1ce2f..a110bca20a2 100644 --- a/bmc-loadbalancer/pom.xml +++ b/bmc-loadbalancer/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml @@ -18,7 +18,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-lockbox/pom.xml b/bmc-lockbox/pom.xml index b2f5777e275..bf76ee0046a 100644 --- a/bmc-lockbox/pom.xml +++ b/bmc-lockbox/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-lockbox @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-loganalytics/pom.xml b/bmc-loganalytics/pom.xml index 6bcf5892d7c..17d0933f74a 100644 --- a/bmc-loganalytics/pom.xml +++ b/bmc-loganalytics/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-loganalytics @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-logging/pom.xml b/bmc-logging/pom.xml index 742be7f2061..41f3f124211 100644 --- a/bmc-logging/pom.xml +++ b/bmc-logging/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-logging @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-loggingingestion/pom.xml b/bmc-loggingingestion/pom.xml index 45685558b30..a6788e1dad8 100644 --- a/bmc-loggingingestion/pom.xml +++ b/bmc-loggingingestion/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-loggingingestion @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-loggingsearch/pom.xml b/bmc-loggingsearch/pom.xml index c4925694773..7a1b14af72a 100644 --- a/bmc-loggingsearch/pom.xml +++ b/bmc-loggingsearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-loggingsearch @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-managementagent/pom.xml b/bmc-managementagent/pom.xml index 676380ba88b..2e16d1858da 100644 --- a/bmc-managementagent/pom.xml +++ b/bmc-managementagent/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-managementagent @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-managementdashboard/pom.xml b/bmc-managementdashboard/pom.xml index 4184fe54258..3a369cd66b6 100644 --- a/bmc-managementdashboard/pom.xml +++ b/bmc-managementdashboard/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-managementdashboard @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-marketplace/pom.xml b/bmc-marketplace/pom.xml index 0b5d5a3f36e..06bacaefc15 100644 --- a/bmc-marketplace/pom.xml +++ b/bmc-marketplace/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-marketplace @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-marketplaceprivateoffer/pom.xml b/bmc-marketplaceprivateoffer/pom.xml index 922e3dfa06c..abfa26b757e 100644 --- a/bmc-marketplaceprivateoffer/pom.xml +++ b/bmc-marketplaceprivateoffer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-marketplaceprivateoffer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-marketplacepublisher/pom.xml b/bmc-marketplacepublisher/pom.xml index f6d6f602228..69b3b2dabc5 100644 --- a/bmc-marketplacepublisher/pom.xml +++ b/bmc-marketplacepublisher/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-marketplacepublisher @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-mediaservices/pom.xml b/bmc-mediaservices/pom.xml index b5ac94c7a5d..05ae9880995 100644 --- a/bmc-mediaservices/pom.xml +++ b/bmc-mediaservices/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-mediaservices @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-monitoring/pom.xml b/bmc-monitoring/pom.xml index 6bc19dd821d..f526afa1687 100644 --- a/bmc-monitoring/pom.xml +++ b/bmc-monitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-monitoring @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-mysql/pom.xml b/bmc-mysql/pom.xml index ff70c59c83b..af1ac2e57b6 100644 --- a/bmc-mysql/pom.xml +++ b/bmc-mysql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-mysql @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-networkfirewall/pom.xml b/bmc-networkfirewall/pom.xml index e211082d858..b48240b0dc7 100644 --- a/bmc-networkfirewall/pom.xml +++ b/bmc-networkfirewall/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-networkfirewall @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-networkloadbalancer/pom.xml b/bmc-networkloadbalancer/pom.xml index 9a7bb2af42d..542e3e670f2 100644 --- a/bmc-networkloadbalancer/pom.xml +++ b/bmc-networkloadbalancer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-networkloadbalancer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java index f9b8651d7dd..65a4d93e8d3 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/CreateNetworkLoadBalancerDetails.java @@ -50,7 +50,8 @@ public final class CreateNetworkLoadBalancerDetails "listeners", "backendSets", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public CreateNetworkLoadBalancerDetails( String compartmentId, @@ -68,7 +69,8 @@ public CreateNetworkLoadBalancerDetails( java.util.Map listeners, java.util.Map backendSets, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.compartmentId = compartmentId; this.displayName = displayName; @@ -86,6 +88,7 @@ public CreateNetworkLoadBalancerDetails( this.backendSets = backendSets; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -439,6 +442,32 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -461,7 +490,8 @@ public CreateNetworkLoadBalancerDetails build() { this.listeners, this.backendSets, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -518,6 +548,9 @@ public Builder copy(CreateNetworkLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -845,6 +878,29 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -878,6 +934,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", backendSets=").append(String.valueOf(this.backendSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -911,6 +968,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.backendSets, other.backendSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -954,6 +1012,11 @@ public int hashCode() { result = (result * PRIME) + (this.backendSets == null ? 43 : this.backendSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java index 577fe3458fa..83cd7d8ad8f 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancer.java @@ -52,6 +52,7 @@ public final class NetworkLoadBalancer "listeners", "backendSets", "freeformTags", + "securityAttributes", "definedTags", "systemTags" }) @@ -73,6 +74,7 @@ public NetworkLoadBalancer( java.util.Map listeners, java.util.Map backendSets, java.util.Map freeformTags, + java.util.Map> securityAttributes, java.util.Map> definedTags, java.util.Map> systemTags) { super(); @@ -93,6 +95,7 @@ public NetworkLoadBalancer( this.listeners = listeners; this.backendSets = backendSets; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.definedTags = definedTags; this.systemTags = systemTags; } @@ -476,6 +479,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For * more information, see [Resource @@ -545,6 +574,7 @@ public NetworkLoadBalancer build() { this.listeners, this.backendSets, this.freeformTags, + this.securityAttributes, this.definedTags, this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -606,6 +636,9 @@ public Builder copy(NetworkLoadBalancer model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } @@ -964,6 +997,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -1038,6 +1094,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", listeners=").append(String.valueOf(this.listeners)); sb.append(", backendSets=").append(String.valueOf(this.backendSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); @@ -1074,6 +1131,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.listeners, other.listeners) && java.util.Objects.equals(this.backendSets, other.backendSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); @@ -1118,6 +1176,11 @@ public int hashCode() { result = (result * PRIME) + (this.listeners == null ? 43 : this.listeners.hashCode()); result = (result * PRIME) + (this.backendSets == null ? 43 : this.backendSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java index 307a42016ec..9636f5ebb26 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/NetworkLoadBalancerSummary.java @@ -41,6 +41,7 @@ public final class NetworkLoadBalancerSummary "listeners", "backendSets", "freeformTags", + "securityAttributes", "definedTags", "systemTags" }) @@ -62,6 +63,7 @@ public NetworkLoadBalancerSummary( java.util.Map listeners, java.util.Map backendSets, java.util.Map freeformTags, + java.util.Map> securityAttributes, java.util.Map> definedTags, java.util.Map> systemTags) { super(); @@ -82,6 +84,7 @@ public NetworkLoadBalancerSummary( this.listeners = listeners; this.backendSets = backendSets; this.freeformTags = freeformTags; + this.securityAttributes = securityAttributes; this.definedTags = definedTags; this.systemTags = systemTags; } @@ -465,6 +468,32 @@ public Builder freeformTags(java.util.Map freeformTags) { this.__explicitlySet__.add("freeformTags"); return this; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For * more information, see [Resource @@ -534,6 +563,7 @@ public NetworkLoadBalancerSummary build() { this.listeners, this.backendSets, this.freeformTags, + this.securityAttributes, this.definedTags, this.systemTags); for (String explicitlySetProperty : this.__explicitlySet__) { @@ -595,6 +625,9 @@ public Builder copy(NetworkLoadBalancerSummary model) { if (model.wasPropertyExplicitlySet("freeformTags")) { this.freeformTags(model.getFreeformTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } @@ -953,6 +986,29 @@ public java.util.Map getFreeformTags() { return freeformTags; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code { "oracle-zpr": { "td": { "value": "42", "mode": "audit" } } }} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + /** * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more * information, see [Resource @@ -1027,6 +1083,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", listeners=").append(String.valueOf(this.listeners)); sb.append(", backendSets=").append(String.valueOf(this.backendSets)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); sb.append(", systemTags=").append(String.valueOf(this.systemTags)); sb.append(")"); @@ -1063,6 +1120,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.listeners, other.listeners) && java.util.Objects.equals(this.backendSets, other.backendSets) && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && java.util.Objects.equals(this.definedTags, other.definedTags) && java.util.Objects.equals(this.systemTags, other.systemTags) && super.equals(other); @@ -1107,6 +1165,11 @@ public int hashCode() { result = (result * PRIME) + (this.listeners == null ? 43 : this.listeners.hashCode()); result = (result * PRIME) + (this.backendSets == null ? 43 : this.backendSets.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); result = (result * PRIME) + super.hashCode(); diff --git a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java index 0374f613c65..87531fb9308 100644 --- a/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java +++ b/bmc-networkloadbalancer/src/main/java/com/oracle/bmc/networkloadbalancer/model/UpdateNetworkLoadBalancerDetails.java @@ -34,7 +34,8 @@ public final class UpdateNetworkLoadBalancerDetails "subnetIpv6Cidr", "assignedIpv6", "freeformTags", - "definedTags" + "definedTags", + "securityAttributes" }) public UpdateNetworkLoadBalancerDetails( String displayName, @@ -44,7 +45,8 @@ public UpdateNetworkLoadBalancerDetails( String subnetIpv6Cidr, String assignedIpv6, java.util.Map freeformTags, - java.util.Map> definedTags) { + java.util.Map> definedTags, + java.util.Map> securityAttributes) { super(); this.displayName = displayName; this.isPreserveSourceDestination = isPreserveSourceDestination; @@ -54,6 +56,7 @@ public UpdateNetworkLoadBalancerDetails( this.assignedIpv6 = assignedIpv6; this.freeformTags = freeformTags; this.definedTags = definedTags; + this.securityAttributes = securityAttributes; } @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") @@ -229,6 +232,32 @@ public Builder definedTags( this.__explicitlySet__.add("definedTags"); return this; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } @com.fasterxml.jackson.annotation.JsonIgnore private final java.util.Set __explicitlySet__ = new java.util.HashSet(); @@ -243,7 +272,8 @@ public UpdateNetworkLoadBalancerDetails build() { this.subnetIpv6Cidr, this.assignedIpv6, this.freeformTags, - this.definedTags); + this.definedTags, + this.securityAttributes); for (String explicitlySetProperty : this.__explicitlySet__) { model.markPropertyAsExplicitlySet(explicitlySetProperty); } @@ -276,6 +306,9 @@ public Builder copy(UpdateNetworkLoadBalancerDetails model) { if (model.wasPropertyExplicitlySet("definedTags")) { this.definedTags(model.getDefinedTags()); } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } return this; } } @@ -443,6 +476,29 @@ public java.util.Map> getDefinedTags() { return definedTags; } + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * ZPR 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](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + @Override public String toString() { return this.toString(true); @@ -467,6 +523,7 @@ public String toString(boolean includeByteArrayContents) { sb.append(", assignedIpv6=").append(String.valueOf(this.assignedIpv6)); sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); sb.append(")"); return sb.toString(); } @@ -491,6 +548,7 @@ public boolean equals(Object o) { && java.util.Objects.equals(this.assignedIpv6, other.assignedIpv6) && java.util.Objects.equals(this.freeformTags, other.freeformTags) && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) && super.equals(other); } @@ -516,6 +574,11 @@ public int hashCode() { result = (result * PRIME) + (this.assignedIpv6 == null ? 43 : this.assignedIpv6.hashCode()); result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); result = (result * PRIME) + super.hashCode(); return result; } diff --git a/bmc-nosql/pom.xml b/bmc-nosql/pom.xml index a0c038347bf..7238de6b117 100644 --- a/bmc-nosql/pom.xml +++ b/bmc-nosql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-nosql @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml index de5ef10e3d0..2d61c6c80ed 100644 --- a/bmc-objectstorage/bmc-objectstorage-combined/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-combined/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 3.50.0 + 3.50.1 ../pom.xml @@ -18,12 +18,12 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-objectstorage-extensions - 3.50.0 + 3.50.1 diff --git a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml index 0f127649e25..68348ae809e 100644 --- a/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-extensions/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 3.50.0 + 3.50.1 ../pom.xml @@ -18,17 +18,17 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-common-httpclient - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-objectstorage-generated - 3.50.0 + 3.50.1 org.slf4j diff --git a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml index 416151e3931..cafa4ab86f2 100644 --- a/bmc-objectstorage/bmc-objectstorage-generated/pom.xml +++ b/bmc-objectstorage/bmc-objectstorage-generated/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk-objectstorage-parent - 3.50.0 + 3.50.1 ../pom.xml @@ -19,7 +19,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-objectstorage/pom.xml b/bmc-objectstorage/pom.xml index 3b8c7362ce8..73871cfb19b 100644 --- a/bmc-objectstorage/pom.xml +++ b/bmc-objectstorage/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml diff --git a/bmc-oce/pom.xml b/bmc-oce/pom.xml index 9d25c80b40c..4d19dec6f8c 100644 --- a/bmc-oce/pom.xml +++ b/bmc-oce/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-oce @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-ocicontrolcenter/pom.xml b/bmc-ocicontrolcenter/pom.xml index 1b7b23193dd..a11dbeb1e2d 100644 --- a/bmc-ocicontrolcenter/pom.xml +++ b/bmc-ocicontrolcenter/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-ocicontrolcenter @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-ocvp/pom.xml b/bmc-ocvp/pom.xml index 24c76f565e2..94e0f451ccf 100644 --- a/bmc-ocvp/pom.xml +++ b/bmc-ocvp/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-ocvp @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-oda/pom.xml b/bmc-oda/pom.xml index 576f02250db..95d47f06b86 100644 --- a/bmc-oda/pom.xml +++ b/bmc-oda/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-oda @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-onesubscription/pom.xml b/bmc-onesubscription/pom.xml index 27e9787e107..6d4682d5cf9 100644 --- a/bmc-onesubscription/pom.xml +++ b/bmc-onesubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-onesubscription @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-ons/pom.xml b/bmc-ons/pom.xml index fbdbd158755..6c28eb78c81 100644 --- a/bmc-ons/pom.xml +++ b/bmc-ons/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-ons @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-opa/pom.xml b/bmc-opa/pom.xml index c3e05a95ec0..f6d79a2b96b 100644 --- a/bmc-opa/pom.xml +++ b/bmc-opa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-opa @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-opensearch/pom.xml b/bmc-opensearch/pom.xml index ef89f9e48f8..82d723aac5e 100644 --- a/bmc-opensearch/pom.xml +++ b/bmc-opensearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-opensearch @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-operatoraccesscontrol/pom.xml b/bmc-operatoraccesscontrol/pom.xml index c5eacf60278..89a54b6a67d 100644 --- a/bmc-operatoraccesscontrol/pom.xml +++ b/bmc-operatoraccesscontrol/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-operatoraccesscontrol @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-opsi/pom.xml b/bmc-opsi/pom.xml index 45ba30e294d..a23e85481c9 100644 --- a/bmc-opsi/pom.xml +++ b/bmc-opsi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-opsi @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-optimizer/pom.xml b/bmc-optimizer/pom.xml index e935caddc3c..6a6b2b543d5 100644 --- a/bmc-optimizer/pom.xml +++ b/bmc-optimizer/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-optimizer @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-osmanagement/pom.xml b/bmc-osmanagement/pom.xml index adc3637d937..55d475b1e84 100644 --- a/bmc-osmanagement/pom.xml +++ b/bmc-osmanagement/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-osmanagement @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-osmanagementhub/pom.xml b/bmc-osmanagementhub/pom.xml index 9489834dd4b..f511a08c5d5 100644 --- a/bmc-osmanagementhub/pom.xml +++ b/bmc-osmanagementhub/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-osmanagementhub @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-ospgateway/pom.xml b/bmc-ospgateway/pom.xml index c5ed6feb630..4faf70a8df6 100644 --- a/bmc-ospgateway/pom.xml +++ b/bmc-ospgateway/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-ospgateway @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-osubbillingschedule/pom.xml b/bmc-osubbillingschedule/pom.xml index 9d8a48c0cf4..ed760584453 100644 --- a/bmc-osubbillingschedule/pom.xml +++ b/bmc-osubbillingschedule/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-osubbillingschedule @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-osuborganizationsubscription/pom.xml b/bmc-osuborganizationsubscription/pom.xml index 9457537a49d..7cee1a1037b 100644 --- a/bmc-osuborganizationsubscription/pom.xml +++ b/bmc-osuborganizationsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-osuborganizationsubscription @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-osubsubscription/pom.xml b/bmc-osubsubscription/pom.xml index 3d0ca73623f..3e5a6eab4b1 100644 --- a/bmc-osubsubscription/pom.xml +++ b/bmc-osubsubscription/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-osubsubscription @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-osubusage/pom.xml b/bmc-osubusage/pom.xml index b86545ef4c6..dbeba1bb50b 100644 --- a/bmc-osubusage/pom.xml +++ b/bmc-osubusage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-osubusage @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-other-examples/bmc-jersey-examples/pom.xml b/bmc-other-examples/bmc-jersey-examples/pom.xml index b2126bc5208..292a7faf268 100644 --- a/bmc-other-examples/bmc-jersey-examples/pom.xml +++ b/bmc-other-examples/bmc-jersey-examples/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk-jersey-examples - 3.50.0 + 3.50.1 Oracle Cloud Infrastructure SDK - Examples using Jersey 2 HTTP client This project contains the examples on how to use the SDK used for Oracle Cloud Infrastructure with the Jersey 2 HTTP client https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm @@ -58,7 +58,7 @@ com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 3.50.0 + 3.50.1 false @@ -95,14 +95,14 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 pom import diff --git a/bmc-other-examples/bmc-jersey3-examples/pom.xml b/bmc-other-examples/bmc-jersey3-examples/pom.xml index 4298fb23427..2b824baf4ba 100644 --- a/bmc-other-examples/bmc-jersey3-examples/pom.xml +++ b/bmc-other-examples/bmc-jersey3-examples/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk-jersey3-examples - 3.50.0 + 3.50.1 Oracle Cloud Infrastructure SDK - Examples using Jersey 3 HTTP client This project contains the examples on how to use the SDK used for Oracle Cloud Infrastructure with the Jersey 3 HTTP client https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm @@ -58,7 +58,7 @@ com.oracle.oci.sdk oci-java-sdk-enforcer-rules - 3.50.0 + 3.50.1 false @@ -95,14 +95,14 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey3 - 3.50.0 + 3.50.1 pom import diff --git a/bmc-other-examples/native-maven-example/pom.xml b/bmc-other-examples/native-maven-example/pom.xml index 807e8d8adf6..994ce5bc700 100644 --- a/bmc-other-examples/native-maven-example/pom.xml +++ b/bmc-other-examples/native-maven-example/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk-examples-native - 3.50.0 + 3.50.1 Oracle Cloud Infrastructure SDK - Native Example This project contains an example on how to use the SDK used for Oracle Cloud Infrastructure in a native executable https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm @@ -98,14 +98,14 @@ com.oracle.oci.sdk oci-java-sdk-bom - 3.50.0 + 3.50.1 pom import com.oracle.oci.sdk oci-java-sdk-common-httpclient-jersey - 3.50.0 + 3.50.1 pom import diff --git a/bmc-other-examples/pom.xml b/bmc-other-examples/pom.xml index 7e24fe0cbf6..1a73f454594 100644 --- a/bmc-other-examples/pom.xml +++ b/bmc-other-examples/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml diff --git a/bmc-psql/pom.xml b/bmc-psql/pom.xml index 103283c1b15..5184920fcc9 100644 --- a/bmc-psql/pom.xml +++ b/bmc-psql/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-psql @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-queue/pom.xml b/bmc-queue/pom.xml index 68ff424979f..36594bd2841 100644 --- a/bmc-queue/pom.xml +++ b/bmc-queue/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-queue @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-recovery/pom.xml b/bmc-recovery/pom.xml index 48e613291b0..70e28cb4eef 100644 --- a/bmc-recovery/pom.xml +++ b/bmc-recovery/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-recovery @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-redis/pom.xml b/bmc-redis/pom.xml index a01a2c7e96b..e42a81d491f 100644 --- a/bmc-redis/pom.xml +++ b/bmc-redis/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-redis @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-resourcemanager/pom.xml b/bmc-resourcemanager/pom.xml index 5b15a9e5586..b176b195bb9 100644 --- a/bmc-resourcemanager/pom.xml +++ b/bmc-resourcemanager/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-resourcemanager @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-resourcescheduler/pom.xml b/bmc-resourcescheduler/pom.xml index 5e393b45303..7d2d025a168 100644 --- a/bmc-resourcescheduler/pom.xml +++ b/bmc-resourcescheduler/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-resourcescheduler @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-resourcesearch/pom.xml b/bmc-resourcesearch/pom.xml index 3fc1364bd05..6e4408537e8 100644 --- a/bmc-resourcesearch/pom.xml +++ b/bmc-resourcesearch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-resourcesearch @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-rover/pom.xml b/bmc-rover/pom.xml index 17129bb8966..fd60d2ceb24 100644 --- a/bmc-rover/pom.xml +++ b/bmc-rover/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-rover @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-sch/pom.xml b/bmc-sch/pom.xml index cc1ec61b5c7..cca0e5be7a6 100644 --- a/bmc-sch/pom.xml +++ b/bmc-sch/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-sch @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-secrets/pom.xml b/bmc-secrets/pom.xml index ca9bca107c2..159e204d0d6 100644 --- a/bmc-secrets/pom.xml +++ b/bmc-secrets/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-secrets @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-securityattribute/pom.xml b/bmc-securityattribute/pom.xml new file mode 100644 index 00000000000..9cc66f5d307 --- /dev/null +++ b/bmc-securityattribute/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 3.50.1 + ../pom.xml + + oci-java-sdk-securityattribute + Oracle Cloud Infrastructure SDK - Security Attribute + This project contains the SDK used for Oracle Cloud Infrastructure Security Attribute + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 3.50.1 + + + \ No newline at end of file diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java new file mode 100644 index 00000000000..77bd438e9cb --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttribute.java @@ -0,0 +1,522 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Use the Security Attributes API to manage security attributes and security attribute namespaces. + * For more information, see the documentation for [Security + * Attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) + * and [Security Attribute + * Nampespaces](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * This service client uses CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by + * default if no circuit breaker configuration is defined by the user. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public interface SecurityAttribute extends AutoCloseable { + + /** Rebuilds the client from scratch. Useful to refresh certificates. */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** Gets the set endpoint for REST call (ex, https://www.example.com) */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + * + *

Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the + * endpoint. If the service is not available in this Region, however, an + * IllegalArgumentException will be raised. + * + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + * + *

Note, this will first try to map the region ID to a known Region and call {@link + * #setRegion(Region) setRegion}. + * + *

If no known Region could be determined, it will create an endpoint based on the default + * endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. Set + * realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm + * specific endpoint template, otherwise set it to "false" + * + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint + * template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Deletes the specified security attribute definitions. This operation triggers a process that + * removes the security attributes from all resources in your tenancy. The security attributes + * must be within the same security attribute namespace. + * + *

The following actions happen immediately: + * + *

After you start this operation, the state of the tag changes to DELETING, and security + * attribute removal from resources begins. This process can take up to 48 hours depending on + * the number of resources that are tagged and the regions in which those resources reside. + * + *

When all security attributes have been removed, the state changes to DELETED. You cannot + * restore a deleted security attribute. After the security attribute state changes to DELETED, + * you can use the same security attribute name again. + * + *

After you start this operation, you cannot start either the {@link + * #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} or the + * {@link + * #cascadeDeleteSecurityAttributeNamespace(CascadeDeleteSecurityAttributeNamespaceRequest) + * cascadeDeleteSecurityAttributeNamespace} operation until this process completes. + * + *

In order to delete security attribute, you must first retire the security attribute. Use + * {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest) updateSecurityAttribute} to + * retire a security attribute. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * BulkDeleteSecurityAttributes API. + */ + BulkDeleteSecurityAttributesResponse bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request); + + /** + * Edits the specified list of security attributes for the selected resources. This operation + * triggers a process that edits the attributes on all selected resources. The possible actions + * are: + * + *

Add a security attribute when it does not already exist on the resource. * Update the + * value for a security attribute when it is present on the resource. * Add a security attribute + * when it does not already exist on the resource or update the value when it is present on the + * resource. * Remove a security attribute from a resource. The security attribute is removed + * from the resource regardless of the value. + * + *

The edits can include a combination of operations and attributes. However, multiple + * operations cannot apply to the same attribute in the same request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * BulkEditSecurityAttributes API. + */ + BulkEditSecurityAttributesResponse bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request); + + /** + * Deletes the specified security attribute namespace. This operation triggers a process that + * removes all of the security attributes defined in the specified security attribute namespace + * from all resources in your tenancy and then deletes the security attribute namespace. + * + *

After you start the delete operation: + * + *

New security attribute key definitions cannot be created under the namespace. * The state + * of the security attribute namespace changes to DELETING. * Security attribute removal from + * the resources begins. + * + *

This process can take up to 48 hours depending on the number of security attributes in the + * namespace, the number of resources that are tagged, and the locations of the regions in which + * those resources reside. + * + *

After all security attributes are removed, the state changes to DELETED. You cannot + * restore a deleted security attribute namespace. After the deleted security attribute + * namespace changes its state to DELETED, you can use the name of the deleted security + * attribute namespace again. + * + *

After you start this operation, you cannot start either the {@link + * #deleteSecurityAttribute(DeleteSecurityAttributeRequest) deleteSecurityAttribute} or the + * {@link #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest) + * bulkDeleteSecurityAttributes} operation until this process completes. + * + *

To delete a security attribute namespace, you must first retire it. Use {@link + * #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest) + * updateSecurityAttributeNamespace} to retire a security attribute namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * CascadingDeleteSecurityAttributeNamespace API. + */ + CascadingDeleteSecurityAttributeNamespaceResponse cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request); + + /** + * Moves the specified security attribute namespace to the specified compartment within the same + * tenancy. + * + *

To move the security attribute namespace, you must have the manage security-attributes + * permission on both compartments. For more information about IAM policies, see [Details for + * IAM](https://docs.cloud.oracle.com/Content/Identity/policyreference/iampolicyreference.htm). + * + *

Moving a security attribute namespace moves all the security attributes contained in the + * security attribute namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ChangeSecurityAttributeNamespaceCompartment API. + */ + ChangeSecurityAttributeNamespaceCompartmentResponse changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request); + + /** + * Creates a new security attribute in the specified security attribute namespace. + * + *

The security attribute requires either the OCID or the name of the security attribute + * namespace that will contain this security attribute. + * + *

You must specify a *name* for the attribute, which must be unique across all attributes in + * the security attribute namespace and cannot be changed. The only valid characters for + * security attribute names are:\u00A00-9, A-Z, a-z, -, _ characters. Names are case + * insensitive. That means, for example, \"mySecurityAttribute\" and \"mysecurityattribute\" are + * not allowed in the same namespace. If you specify a name that's already in use in the + * security attribute namespace, a 409 error is returned. + * + *

The security attribute must have a *description*. It does not have to be unique, and you + * can change it with {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest) + * updateSecurityAttribute}. + * + *

The security attribute must have a value type, which is specified with a validator. + * Security attribute can use either a static value or a list of possible values. Static values + * are entered by a user applying the security attribute to a resource. Lists are created by the + * user and the user must apply a value from the list. Lists are validated. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * CreateSecurityAttribute API. + */ + CreateSecurityAttributeResponse createSecurityAttribute(CreateSecurityAttributeRequest request); + + /** + * Creates a new security attribute namespace in the specified compartment. + * + *

You must specify the compartment ID in the request object (remember that the tenancy is + * simply the root compartment). + * + *

You must also specify a *name* for the namespace, which must be unique across all + * namespaces in your tenancy and cannot be changed. The only valid characters for security + * attribute names are: \u00A00-9, A-Z, a-z, -, _ characters. Names are case insensitive. That + * means, for example, \"myNamespace\" and \"mynamespace\" are not allowed in the same tenancy. + * Once you created a namespace, you cannot change the name. If you specify a name that's + * already in use in the tenancy, a 409 error is returned. + * + *

You must also specify a *description* for the namespace. It does not have to be unique, + * and you can change it with {@link + * #securityAttributeNamespace(SecurityAttributeNamespaceRequest) securityAttributeNamespace}. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * CreateSecurityAttributeNamespace API. + */ + CreateSecurityAttributeNamespaceResponse createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request); + + /** + * Deletes the specified security attribute. This operation triggers a process that removes the + * security attribute from all resources in your tenancy. + * + *

When you start the delete operation, the state of the security attribute changes to + * DELETING and security attribute removal from resources begins. This can take up to 48 hours + * depending on the number of resources that were tagged as well as the regions in which those + * resources reside. + * + *

When all attributes have been removed, the state changes to DELETED. You cannot restore a + * deleted attribute. Once the deleted attribute changes its state to DELETED, you can use the + * same security attribute name again. + * + *

After you start this operation, you cannot start either the {@link + * #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest) + * bulkDeleteSecurityAttributes} or the {@link + * #cascadeDeleteTagNamespace(CascadeDeleteTagNamespaceRequest) cascadeDeleteTagNamespace} + * operation until this process completes. + * + *

To delete a security attribute, you must first retire it. Use {@link + * #updateSecurityAttribute(UpdateSecurityAttributeRequest) updateSecurityAttribute} to retire a + * security attribute. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * DeleteSecurityAttribute API. + */ + DeleteSecurityAttributeResponse deleteSecurityAttribute(DeleteSecurityAttributeRequest request); + + /** + * Deletes the specified security attribute namespace. Only an empty security attribute + * namespace can be deleted with this operation. To use this operation to delete a security + * attribute namespace that contains security attributes, first delete all of its security + * attributes. Use {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest) + * deleteSecurityAttribute} to delete a security attribute. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * DeleteSecurityAttributeNamespace API. + */ + DeleteSecurityAttributeNamespaceResponse deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request); + + /** + * Gets the specified security attribute's information. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * GetSecurityAttribute API. + */ + GetSecurityAttributeResponse getSecurityAttribute(GetSecurityAttributeRequest request); + + /** + * Gets the specified security attribute namespace's information. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * GetSecurityAttributeNamespace API. + */ + GetSecurityAttributeNamespaceResponse getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request); + + /** + * Gets details on a specified work request. The workRequestID is returned in the + * opc-work-request-id header for any asynchronous operation in security attributes service. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * GetSecurityAttributeWorkRequest API. + */ + GetSecurityAttributeWorkRequestResponse getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request); + + /** + * Lists the security attribute namespaces in the specified compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListSecurityAttributeNamespaces API. + */ + ListSecurityAttributeNamespacesResponse listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request); + + /** + * Gets the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListSecurityAttributeWorkRequestErrors API. + */ + ListSecurityAttributeWorkRequestErrorsResponse listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request); + + /** + * Gets the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListSecurityAttributeWorkRequestLogs API. + */ + ListSecurityAttributeWorkRequestLogsResponse listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request); + + /** + * Lists the security attribute work requests in compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListSecurityAttributeWorkRequests API. + */ + ListSecurityAttributeWorkRequestsResponse listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request); + + /** + * Lists the security attributes in the specified namespace. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListSecurityAttributes API. + */ + ListSecurityAttributesResponse listSecurityAttributes(ListSecurityAttributesRequest request); + + /** + * Updates the specified security attribute. You can only update `description`, and `isRetired`. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * UpdateSecurityAttribute API. + */ + UpdateSecurityAttributeResponse updateSecurityAttribute(UpdateSecurityAttributeRequest request); + + /** + * Updates the specified security attribute namespace. You can't update the namespace name. + * + *

Updating `isRetired` to 'true' retires the namespace and all the security attributes in + * the namespace. Reactivating a namespace (changing `isRetired` from 'true' to 'false') does + * not reactivate security attributes. To reactivate the security attributes, you must + * reactivate each one individually *after* you reactivate the namespace, using {@link + * #updateTag(UpdateTagRequest) updateTag}. For more information about retiring security + * attribute namespaces, see [Managing Security Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + *

You can't add a namespace with the same name as a retired namespace in the same tenancy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * UpdateSecurityAttributeNamespace API. + */ + UpdateSecurityAttributeNamespaceResponse updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + SecurityAttributeWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may + * return multiple pages of data. These paginators provide an {@link java.lang.Iterable} + * interface so that service responses, or resources/records, can be iterated through without + * having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + SecurityAttributePaginators getPaginators(); +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java new file mode 100644 index 00000000000..c7817fc9ec1 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsync.java @@ -0,0 +1,516 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Use the Security Attributes API to manage security attributes and security attribute namespaces. + * For more information, see the documentation for [Security + * Attributes](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attributes.htm) + * and [Security Attribute + * Nampespaces](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public interface SecurityAttributeAsync extends AutoCloseable { + + /** Rebuilds the client from scratch. Useful to refresh certificates. */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** Gets the set endpoint for REST call (ex, https://www.example.com) */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + * + *

Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the + * endpoint. If the service is not available in this region, however, an + * IllegalArgumentException will be raised. + * + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + * + *

Note, this will first try to map the region ID to a known Region and call {@link + * #setRegion(Region) setRegion}. + * + *

If no known Region could be determined, it will create an endpoint based on the default + * endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. Set + * realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm + * specific endpoint template, otherwise set it to "false" + * + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint + * template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Deletes the specified security attribute definitions. This operation triggers a process that + * removes the security attributes from all resources in your tenancy. The security attributes + * must be within the same security attribute namespace. + * + *

The following actions happen immediately: + * + *

After you start this operation, the state of the tag changes to DELETING, and security + * attribute removal from resources begins. This process can take up to 48 hours depending on + * the number of resources that are tagged and the regions in which those resources reside. + * + *

When all security attributes have been removed, the state changes to DELETED. You cannot + * restore a deleted security attribute. After the security attribute state changes to DELETED, + * you can use the same security attribute name again. + * + *

After you start this operation, you cannot start either the {@link + * #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) + * deleteSecurityAttribute} or the {@link + * #cascadeDeleteSecurityAttributeNamespace(CascadeDeleteSecurityAttributeNamespaceRequest, + * Consumer, Consumer) cascadeDeleteSecurityAttributeNamespace} operation until this process + * completes. + * + *

In order to delete security attribute, you must first retire the security attribute. Use + * {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, Consumer) + * updateSecurityAttribute} to retire a security attribute. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSecurityAttributesRequest, + BulkDeleteSecurityAttributesResponse> + handler); + + /** + * Edits the specified list of security attributes for the selected resources. This operation + * triggers a process that edits the attributes on all selected resources. The possible actions + * are: + * + *

Add a security attribute when it does not already exist on the resource. * Update the + * value for a security attribute when it is present on the resource. * Add a security attribute + * when it does not already exist on the resource or update the value when it is present on the + * resource. * Remove a security attribute from a resource. The security attribute is removed + * from the resource regardless of the value. + * + *

The edits can include a combination of operations and attributes. However, multiple + * operations cannot apply to the same attribute in the same request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request, + com.oracle.bmc.responses.AsyncHandler< + BulkEditSecurityAttributesRequest, BulkEditSecurityAttributesResponse> + handler); + + /** + * Deletes the specified security attribute namespace. This operation triggers a process that + * removes all of the security attributes defined in the specified security attribute namespace + * from all resources in your tenancy and then deletes the security attribute namespace. + * + *

After you start the delete operation: + * + *

New security attribute key definitions cannot be created under the namespace. * The state + * of the security attribute namespace changes to DELETING. * Security attribute removal from + * the resources begins. + * + *

This process can take up to 48 hours depending on the number of security attributes in the + * namespace, the number of resources that are tagged, and the locations of the regions in which + * those resources reside. + * + *

After all security attributes are removed, the state changes to DELETED. You cannot + * restore a deleted security attribute namespace. After the deleted security attribute + * namespace changes its state to DELETED, you can use the name of the deleted security + * attribute namespace again. + * + *

After you start this operation, you cannot start either the {@link + * #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, Consumer) + * deleteSecurityAttribute} or the {@link + * #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest, Consumer, Consumer) + * bulkDeleteSecurityAttributes} operation until this process completes. + * + *

To delete a security attribute namespace, you must first retire it. Use {@link + * #updateSecurityAttributeNamespace(UpdateSecurityAttributeNamespaceRequest, Consumer, + * Consumer) updateSecurityAttributeNamespace} to retire a security attribute namespace. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse> + handler); + + /** + * Moves the specified security attribute namespace to the specified compartment within the same + * tenancy. + * + *

To move the security attribute namespace, you must have the manage security-attributes + * permission on both compartments. For more information about IAM policies, see [Details for + * IAM](https://docs.cloud.oracle.com/Content/Identity/policyreference/iampolicyreference.htm). + * + *

Moving a security attribute namespace moves all the security attributes contained in the + * security attribute namespace. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request, + com.oracle.bmc.responses.AsyncHandler< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse> + handler); + + /** + * Creates a new security attribute in the specified security attribute namespace. + * + *

The security attribute requires either the OCID or the name of the security attribute + * namespace that will contain this security attribute. + * + *

You must specify a *name* for the attribute, which must be unique across all attributes in + * the security attribute namespace and cannot be changed. The only valid characters for + * security attribute names are:\u00A00-9, A-Z, a-z, -, _ characters. Names are case + * insensitive. That means, for example, \"mySecurityAttribute\" and \"mysecurityattribute\" are + * not allowed in the same namespace. If you specify a name that's already in use in the + * security attribute namespace, a 409 error is returned. + * + *

The security attribute must have a *description*. It does not have to be unique, and you + * can change it with {@link #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, + * Consumer) updateSecurityAttribute}. + * + *

The security attribute must have a value type, which is specified with a validator. + * Security attribute can use either a static value or a list of possible values. Static values + * are entered by a user applying the security attribute to a resource. Lists are created by the + * user and the user must apply a value from the list. Lists are validated. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future createSecurityAttribute( + CreateSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse> + handler); + + /** + * Creates a new security attribute namespace in the specified compartment. + * + *

You must specify the compartment ID in the request object (remember that the tenancy is + * simply the root compartment). + * + *

You must also specify a *name* for the namespace, which must be unique across all + * namespaces in your tenancy and cannot be changed. The only valid characters for security + * attribute names are: \u00A00-9, A-Z, a-z, -, _ characters. Names are case insensitive. That + * means, for example, \"myNamespace\" and \"mynamespace\" are not allowed in the same tenancy. + * Once you created a namespace, you cannot change the name. If you specify a name that's + * already in use in the tenancy, a 409 error is returned. + * + *

You must also specify a *description* for the namespace. It does not have to be unique, + * and you can change it with {@link + * #securityAttributeNamespace(SecurityAttributeNamespaceRequest, Consumer, Consumer) + * securityAttributeNamespace}. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse> + handler); + + /** + * Deletes the specified security attribute. This operation triggers a process that removes the + * security attribute from all resources in your tenancy. + * + *

When you start the delete operation, the state of the security attribute changes to + * DELETING and security attribute removal from resources begins. This can take up to 48 hours + * depending on the number of resources that were tagged as well as the regions in which those + * resources reside. + * + *

When all attributes have been removed, the state changes to DELETED. You cannot restore a + * deleted attribute. Once the deleted attribute changes its state to DELETED, you can use the + * same security attribute name again. + * + *

After you start this operation, you cannot start either the {@link + * #bulkDeleteSecurityAttributes(BulkDeleteSecurityAttributesRequest, Consumer, Consumer) + * bulkDeleteSecurityAttributes} or the {@link + * #cascadeDeleteTagNamespace(CascadeDeleteTagNamespaceRequest, Consumer, Consumer) + * cascadeDeleteTagNamespace} operation until this process completes. + * + *

To delete a security attribute, you must first retire it. Use {@link + * #updateSecurityAttribute(UpdateSecurityAttributeRequest, Consumer, Consumer) + * updateSecurityAttribute} to retire a security attribute. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future deleteSecurityAttribute( + DeleteSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse> + handler); + + /** + * Deletes the specified security attribute namespace. Only an empty security attribute + * namespace can be deleted with this operation. To use this operation to delete a security + * attribute namespace that contains security attributes, first delete all of its security + * attributes. Use {@link #deleteSecurityAttribute(DeleteSecurityAttributeRequest, Consumer, + * Consumer) deleteSecurityAttribute} to delete a security attribute. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse> + handler); + + /** + * Gets the specified security attribute's information. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future getSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeRequest, GetSecurityAttributeResponse> + handler); + + /** + * Gets the specified security attribute namespace's information. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse> + handler); + + /** + * Gets details on a specified work request. The workRequestID is returned in the + * opc-work-request-id header for any asynchronous operation in security attributes service. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse> + handler); + + /** + * Lists the security attribute namespaces in the specified compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse> + handler); + + /** + * Gets the errors for a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse> + handler); + + /** + * Gets the logs for a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse> + handler); + + /** + * Lists the security attribute work requests in compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse> + handler); + + /** + * Lists the security attributes in the specified namespace. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future listSecurityAttributes( + ListSecurityAttributesRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributesRequest, ListSecurityAttributesResponse> + handler); + + /** + * Updates the specified security attribute. You can only update `description`, and `isRetired`. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future updateSecurityAttribute( + UpdateSecurityAttributeRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse> + handler); + + /** + * Updates the specified security attribute namespace. You can't update the namespace name. + * + *

Updating `isRetired` to 'true' retires the namespace and all the security attributes in + * the namespace. Reactivating a namespace (changing `isRetired` from 'true' to 'false') does + * not reactivate security attributes. To reactivate the security attributes, you must + * reactivate each one individually *after* you reactivate the namespace, using {@link + * #updateTag(UpdateTagRequest, Consumer, Consumer) updateTag}. For more information about + * retiring security attribute namespaces, see [Managing Security Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + *

You can't add a namespace with the same name as a retired namespace in the same tenancy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request, + com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse> + handler); +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java new file mode 100644 index 00000000000..173af4cd306 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeAsyncClient.java @@ -0,0 +1,907 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.util.internal.Validate; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +import java.util.Objects; + +/** + * Async client implementation for SecurityAttribute service.
+ * There are two ways to use async client: 1. Use AsyncHandler: using AsyncHandler, if the response + * to the call is an {@link java.io.InputStream}, like getObject Api in object storage service, + * developers need to process the stream in AsyncHandler, and not anywhere else, because the stream + * will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done + * with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or + * the AsyncHandler, but not both. If the Future is used, the caller should pass in null as the + * AsyncHandler. If the AsyncHandler is used, it is still safe to use the Future to determine + * whether or not the request was completed via Future.isDone/isCancelled.
+ * Please refer to + * https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributeAsyncClient extends com.oracle.bmc.http.internal.BaseAsyncClient + implements SecurityAttributeAsync { + /** Service instance for SecurityAttribute. */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SECURITYATTRIBUTE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://security-attribute.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SecurityAttributeAsyncClient.class); + + SecurityAttributeAsyncClient( + com.oracle.bmc.common.ClientBuilderBase builder, + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + super(builder, authenticationDetailsProvider); + } + + /** + * Create a builder for this client. + * + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be + * passed to the {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder< + Builder, SecurityAttributeAsyncClient> { + private Builder(com.oracle.bmc.Service service) { + super(service); + final String packageName = "securityattribute"; + com.oracle.bmc.internal.Alloy.throwDisabledServiceExceptionIfAppropriate(packageName); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public SecurityAttributeAsyncClient build( + @jakarta.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + return new SecurityAttributeAsyncClient(this, authenticationDetailsProvider); + } + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + super.setRegion(region); + } + + @Override + public void setRegion(String regionId) { + super.setRegion(regionId); + } + + @Override + public java.util.concurrent.Future + bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkDeleteSecurityAttributesRequest, + BulkDeleteSecurityAttributesResponse> + handler) { + Objects.requireNonNull( + request.getBulkDeleteSecurityAttributesDetails(), + "bulkDeleteSecurityAttributesDetails is required"); + + return clientCall(request, BulkDeleteSecurityAttributesResponse::builder) + .logger(LOG, "bulkDeleteSecurityAttributes") + .serviceDetails("SecurityAttribute", "BulkDeleteSecurityAttributes", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(BulkDeleteSecurityAttributesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributes") + .appendPathParam("actions") + .appendPathParam("bulkDelete") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .hasBody() + .handleResponseHeaderString( + "opc-request-id", + BulkDeleteSecurityAttributesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + BulkDeleteSecurityAttributesResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + BulkEditSecurityAttributesRequest, + BulkEditSecurityAttributesResponse> + handler) { + + return clientCall(request, BulkEditSecurityAttributesResponse::builder) + .logger(LOG, "bulkEditSecurityAttributes") + .serviceDetails("SecurityAttribute", "BulkEditSecurityAttributes", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(BulkEditSecurityAttributesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributes") + .appendPathParam("actions") + .appendPathParam("bulkEdit") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .hasBody() + .handleResponseHeaderString( + "opc-request-id", BulkEditSecurityAttributesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + BulkEditSecurityAttributesResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CascadingDeleteSecurityAttributeNamespaceRequest, + CascadingDeleteSecurityAttributeNamespaceResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, CascadingDeleteSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "cascadingDeleteSecurityAttributeNamespace") + .serviceDetails( + "SecurityAttribute", "CascadingDeleteSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CascadingDeleteSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("actions") + .appendPathParam("cascadeDelete") + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .handleResponseHeaderString( + "opc-request-id", + CascadingDeleteSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + CascadingDeleteSecurityAttributeNamespaceResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ChangeSecurityAttributeNamespaceCompartmentRequest, + ChangeSecurityAttributeNamespaceCompartmentResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Objects.requireNonNull( + request.getChangeSecurityAttributeNamespaceCompartmentDetails(), + "changeSecurityAttributeNamespaceCompartmentDetails is required"); + + return clientCall(request, ChangeSecurityAttributeNamespaceCompartmentResponse::builder) + .logger(LOG, "changeSecurityAttributeNamespaceCompartment") + .serviceDetails( + "SecurityAttribute", "ChangeSecurityAttributeNamespaceCompartment", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(ChangeSecurityAttributeNamespaceCompartmentRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("actions") + .appendPathParam("changeCompartment") + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .hasBody() + .handleResponseHeaderString( + "opc-request-id", + ChangeSecurityAttributeNamespaceCompartmentResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future createSecurityAttribute( + CreateSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeRequest, CreateSecurityAttributeResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Objects.requireNonNull( + request.getCreateSecurityAttributeDetails(), + "createSecurityAttributeDetails is required"); + + return clientCall(request, CreateSecurityAttributeResponse::builder) + .logger(LOG, "createSecurityAttribute") + .serviceDetails("SecurityAttribute", "CreateSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttribute.class, + CreateSecurityAttributeResponse.Builder::securityAttribute) + .handleResponseHeaderString( + "opc-request-id", CreateSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString("etag", CreateSecurityAttributeResponse.Builder::etag) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateSecurityAttributeNamespaceRequest, + CreateSecurityAttributeNamespaceResponse> + handler) { + Objects.requireNonNull( + request.getCreateSecurityAttributeNamespaceDetails(), + "createSecurityAttributeNamespaceDetails is required"); + + return clientCall(request, CreateSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "createSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "CreateSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.class, + CreateSecurityAttributeNamespaceResponse.Builder + ::securityAttributeNamespace) + .handleResponseHeaderString( + "opc-request-id", + CreateSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "etag", CreateSecurityAttributeNamespaceResponse.Builder::etag) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future deleteSecurityAttribute( + DeleteSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeRequest, DeleteSecurityAttributeResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + + return clientCall(request, DeleteSecurityAttributeResponse::builder) + .logger(LOG, "deleteSecurityAttribute") + .serviceDetails("SecurityAttribute", "DeleteSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.DELETE) + .requestBuilder(DeleteSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendPathParam(request.getSecurityAttributeName()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .handleResponseHeaderString( + "opc-request-id", DeleteSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + DeleteSecurityAttributeResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteSecurityAttributeNamespaceRequest, + DeleteSecurityAttributeNamespaceResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, DeleteSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "deleteSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "DeleteSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.DELETE) + .requestBuilder(DeleteSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .handleResponseHeaderString( + "opc-request-id", + DeleteSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future getSecurityAttribute( + GetSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeRequest, GetSecurityAttributeResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + + return clientCall(request, GetSecurityAttributeResponse::builder) + .logger(LOG, "getSecurityAttribute") + .serviceDetails("SecurityAttribute", "GetSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendPathParam(request.getSecurityAttributeName()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttribute.class, + GetSecurityAttributeResponse.Builder::securityAttribute) + .handleResponseHeaderString( + "opc-request-id", GetSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString("etag", GetSecurityAttributeResponse.Builder::etag) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, GetSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "getSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "GetSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.class, + GetSecurityAttributeNamespaceResponse.Builder::securityAttributeNamespace) + .handleResponseHeaderString( + "opc-request-id", + GetSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "etag", GetSecurityAttributeNamespaceResponse.Builder::etag) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + return clientCall(request, GetSecurityAttributeWorkRequestResponse::builder) + .logger(LOG, "getSecurityAttributeWorkRequest") + .serviceDetails("SecurityAttribute", "GetSecurityAttributeWorkRequest", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetSecurityAttributeWorkRequestRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest.class, + GetSecurityAttributeWorkRequestResponse.Builder + ::securityAttributeWorkRequest) + .handleResponseHeaderString( + "opc-request-id", + GetSecurityAttributeWorkRequestResponse.Builder::opcRequestId) + .handleResponseHeaderFloat( + "retry-after", GetSecurityAttributeWorkRequestResponse.Builder::retryAfter) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse> + handler) { + + return clientCall(request, ListSecurityAttributeNamespacesResponse::builder) + .logger(LOG, "listSecurityAttributeNamespaces") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeNamespaces", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeNamespacesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendQueryParam("name", request.getName()) + .appendQueryParam("compartmentIdInSubtree", request.getCompartmentIdInSubtree()) + .appendEnumQueryParam("lifecycleState", request.getLifecycleState()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBodyList( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary + .class, + ListSecurityAttributeNamespacesResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeNamespacesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeNamespacesResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + return clientCall(request, ListSecurityAttributeWorkRequestErrorsResponse::builder) + .logger(LOG, "listSecurityAttributeWorkRequestErrors") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeWorkRequestErrors", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeWorkRequestErrorsRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("errors") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBodyList( + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary.class, + ListSecurityAttributeWorkRequestErrorsResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeWorkRequestErrorsResponse.Builder::opcRequestId) + .handleResponseHeaderFloat( + "retry-after", + ListSecurityAttributeWorkRequestErrorsResponse.Builder::retryAfter) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeWorkRequestErrorsResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + return clientCall(request, ListSecurityAttributeWorkRequestLogsResponse::builder) + .logger(LOG, "listSecurityAttributeWorkRequestLogs") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeWorkRequestLogs", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeWorkRequestLogsRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("logs") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBodyList( + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary.class, + ListSecurityAttributeWorkRequestLogsResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeWorkRequestLogsResponse.Builder::opcRequestId) + .handleResponseHeaderFloat( + "retry-after", + ListSecurityAttributeWorkRequestLogsResponse.Builder::retryAfter) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeWorkRequestLogsResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse> + handler) { + + return clientCall(request, ListSecurityAttributeWorkRequestsResponse::builder) + .logger(LOG, "listSecurityAttributeWorkRequests") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeWorkRequests", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeWorkRequestsRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendQueryParam("resourceIdentifier", request.getResourceIdentifier()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBodyList( + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary + .class, + ListSecurityAttributeWorkRequestsResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeWorkRequestsResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeWorkRequestsResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future listSecurityAttributes( + ListSecurityAttributesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListSecurityAttributesRequest, ListSecurityAttributesResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, ListSecurityAttributesResponse::builder) + .logger(LOG, "listSecurityAttributes") + .serviceDetails("SecurityAttribute", "ListSecurityAttributes", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("lifecycleState", request.getLifecycleState()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBodyList( + com.oracle.bmc.securityattribute.model.SecurityAttributeSummary.class, + ListSecurityAttributesResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", ListSecurityAttributesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", ListSecurityAttributesResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future updateSecurityAttribute( + UpdateSecurityAttributeRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeRequest, UpdateSecurityAttributeResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + Objects.requireNonNull( + request.getUpdateSecurityAttributeDetails(), + "updateSecurityAttributeDetails is required"); + + return clientCall(request, UpdateSecurityAttributeResponse::builder) + .logger(LOG, "updateSecurityAttribute") + .serviceDetails("SecurityAttribute", "UpdateSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.PUT) + .requestBuilder(UpdateSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendPathParam(request.getSecurityAttributeName()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttribute.class, + UpdateSecurityAttributeResponse.Builder::securityAttribute) + .handleResponseHeaderString( + "opc-request-id", UpdateSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString("etag", UpdateSecurityAttributeResponse.Builder::etag) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateSecurityAttributeNamespaceRequest, + UpdateSecurityAttributeNamespaceResponse> + handler) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Objects.requireNonNull( + request.getUpdateSecurityAttributeNamespaceDetails(), + "updateSecurityAttributeNamespaceDetails is required"); + + return clientCall(request, UpdateSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "updateSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "UpdateSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.PUT) + .requestBuilder(UpdateSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.class, + UpdateSecurityAttributeNamespaceResponse.Builder + ::securityAttributeNamespace) + .handleResponseHeaderString( + "opc-request-id", + UpdateSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "etag", UpdateSecurityAttributeNamespaceResponse.Builder::etag) + .callAsync(handler); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(builder(), authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(builder().configuration(configuration), authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + builder().configuration(configuration).clientConfigurator(clientConfigurator), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @param signingStrategyRequestSignerFactories {@link + * Builder#signingStrategyRequestSignerFactories} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint) + .signingStrategyRequestSignerFactories( + signingStrategyRequestSignerFactories), + authenticationDetailsProvider); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java new file mode 100644 index 00000000000..d5921a03be1 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeClient.java @@ -0,0 +1,929 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.util.internal.Validate; +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +import java.util.Objects; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributeClient extends com.oracle.bmc.http.internal.BaseSyncClient + implements SecurityAttribute { + /** Service instance for SecurityAttribute. */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("SECURITYATTRIBUTE") + .serviceEndpointPrefix("") + .serviceEndpointTemplate( + "https://security-attribute.{region}.oci.{secondLevelDomain}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(SecurityAttributeClient.class); + + private final SecurityAttributeWaiters waiters; + + private final SecurityAttributePaginators paginators; + + SecurityAttributeClient( + com.oracle.bmc.common.ClientBuilderBase builder, + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + java.util.concurrent.ExecutorService executorService) { + super( + builder, + authenticationDetailsProvider, + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("SecurityAttribute-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new SecurityAttributeWaiters(executorService, this); + + this.paginators = new SecurityAttributePaginators(this); + } + + /** + * Create a builder for this client. + * + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be + * passed to the {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + final String packageName = "securityattribute"; + com.oracle.bmc.internal.Alloy.throwDisabledServiceExceptionIfAppropriate(packageName); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public SecurityAttributeClient build( + @jakarta.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + return new SecurityAttributeClient( + this, authenticationDetailsProvider, executorService); + } + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + super.setRegion(region); + } + + @Override + public void setRegion(String regionId) { + super.setRegion(regionId); + } + + @Override + public BulkDeleteSecurityAttributesResponse bulkDeleteSecurityAttributes( + BulkDeleteSecurityAttributesRequest request) { + Objects.requireNonNull( + request.getBulkDeleteSecurityAttributesDetails(), + "bulkDeleteSecurityAttributesDetails is required"); + + return clientCall(request, BulkDeleteSecurityAttributesResponse::builder) + .logger(LOG, "bulkDeleteSecurityAttributes") + .serviceDetails("SecurityAttribute", "BulkDeleteSecurityAttributes", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(BulkDeleteSecurityAttributesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributes") + .appendPathParam("actions") + .appendPathParam("bulkDelete") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .hasBody() + .handleResponseHeaderString( + "opc-request-id", + BulkDeleteSecurityAttributesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + BulkDeleteSecurityAttributesResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public BulkEditSecurityAttributesResponse bulkEditSecurityAttributes( + BulkEditSecurityAttributesRequest request) { + + return clientCall(request, BulkEditSecurityAttributesResponse::builder) + .logger(LOG, "bulkEditSecurityAttributes") + .serviceDetails("SecurityAttribute", "BulkEditSecurityAttributes", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(BulkEditSecurityAttributesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributes") + .appendPathParam("actions") + .appendPathParam("bulkEdit") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .hasBody() + .handleResponseHeaderString( + "opc-request-id", BulkEditSecurityAttributesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + BulkEditSecurityAttributesResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public CascadingDeleteSecurityAttributeNamespaceResponse + cascadingDeleteSecurityAttributeNamespace( + CascadingDeleteSecurityAttributeNamespaceRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, CascadingDeleteSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "cascadingDeleteSecurityAttributeNamespace") + .serviceDetails( + "SecurityAttribute", "CascadingDeleteSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CascadingDeleteSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("actions") + .appendPathParam("cascadeDelete") + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .handleResponseHeaderString( + "opc-request-id", + CascadingDeleteSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + CascadingDeleteSecurityAttributeNamespaceResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public ChangeSecurityAttributeNamespaceCompartmentResponse + changeSecurityAttributeNamespaceCompartment( + ChangeSecurityAttributeNamespaceCompartmentRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Objects.requireNonNull( + request.getChangeSecurityAttributeNamespaceCompartmentDetails(), + "changeSecurityAttributeNamespaceCompartmentDetails is required"); + + return clientCall(request, ChangeSecurityAttributeNamespaceCompartmentResponse::builder) + .logger(LOG, "changeSecurityAttributeNamespaceCompartment") + .serviceDetails( + "SecurityAttribute", "ChangeSecurityAttributeNamespaceCompartment", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(ChangeSecurityAttributeNamespaceCompartmentRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("actions") + .appendPathParam("changeCompartment") + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .hasBody() + .handleResponseHeaderString( + "opc-request-id", + ChangeSecurityAttributeNamespaceCompartmentResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public CreateSecurityAttributeResponse createSecurityAttribute( + CreateSecurityAttributeRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Objects.requireNonNull( + request.getCreateSecurityAttributeDetails(), + "createSecurityAttributeDetails is required"); + + return clientCall(request, CreateSecurityAttributeResponse::builder) + .logger(LOG, "createSecurityAttribute") + .serviceDetails("SecurityAttribute", "CreateSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttribute.class, + CreateSecurityAttributeResponse.Builder::securityAttribute) + .handleResponseHeaderString( + "opc-request-id", CreateSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString("etag", CreateSecurityAttributeResponse.Builder::etag) + .callSync(); + } + + @Override + public CreateSecurityAttributeNamespaceResponse createSecurityAttributeNamespace( + CreateSecurityAttributeNamespaceRequest request) { + Objects.requireNonNull( + request.getCreateSecurityAttributeNamespaceDetails(), + "createSecurityAttributeNamespaceDetails is required"); + + return clientCall(request, CreateSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "createSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "CreateSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.class, + CreateSecurityAttributeNamespaceResponse.Builder + ::securityAttributeNamespace) + .handleResponseHeaderString( + "opc-request-id", + CreateSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "etag", CreateSecurityAttributeNamespaceResponse.Builder::etag) + .callSync(); + } + + @Override + public DeleteSecurityAttributeResponse deleteSecurityAttribute( + DeleteSecurityAttributeRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + + return clientCall(request, DeleteSecurityAttributeResponse::builder) + .logger(LOG, "deleteSecurityAttribute") + .serviceDetails("SecurityAttribute", "DeleteSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.DELETE) + .requestBuilder(DeleteSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendPathParam(request.getSecurityAttributeName()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .handleResponseHeaderString( + "opc-request-id", DeleteSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + DeleteSecurityAttributeResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public DeleteSecurityAttributeNamespaceResponse deleteSecurityAttributeNamespace( + DeleteSecurityAttributeNamespaceRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, DeleteSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "deleteSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "DeleteSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.DELETE) + .requestBuilder(DeleteSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .handleResponseHeaderString( + "opc-request-id", + DeleteSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public GetSecurityAttributeResponse getSecurityAttribute(GetSecurityAttributeRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + + return clientCall(request, GetSecurityAttributeResponse::builder) + .logger(LOG, "getSecurityAttribute") + .serviceDetails("SecurityAttribute", "GetSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendPathParam(request.getSecurityAttributeName()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttribute.class, + GetSecurityAttributeResponse.Builder::securityAttribute) + .handleResponseHeaderString( + "opc-request-id", GetSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString("etag", GetSecurityAttributeResponse.Builder::etag) + .callSync(); + } + + @Override + public GetSecurityAttributeNamespaceResponse getSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, GetSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "getSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "GetSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.class, + GetSecurityAttributeNamespaceResponse.Builder::securityAttributeNamespace) + .handleResponseHeaderString( + "opc-request-id", + GetSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "etag", GetSecurityAttributeNamespaceResponse.Builder::etag) + .callSync(); + } + + @Override + public GetSecurityAttributeWorkRequestResponse getSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + return clientCall(request, GetSecurityAttributeWorkRequestResponse::builder) + .logger(LOG, "getSecurityAttributeWorkRequest") + .serviceDetails("SecurityAttribute", "GetSecurityAttributeWorkRequest", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetSecurityAttributeWorkRequestRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest.class, + GetSecurityAttributeWorkRequestResponse.Builder + ::securityAttributeWorkRequest) + .handleResponseHeaderString( + "opc-request-id", + GetSecurityAttributeWorkRequestResponse.Builder::opcRequestId) + .handleResponseHeaderFloat( + "retry-after", GetSecurityAttributeWorkRequestResponse.Builder::retryAfter) + .callSync(); + } + + @Override + public ListSecurityAttributeNamespacesResponse listSecurityAttributeNamespaces( + ListSecurityAttributeNamespacesRequest request) { + + return clientCall(request, ListSecurityAttributeNamespacesResponse::builder) + .logger(LOG, "listSecurityAttributeNamespaces") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeNamespaces", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeNamespacesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendQueryParam("name", request.getName()) + .appendQueryParam("compartmentIdInSubtree", request.getCompartmentIdInSubtree()) + .appendEnumQueryParam("lifecycleState", request.getLifecycleState()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBodyList( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary + .class, + ListSecurityAttributeNamespacesResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeNamespacesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeNamespacesResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public ListSecurityAttributeWorkRequestErrorsResponse listSecurityAttributeWorkRequestErrors( + ListSecurityAttributeWorkRequestErrorsRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + return clientCall(request, ListSecurityAttributeWorkRequestErrorsResponse::builder) + .logger(LOG, "listSecurityAttributeWorkRequestErrors") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeWorkRequestErrors", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeWorkRequestErrorsRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("errors") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBodyList( + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary.class, + ListSecurityAttributeWorkRequestErrorsResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeWorkRequestErrorsResponse.Builder::opcRequestId) + .handleResponseHeaderFloat( + "retry-after", + ListSecurityAttributeWorkRequestErrorsResponse.Builder::retryAfter) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeWorkRequestErrorsResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public ListSecurityAttributeWorkRequestLogsResponse listSecurityAttributeWorkRequestLogs( + ListSecurityAttributeWorkRequestLogsRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + return clientCall(request, ListSecurityAttributeWorkRequestLogsResponse::builder) + .logger(LOG, "listSecurityAttributeWorkRequestLogs") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeWorkRequestLogs", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeWorkRequestLogsRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("logs") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBodyList( + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary.class, + ListSecurityAttributeWorkRequestLogsResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeWorkRequestLogsResponse.Builder::opcRequestId) + .handleResponseHeaderFloat( + "retry-after", + ListSecurityAttributeWorkRequestLogsResponse.Builder::retryAfter) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeWorkRequestLogsResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public ListSecurityAttributeWorkRequestsResponse listSecurityAttributeWorkRequests( + ListSecurityAttributeWorkRequestsRequest request) { + + return clientCall(request, ListSecurityAttributeWorkRequestsResponse::builder) + .logger(LOG, "listSecurityAttributeWorkRequests") + .serviceDetails("SecurityAttribute", "ListSecurityAttributeWorkRequests", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributeWorkRequestsRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeWorkRequests") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendQueryParam("resourceIdentifier", request.getResourceIdentifier()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBodyList( + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary + .class, + ListSecurityAttributeWorkRequestsResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", + ListSecurityAttributeWorkRequestsResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", + ListSecurityAttributeWorkRequestsResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public ListSecurityAttributesResponse listSecurityAttributes( + ListSecurityAttributesRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + return clientCall(request, ListSecurityAttributesResponse::builder) + .logger(LOG, "listSecurityAttributes") + .serviceDetails("SecurityAttribute", "ListSecurityAttributes", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListSecurityAttributesRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("lifecycleState", request.getLifecycleState()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBodyList( + com.oracle.bmc.securityattribute.model.SecurityAttributeSummary.class, + ListSecurityAttributesResponse.Builder::items) + .handleResponseHeaderString( + "opc-request-id", ListSecurityAttributesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", ListSecurityAttributesResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public UpdateSecurityAttributeResponse updateSecurityAttribute( + UpdateSecurityAttributeRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + + Validate.notBlank( + request.getSecurityAttributeName(), "securityAttributeName must not be blank"); + Objects.requireNonNull( + request.getUpdateSecurityAttributeDetails(), + "updateSecurityAttributeDetails is required"); + + return clientCall(request, UpdateSecurityAttributeResponse::builder) + .logger(LOG, "updateSecurityAttribute") + .serviceDetails("SecurityAttribute", "UpdateSecurityAttribute", "") + .method(com.oracle.bmc.http.client.Method.PUT) + .requestBuilder(UpdateSecurityAttributeRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .appendPathParam("securityAttributes") + .appendPathParam(request.getSecurityAttributeName()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttribute.class, + UpdateSecurityAttributeResponse.Builder::securityAttribute) + .handleResponseHeaderString( + "opc-request-id", UpdateSecurityAttributeResponse.Builder::opcRequestId) + .handleResponseHeaderString("etag", UpdateSecurityAttributeResponse.Builder::etag) + .callSync(); + } + + @Override + public UpdateSecurityAttributeNamespaceResponse updateSecurityAttributeNamespace( + UpdateSecurityAttributeNamespaceRequest request) { + + Validate.notBlank( + request.getSecurityAttributeNamespaceId(), + "securityAttributeNamespaceId must not be blank"); + Objects.requireNonNull( + request.getUpdateSecurityAttributeNamespaceDetails(), + "updateSecurityAttributeNamespaceDetails is required"); + + return clientCall(request, UpdateSecurityAttributeNamespaceResponse::builder) + .logger(LOG, "updateSecurityAttributeNamespace") + .serviceDetails("SecurityAttribute", "UpdateSecurityAttributeNamespace", "") + .method(com.oracle.bmc.http.client.Method.PUT) + .requestBuilder(UpdateSecurityAttributeNamespaceRequest::builder) + .basePath("/20240815") + .appendPathParam("securityAttributeNamespaces") + .appendPathParam(request.getSecurityAttributeNamespaceId()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .operationUsesDefaultRetries() + .hasBody() + .handleBody( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.class, + UpdateSecurityAttributeNamespaceResponse.Builder + ::securityAttributeNamespace) + .handleResponseHeaderString( + "opc-request-id", + UpdateSecurityAttributeNamespaceResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "etag", UpdateSecurityAttributeNamespaceResponse.Builder::etag) + .callSync(); + } + + @Override + public SecurityAttributeWaiters getWaiters() { + return waiters; + } + + @Override + public SecurityAttributePaginators getPaginators() { + return paginators; + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(builder(), authenticationDetailsProvider, null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(builder().configuration(configuration), authenticationDetailsProvider, null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + builder().configuration(configuration).clientConfigurator(clientConfigurator), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @param signingStrategyRequestSignerFactories {@link + * Builder#signingStrategyRequestSignerFactories} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint) + .signingStrategyRequestSignerFactories( + signingStrategyRequestSignerFactories), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @param signingStrategyRequestSignerFactories {@link + * Builder#signingStrategyRequestSignerFactories} + * @param executorService {@link Builder#executorService} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public SecurityAttributeClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint) + .signingStrategyRequestSignerFactories( + signingStrategyRequestSignerFactories), + authenticationDetailsProvider, + executorService); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java new file mode 100644 index 00000000000..18c73f468fb --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributePaginators.java @@ -0,0 +1,702 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of SecurityAttribute where multiple pages of data may be fetched. Two + * styles of iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to + * as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: + * listUsersResponseIterator + *
  • Iterating over the resources/records being listed. These are referred to as + * RecordIterators, and the methods are suffixed with RecordIterator. For example: + * listUsersRecordIterator + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping + * and using the page tokens. They will automatically fetch more data from the service when + * required. + * + *

As an example, if we were using the ListUsers operation in IdentityService, then the {@link + * java.lang.Iterable} returned by calling a ResponseIterator method would iterate over the + * ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have + * to deal with ListUsersResponse objects at all. In either case, pagination will be automatically + * handled so we can iterate until there are no more responses or no more resources/records + * available. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributePaginators { + private final SecurityAttribute client; + + public SecurityAttributePaginators(SecurityAttribute client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listSecurityAttributeNamespaces operation. This iterable will fetch more data from the server + * as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listSecurityAttributeNamespacesResponseIterator( + final ListSecurityAttributeNamespacesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeNamespacesRequest.Builder, + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributeNamespacesRequest.Builder get() { + return ListSecurityAttributeNamespacesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributeNamespacesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder>, + ListSecurityAttributeNamespacesRequest>() { + @Override + public ListSecurityAttributeNamespacesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>() { + @Override + public ListSecurityAttributeNamespacesResponse apply( + ListSecurityAttributeNamespacesRequest request) { + return client.listSecurityAttributeNamespaces(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} objects contained + * in responses from the listSecurityAttributeNamespaces operation. This iterable will fetch + * more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeNamespacesRecordIterator( + final ListSecurityAttributeNamespacesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeNamespacesRequest.Builder, + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributeNamespacesRequest.Builder get() { + return ListSecurityAttributeNamespacesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributeNamespacesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder>, + ListSecurityAttributeNamespacesRequest>() { + @Override + public ListSecurityAttributeNamespacesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeNamespacesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeNamespacesRequest, + ListSecurityAttributeNamespacesResponse>() { + @Override + public ListSecurityAttributeNamespacesResponse apply( + ListSecurityAttributeNamespacesRequest request) { + return client.listSecurityAttributeNamespaces(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeNamespacesResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary> + apply(ListSecurityAttributeNamespacesResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listSecurityAttributeWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestErrorsResponseIterator( + final ListSecurityAttributeWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeWorkRequestErrorsRequest.Builder, + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest.Builder get() { + return ListSecurityAttributeWorkRequestErrorsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>, + ListSecurityAttributeWorkRequestErrorsRequest>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>() { + @Override + public ListSecurityAttributeWorkRequestErrorsResponse apply( + ListSecurityAttributeWorkRequestErrorsRequest request) { + return client.listSecurityAttributeWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} objects + * contained in responses from the listSecurityAttributeWorkRequestErrors operation. This + * iterable will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestErrorsRecordIterator( + final ListSecurityAttributeWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeWorkRequestErrorsRequest.Builder, + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest.Builder get() { + return ListSecurityAttributeWorkRequestErrorsRequest.builder() + .copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder>, + ListSecurityAttributeWorkRequestErrorsRequest>() { + @Override + public ListSecurityAttributeWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsRequest, + ListSecurityAttributeWorkRequestErrorsResponse>() { + @Override + public ListSecurityAttributeWorkRequestErrorsResponse apply( + ListSecurityAttributeWorkRequestErrorsRequest request) { + return client.listSecurityAttributeWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestErrorsResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + apply(ListSecurityAttributeWorkRequestErrorsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listSecurityAttributeWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestLogsResponseIterator( + final ListSecurityAttributeWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeWorkRequestLogsRequest.Builder, + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestLogsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest.Builder get() { + return ListSecurityAttributeWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder>, + ListSecurityAttributeWorkRequestLogsRequest>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>() { + @Override + public ListSecurityAttributeWorkRequestLogsResponse apply( + ListSecurityAttributeWorkRequestLogsRequest request) { + return client.listSecurityAttributeWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} objects + * contained in responses from the listSecurityAttributeWorkRequestLogs operation. This iterable + * will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestLogsRecordIterator( + final ListSecurityAttributeWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeWorkRequestLogsRequest.Builder, + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestLogsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest.Builder get() { + return ListSecurityAttributeWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder>, + ListSecurityAttributeWorkRequestLogsRequest>() { + @Override + public ListSecurityAttributeWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsRequest, + ListSecurityAttributeWorkRequestLogsResponse>() { + @Override + public ListSecurityAttributeWorkRequestLogsResponse apply( + ListSecurityAttributeWorkRequestLogsRequest request) { + return client.listSecurityAttributeWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestLogsResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + apply(ListSecurityAttributeWorkRequestLogsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listSecurityAttributeWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestsResponseIterator( + final ListSecurityAttributeWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributeWorkRequestsRequest.Builder, + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestsRequest.Builder get() { + return ListSecurityAttributeWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder>, + ListSecurityAttributeWorkRequestsRequest>() { + @Override + public ListSecurityAttributeWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>() { + @Override + public ListSecurityAttributeWorkRequestsResponse apply( + ListSecurityAttributeWorkRequestsRequest request) { + return client.listSecurityAttributeWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} objects contained + * in responses from the listSecurityAttributeWorkRequests operation. This iterable will fetch + * more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} objects + * contained in responses received from the service. + */ + public Iterable + listSecurityAttributeWorkRequestsRecordIterator( + final ListSecurityAttributeWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributeWorkRequestsRequest.Builder, + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary>( + new java.util.function.Supplier< + ListSecurityAttributeWorkRequestsRequest.Builder>() { + @Override + public ListSecurityAttributeWorkRequestsRequest.Builder get() { + return ListSecurityAttributeWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsResponse, String>() { + @Override + public String apply(ListSecurityAttributeWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder>, + ListSecurityAttributeWorkRequestsRequest>() { + @Override + public ListSecurityAttributeWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributeWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsRequest, + ListSecurityAttributeWorkRequestsResponse>() { + @Override + public ListSecurityAttributeWorkRequestsResponse apply( + ListSecurityAttributeWorkRequestsRequest request) { + return client.listSecurityAttributeWorkRequests(request); + } + }, + new java.util.function.Function< + ListSecurityAttributeWorkRequestsResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary> + apply(ListSecurityAttributeWorkRequestsResponse response) { + return response.getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listSecurityAttributes operation. This iterable will fetch more data from the server as + * needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable listSecurityAttributesResponseIterator( + final ListSecurityAttributesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListSecurityAttributesRequest.Builder, + ListSecurityAttributesRequest, + ListSecurityAttributesResponse>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributesRequest.Builder get() { + return ListSecurityAttributesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder>, + ListSecurityAttributesRequest>() { + @Override + public ListSecurityAttributesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributesRequest, ListSecurityAttributesResponse>() { + @Override + public ListSecurityAttributesResponse apply( + ListSecurityAttributesRequest request) { + return client.listSecurityAttributes(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} objects contained in + * responses from the listSecurityAttributes operation. This iterable will fetch more data from + * the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} objects contained in + * responses received from the service. + */ + public Iterable + listSecurityAttributesRecordIterator(final ListSecurityAttributesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListSecurityAttributesRequest.Builder, + ListSecurityAttributesRequest, + ListSecurityAttributesResponse, + com.oracle.bmc.securityattribute.model.SecurityAttributeSummary>( + new java.util.function.Supplier() { + @Override + public ListSecurityAttributesRequest.Builder get() { + return ListSecurityAttributesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListSecurityAttributesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder>, + ListSecurityAttributesRequest>() { + @Override + public ListSecurityAttributesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListSecurityAttributesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListSecurityAttributesRequest, ListSecurityAttributesResponse>() { + @Override + public ListSecurityAttributesResponse apply( + ListSecurityAttributesRequest request) { + return client.listSecurityAttributes(request); + } + }, + new java.util.function.Function< + ListSecurityAttributesResponse, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeSummary>>() { + @Override + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeSummary> + apply(ListSecurityAttributesResponse response) { + return response.getItems(); + } + }); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java new file mode 100644 index 00000000000..151f24e1434 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/SecurityAttributeWaiters.java @@ -0,0 +1,323 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute; + +import com.oracle.bmc.securityattribute.requests.*; +import com.oracle.bmc.securityattribute.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of SecurityAttribute. + * + *

The default configuration used is defined by {@link + * com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class SecurityAttributeWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final SecurityAttribute client; + + public SecurityAttributeWaiters( + java.util.concurrent.ExecutorService executorService, SecurityAttribute client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the + * waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSecurityAttribute( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSecurityAttribute( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource + * reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + GetSecurityAttributeRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forSecurityAttribute( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SecurityAttribute. + private com.oracle.bmc.waiter.Waiter + forSecurityAttribute( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSecurityAttributeRequest request, + final com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState... + targetStates) { + final java.util.Set + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSecurityAttributeRequest, GetSecurityAttributeResponse>() { + @Override + public GetSecurityAttributeResponse apply( + GetSecurityAttributeRequest request) { + return client.getSecurityAttribute(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSecurityAttributeResponse response) { + return targetStatesSet.contains( + response.getSecurityAttribute().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.securityattribute.model.SecurityAttribute + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the + * waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + ... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forSecurityAttributeNamespace( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forSecurityAttributeNamespace( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource + * reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + GetSecurityAttributeNamespaceRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + ... + targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forSecurityAttributeNamespace( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for SecurityAttributeNamespace. + private com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeNamespaceRequest, GetSecurityAttributeNamespaceResponse> + forSecurityAttributeNamespace( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSecurityAttributeNamespaceRequest request, + final com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState + ... + targetStates) { + final java.util.Set< + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState> + targetStatesSet = new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSecurityAttributeNamespaceRequest, + GetSecurityAttributeNamespaceResponse>() { + @Override + public GetSecurityAttributeNamespaceResponse apply( + GetSecurityAttributeNamespaceRequest request) { + return client.getSecurityAttributeNamespace(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetSecurityAttributeNamespaceResponse response) { + return targetStatesSet.contains( + response.getSecurityAttributeNamespace() + .getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + .LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using default configuration. + * + * @param request the request to send + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeWorkRequestRequest, GetSecurityAttributeWorkRequestResponse> + forSecurityAttributeWorkRequest(GetSecurityAttributeWorkRequestRequest request) { + return forSecurityAttributeWorkRequest( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@linkcom.oracle.bmc.waiter. DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeWorkRequestRequest, GetSecurityAttributeWorkRequestResponse> + forSecurityAttributeWorkRequest( + GetSecurityAttributeWorkRequestRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + return forSecurityAttributeWorkRequest( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request); + } + + // Helper method to create a new Waiter for SecurityAttributeWorkRequest. + private com.oracle.bmc.waiter.Waiter< + GetSecurityAttributeWorkRequestRequest, GetSecurityAttributeWorkRequestResponse> + forSecurityAttributeWorkRequest( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetSecurityAttributeWorkRequestRequest request) { + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetSecurityAttributeWorkRequestRequest, + GetSecurityAttributeWorkRequestResponse>() { + @Override + public GetSecurityAttributeWorkRequestResponse apply( + GetSecurityAttributeWorkRequestRequest request) { + return client.getSecurityAttributeWorkRequest(request); + } + }, + new java.util.function.Predicate< + GetSecurityAttributeWorkRequestResponse>() { + @Override + public boolean test(GetSecurityAttributeWorkRequestResponse response) { + // work requests are complete once the time finished is available + return response.getSecurityAttributeWorkRequest().getTimeFinished() + != null; + } + }, + false), + request); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java new file mode 100644 index 00000000000..659e672971f --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BaseSecurityAttributeValidator.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Validates a security attribute value. Each validator performs validation steps in addition to the + * standard validation for security attribute values. For more information, see [Limits on Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/overview.htm). + * + *

If you define a validator after a value has been set for a security attribute, then any + * updates that attempt to change the value must pass the additional validation defined by the + * current rule. Previously set values (even those that would fail the current validation) are not + * updated. You can still update other attributes to resources that contain a non-valid security + * attribute. + * + *

To clear the validator call UpdateSecurityAttribute with + * [DefaultSecuirtyAttributeValidator](https://docs.cloud.oracle.com/api/#/en/securityattribute/latest/datatypes/DefaultTagDefinitionValidator). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "validatorType", + defaultImpl = BaseSecurityAttributeValidator.class) +@com.fasterxml.jackson.annotation.JsonSubTypes({ + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = EnumSecurityAttributeValidator.class, + name = "ENUM"), + @com.fasterxml.jackson.annotation.JsonSubTypes.Type( + value = DefaultSecurityAttributeValidator.class, + name = "DEFAULT") +}) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public class BaseSecurityAttributeValidator + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({}) + protected BaseSecurityAttributeValidator() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BaseSecurityAttributeValidator("); + sb.append("super=").append(super.toString()); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BaseSecurityAttributeValidator)) { + return false; + } + + BaseSecurityAttributeValidator other = (BaseSecurityAttributeValidator) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + super.hashCode(); + return result; + } + + /** Specifies the type of validation: a static value (no validation) or a list. */ + public enum ValidatorType implements com.oracle.bmc.http.internal.BmcEnum { + Enum("ENUM"), + Default("DEFAULT"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ValidatorType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ValidatorType v : ValidatorType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ValidatorType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ValidatorType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ValidatorType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java new file mode 100644 index 00000000000..b9ab687769c --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkDeleteSecurityAttributesDetails.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Properties for deleting security attributes in bulk.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkDeleteSecurityAttributesDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class BulkDeleteSecurityAttributesDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"securityAttributeIds"}) + public BulkDeleteSecurityAttributesDetails(java.util.List securityAttributeIds) { + super(); + this.securityAttributeIds = securityAttributeIds; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCIDs of the security attributes to delete. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeIds") + private java.util.List securityAttributeIds; + + /** + * The OCIDs of the security attributes to delete. + * + * @param securityAttributeIds the value to set + * @return this builder + */ + public Builder securityAttributeIds(java.util.List securityAttributeIds) { + this.securityAttributeIds = securityAttributeIds; + this.__explicitlySet__.add("securityAttributeIds"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkDeleteSecurityAttributesDetails build() { + BulkDeleteSecurityAttributesDetails model = + new BulkDeleteSecurityAttributesDetails(this.securityAttributeIds); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkDeleteSecurityAttributesDetails model) { + if (model.wasPropertyExplicitlySet("securityAttributeIds")) { + this.securityAttributeIds(model.getSecurityAttributeIds()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCIDs of the security attributes to delete. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeIds") + private final java.util.List securityAttributeIds; + + /** + * The OCIDs of the security attributes to delete. + * + * @return the value + */ + public java.util.List getSecurityAttributeIds() { + return securityAttributeIds; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkDeleteSecurityAttributesDetails("); + sb.append("super=").append(super.toString()); + sb.append("securityAttributeIds=").append(String.valueOf(this.securityAttributeIds)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSecurityAttributesDetails)) { + return false; + } + + BulkDeleteSecurityAttributesDetails other = (BulkDeleteSecurityAttributesDetails) o; + return java.util.Objects.equals(this.securityAttributeIds, other.securityAttributeIds) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.securityAttributeIds == null + ? 43 + : this.securityAttributeIds.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java new file mode 100644 index 00000000000..be17a5480e7 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditResource.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = BulkEditResource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class BulkEditResource + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"id", "resourceType", "metadata"}) + public BulkEditResource( + String id, String resourceType, java.util.Map metadata) { + super(); + this.id = id; + this.resourceType = resourceType; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The unique OCID of the resource. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The unique OCID of the resource. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The type of resource. See {@link + * #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) + * listBulkEditTagsResourceTypes}. + */ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private String resourceType; + + /** + * The type of resource. See {@link + * #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) + * listBulkEditTagsResourceTypes}. + * + * @param resourceType the value to set + * @return this builder + */ + public Builder resourceType(String resourceType) { + this.resourceType = resourceType; + this.__explicitlySet__.add("resourceType"); + return this; + } + /** + * Additional information that identifies the resource for bulk editing of tags. This + * information is provided in the resource's API documentation. + */ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that identifies the resource for bulk editing of tags. This + * information is provided in the resource's API documentation. + * + * @param metadata the value to set + * @return this builder + */ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkEditResource build() { + BulkEditResource model = + new BulkEditResource(this.id, this.resourceType, this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkEditResource model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("resourceType")) { + this.resourceType(model.getResourceType()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The unique OCID of the resource. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The unique OCID of the resource. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The type of resource. See {@link + * #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) + * listBulkEditTagsResourceTypes}. + */ + @com.fasterxml.jackson.annotation.JsonProperty("resourceType") + private final String resourceType; + + /** + * The type of resource. See {@link + * #listBulkEditTagsResourceTypes(ListBulkEditTagsResourceTypesRequest) + * listBulkEditTagsResourceTypes}. + * + * @return the value + */ + public String getResourceType() { + return resourceType; + } + + /** + * Additional information that identifies the resource for bulk editing of tags. This + * information is provided in the resource's API documentation. + */ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that identifies the resource for bulk editing of tags. This + * information is provided in the resource's API documentation. + * + * @return the value + */ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkEditResource("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", resourceType=").append(String.valueOf(this.resourceType)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditResource)) { + return false; + } + + BulkEditResource other = (BulkEditResource) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.resourceType, other.resourceType) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.resourceType == null ? 43 : this.resourceType.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java new file mode 100644 index 00000000000..21d840339a8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeDetails.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkEditSecurityAttributeDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class BulkEditSecurityAttributeDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "resources", "bulkEditOperations"}) + public BulkEditSecurityAttributeDetails( + String compartmentId, + java.util.List resources, + java.util.List bulkEditOperations) { + super(); + this.compartmentId = compartmentId; + this.resources = resources; + this.bulkEditOperations = bulkEditOperations; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the compartment where the bulk edit request is submitted. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment where the bulk edit request is submitted. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The resources to be updated. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources to be updated. + * + * @param resources the value to set + * @return this builder + */ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** The operations associated with the request to bulk edit tags. */ + @com.fasterxml.jackson.annotation.JsonProperty("bulkEditOperations") + private java.util.List bulkEditOperations; + + /** + * The operations associated with the request to bulk edit tags. + * + * @param bulkEditOperations the value to set + * @return this builder + */ + public Builder bulkEditOperations( + java.util.List bulkEditOperations) { + this.bulkEditOperations = bulkEditOperations; + this.__explicitlySet__.add("bulkEditOperations"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkEditSecurityAttributeDetails build() { + BulkEditSecurityAttributeDetails model = + new BulkEditSecurityAttributeDetails( + this.compartmentId, this.resources, this.bulkEditOperations); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkEditSecurityAttributeDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("bulkEditOperations")) { + this.bulkEditOperations(model.getBulkEditOperations()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the compartment where the bulk edit request is submitted. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment where the bulk edit request is submitted. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The resources to be updated. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources to be updated. + * + * @return the value + */ + public java.util.List getResources() { + return resources; + } + + /** The operations associated with the request to bulk edit tags. */ + @com.fasterxml.jackson.annotation.JsonProperty("bulkEditOperations") + private final java.util.List bulkEditOperations; + + /** + * The operations associated with the request to bulk edit tags. + * + * @return the value + */ + public java.util.List getBulkEditOperations() { + return bulkEditOperations; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkEditSecurityAttributeDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", bulkEditOperations=").append(String.valueOf(this.bulkEditOperations)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributeDetails)) { + return false; + } + + BulkEditSecurityAttributeDetails other = (BulkEditSecurityAttributeDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.bulkEditOperations, other.bulkEditOperations) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.bulkEditOperations == null + ? 43 + : this.bulkEditOperations.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java new file mode 100644 index 00000000000..fcc0aaca4b3 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/BulkEditSecurityAttributeOperationDetails.java @@ -0,0 +1,273 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = BulkEditSecurityAttributeOperationDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class BulkEditSecurityAttributeOperationDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"operationType", "securityAttributes"}) + public BulkEditSecurityAttributeOperationDetails( + OperationType operationType, + java.util.Map> securityAttributes) { + super(); + this.operationType = operationType; + this.securityAttributes = securityAttributes; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * An enum-like description of the type of operation. + * + *

{@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist + * on the resource. * {@code SET_WHERE_PRESENT} updates the value for a security attribute + * only if it is present on the resource. * {@code ADD_OR_SET} combines the first two + * operations to add a security attribute if it does not already exist on the resource or + * update the value if it is present on the resource. * {@code REMOVE} removes the security + * attribute from the resource. It's removed from the resource regardless of the value. + */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * An enum-like description of the type of operation. + * + *

{@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist + * on the resource. * {@code SET_WHERE_PRESENT} updates the value for a security attribute + * only if it is present on the resource. * {@code ADD_OR_SET} combines the first two + * operations to add a security attribute if it does not already exist on the resource or + * update the value if it is present on the resource. * {@code REMOVE} removes the security + * attribute from the resource. It's removed from the resource regardless of the value. + * + * @param operationType the value to set + * @return this builder + */ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private java.util.Map> securityAttributes; + + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. + * For more information, see [Resource + * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @param securityAttributes the value to set + * @return this builder + */ + public Builder securityAttributes( + java.util.Map> securityAttributes) { + this.securityAttributes = securityAttributes; + this.__explicitlySet__.add("securityAttributes"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public BulkEditSecurityAttributeOperationDetails build() { + BulkEditSecurityAttributeOperationDetails model = + new BulkEditSecurityAttributeOperationDetails( + this.operationType, this.securityAttributes); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(BulkEditSecurityAttributeOperationDetails model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("securityAttributes")) { + this.securityAttributes(model.getSecurityAttributes()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * An enum-like description of the type of operation. + * + *

{@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on + * the resource. * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if + * it is present on the resource. * {@code ADD_OR_SET} combines the first two operations to add + * a security attribute if it does not already exist on the resource or update the value if it + * is present on the resource. * {@code REMOVE} removes the security attribute from the + * resource. It's removed from the resource regardless of the value. + */ + public enum OperationType implements com.oracle.bmc.http.internal.BmcEnum { + AddWhereAbsent("ADD_WHERE_ABSENT"), + SetWherePresent("SET_WHERE_PRESENT"), + AddOrSet("ADD_OR_SET"), + Remove("REMOVE"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + map.put(v.getValue(), v); + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid OperationType: " + key); + } + }; + /** + * An enum-like description of the type of operation. + * + *

{@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on + * the resource. * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if + * it is present on the resource. * {@code ADD_OR_SET} combines the first two operations to add + * a security attribute if it does not already exist on the resource or update the value if it + * is present on the resource. * {@code REMOVE} removes the security attribute from the + * resource. It's removed from the resource regardless of the value. + */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * An enum-like description of the type of operation. + * + *

{@code ADD_WHERE_ABSENT} adds a security attribute only if it does not already exist on + * the resource. * {@code SET_WHERE_PRESENT} updates the value for a security attribute only if + * it is present on the resource. * {@code ADD_OR_SET} combines the first two operations to add + * a security attribute if it does not already exist on the resource or update the value if it + * is present on the resource. * {@code REMOVE} removes the security attribute from the + * resource. It's removed from the resource regardless of the value. + * + * @return the value + */ + public OperationType getOperationType() { + return operationType; + } + + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributes") + private final java.util.Map> securityAttributes; + + /** + * Security attributes for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm). Example: + * {@code {"oracle-zpr": {"td": {"value": "42", "mode": "audit"}}}} + * + * @return the value + */ + public java.util.Map> getSecurityAttributes() { + return securityAttributes; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("BulkEditSecurityAttributeOperationDetails("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", securityAttributes=").append(String.valueOf(this.securityAttributes)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributeOperationDetails)) { + return false; + } + + BulkEditSecurityAttributeOperationDetails other = + (BulkEditSecurityAttributeOperationDetails) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.securityAttributes, other.securityAttributes) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.securityAttributes == null + ? 43 + : this.securityAttributes.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java new file mode 100644 index 00000000000..67f0abb7fe3 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/ChangeSecurityAttributeNamespaceCompartmentDetails.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the compartment the resource is being moved to.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ChangeSecurityAttributeNamespaceCompartmentDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class ChangeSecurityAttributeNamespaceCompartmentDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId"}) + public ChangeSecurityAttributeNamespaceCompartmentDetails(String compartmentId) { + super(); + this.compartmentId = compartmentId; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The Oracle Cloud ID (OCID) of the destination compartment. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The Oracle Cloud ID (OCID) of the destination compartment. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ChangeSecurityAttributeNamespaceCompartmentDetails build() { + ChangeSecurityAttributeNamespaceCompartmentDetails model = + new ChangeSecurityAttributeNamespaceCompartmentDetails(this.compartmentId); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ChangeSecurityAttributeNamespaceCompartmentDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The Oracle Cloud ID (OCID) of the destination compartment. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The Oracle Cloud ID (OCID) of the destination compartment. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ChangeSecurityAttributeNamespaceCompartmentDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSecurityAttributeNamespaceCompartmentDetails)) { + return false; + } + + ChangeSecurityAttributeNamespaceCompartmentDetails other = + (ChangeSecurityAttributeNamespaceCompartmentDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java new file mode 100644 index 00000000000..031bfbd1f76 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeDetails.java @@ -0,0 +1,202 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute to be created for a specific security attribute namespace.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSecurityAttributeDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class CreateSecurityAttributeDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"name", "description", "validator"}) + public CreateSecurityAttributeDetails( + String name, String description, BaseSecurityAttributeValidator validator) { + super(); + this.name = name; + this.description = description; + this.validator = validator; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The name you assign to the security attribute during creation. This is the security + * attribute key. The name must be unique within the namespace and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the security attribute during creation. This is the security + * attribute key. The name must be unique within the namespace and cannot be changed. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** The description you assign to the security attribute during creation. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute during creation. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private BaseSecurityAttributeValidator validator; + + public Builder validator(BaseSecurityAttributeValidator validator) { + this.validator = validator; + this.__explicitlySet__.add("validator"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSecurityAttributeDetails build() { + CreateSecurityAttributeDetails model = + new CreateSecurityAttributeDetails(this.name, this.description, this.validator); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSecurityAttributeDetails model) { + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("validator")) { + this.validator(model.getValidator()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The name you assign to the security attribute during creation. This is the security attribute + * key. The name must be unique within the namespace and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the security attribute during creation. This is the security attribute + * key. The name must be unique within the namespace and cannot be changed. + * + * @return the value + */ + public String getName() { + return name; + } + + /** The description you assign to the security attribute during creation. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute during creation. + * + * @return the value + */ + public String getDescription() { + return description; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private final BaseSecurityAttributeValidator validator; + + public BaseSecurityAttributeValidator getValidator() { + return validator; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSecurityAttributeDetails("); + sb.append("super=").append(super.toString()); + sb.append("name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", validator=").append(String.valueOf(this.validator)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeDetails)) { + return false; + } + + CreateSecurityAttributeDetails other = (CreateSecurityAttributeDetails) o; + return java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.validator, other.validator) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.validator == null ? 43 : this.validator.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java new file mode 100644 index 00000000000..b9c7f32d740 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/CreateSecurityAttributeNamespaceDetails.java @@ -0,0 +1,342 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute namespace to be created for a specific compartment.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateSecurityAttributeNamespaceDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class CreateSecurityAttributeNamespaceDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "name", + "description", + "freeformTags", + "definedTags" + }) + public CreateSecurityAttributeNamespaceDetails( + String compartmentId, + String name, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the tenancy containing the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the tenancy containing the security attribute namespace. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name you assign to the security attribute namespace during creation. The name must be + * unique across all namespaces in the tenancy and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the security attribute namespace during creation. The name must be + * unique across all namespaces in the tenancy and cannot be changed. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** The description you assign to the security attribute namespace during creation. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute namespace during creation. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateSecurityAttributeNamespaceDetails build() { + CreateSecurityAttributeNamespaceDetails model = + new CreateSecurityAttributeNamespaceDetails( + this.compartmentId, + this.name, + this.description, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateSecurityAttributeNamespaceDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the tenancy containing the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the tenancy containing the security attribute namespace. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name you assign to the security attribute namespace during creation. The name must be + * unique across all namespaces in the tenancy and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the security attribute namespace during creation. The name must be + * unique across all namespaces in the tenancy and cannot be changed. + * + * @return the value + */ + public String getName() { + return name; + } + + /** The description you assign to the security attribute namespace during creation. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute namespace during creation. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateSecurityAttributeNamespaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeNamespaceDetails)) { + return false; + } + + CreateSecurityAttributeNamespaceDetails other = (CreateSecurityAttributeNamespaceDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java new file mode 100644 index 00000000000..b27d5c017c7 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/DefaultSecurityAttributeValidator.java @@ -0,0 +1,103 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Use this validator to clear any existing validator on the security attribute with the + * UpdateSecurityAttribute operation. Using this {@code validatorType} is the same as not setting + * any value on the validator field. The resultant value for {@code validatorType} returned in the + * response body is {@code null}.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = DefaultSecurityAttributeValidator.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "validatorType") +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class DefaultSecurityAttributeValidator extends BaseSecurityAttributeValidator { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public DefaultSecurityAttributeValidator build() { + DefaultSecurityAttributeValidator model = new DefaultSecurityAttributeValidator(); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(DefaultSecurityAttributeValidator model) { + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public DefaultSecurityAttributeValidator() { + super(); + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("DefaultSecurityAttributeValidator("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DefaultSecurityAttributeValidator)) { + return false; + } + + DefaultSecurityAttributeValidator other = (DefaultSecurityAttributeValidator) o; + return super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java new file mode 100644 index 00000000000..5a338eaa6dd --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/EnumSecurityAttributeValidator.java @@ -0,0 +1,138 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Used to validate the value set for a security attribute and contains the list of allowable {@code + * values}. + * + *

You must specify at least one valid value in the {@code values} array. You can't have blank or + * or empty strings ({@code ""}). Duplicate values are not allowed.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = EnumSecurityAttributeValidator.Builder.class) +@com.fasterxml.jackson.annotation.JsonTypeInfo( + use = com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME, + include = com.fasterxml.jackson.annotation.JsonTypeInfo.As.PROPERTY, + property = "validatorType") +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class EnumSecurityAttributeValidator extends BaseSecurityAttributeValidator { + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The list of allowed values for a security attribute value. */ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private java.util.List values; + + /** + * The list of allowed values for a security attribute value. + * + * @param values the value to set + * @return this builder + */ + public Builder values(java.util.List values) { + this.values = values; + this.__explicitlySet__.add("values"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public EnumSecurityAttributeValidator build() { + EnumSecurityAttributeValidator model = new EnumSecurityAttributeValidator(this.values); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(EnumSecurityAttributeValidator model) { + if (model.wasPropertyExplicitlySet("values")) { + this.values(model.getValues()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + @Deprecated + public EnumSecurityAttributeValidator(java.util.List values) { + super(); + this.values = values; + } + + /** The list of allowed values for a security attribute value. */ + @com.fasterxml.jackson.annotation.JsonProperty("values") + private final java.util.List values; + + /** + * The list of allowed values for a security attribute value. + * + * @return the value + */ + public java.util.List getValues() { + return values; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("EnumSecurityAttributeValidator("); + sb.append("super=").append(super.toString(includeByteArrayContents)); + sb.append(", values=").append(String.valueOf(this.values)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof EnumSecurityAttributeValidator)) { + return false; + } + + EnumSecurityAttributeValidator other = (EnumSecurityAttributeValidator) o; + return java.util.Objects.equals(this.values, other.values) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.values == null ? 43 : this.values.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java new file mode 100644 index 00000000000..b75931a66e8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttribute.java @@ -0,0 +1,639 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A security attribute that belongs to a specific security attribute namespace. Security attributes + * must be created in a tenancy before a user can apply them to resources. For more information, see + * [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + *

*Warning:** Oracle recommends that you avoid using any confidential information when you + * supply string values using the API.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttribute.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttribute + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "securityAttributeNamespaceId", + "securityAttributeNamespaceName", + "id", + "name", + "description", + "type", + "isRetired", + "lifecycleState", + "timeCreated", + "validator" + }) + public SecurityAttribute( + String compartmentId, + String securityAttributeNamespaceId, + String securityAttributeNamespaceName, + String id, + String name, + String description, + String type, + Boolean isRetired, + LifecycleState lifecycleState, + java.util.Date timeCreated, + BaseSecurityAttributeValidator validator) { + super(); + this.compartmentId = compartmentId; + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.isRetired = isRetired; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.validator = validator; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the compartment that contains the security attribute definition. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute definition. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The OCID of the security attribute namespace that contains the security attribute + * definition. + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace that contains the security attribute + * definition. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.__explicitlySet__.add("securityAttributeNamespaceId"); + return this; + } + /** The name of the security attribute namespace that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @param securityAttributeNamespaceName the value to set + * @return this builder + */ + public Builder securityAttributeNamespaceName(String securityAttributeNamespaceName) { + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.__explicitlySet__.add("securityAttributeNamespaceName"); + return this; + } + /** The OCID of the security attribute definition. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute definition. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name assigned to the security attribute during creation. This is the security + * attribute key. The name must be unique within the security attribute namespace and cannot + * be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name assigned to the security attribute during creation. This is the security + * attribute key. The name must be unique within the security attribute namespace and cannot + * be changed. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** The description of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the security attribute. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** The data type of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * The data type of the security attribute. + * + * @param type the value to set + * @return this builder + */ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Indicates whether the security attribute is retired. See [Managing Security Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute is retired. See [Managing Security Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @param isRetired the value to set + * @return this builder + */ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * The security attribute's current state. After creating a security attribute, make sure + * its {@code lifecycleState} is ACTIVE before using it. After retiring a security + * attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you + * delete a security attribute, you cannot delete another security attribute until the + * deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure + * its {@code lifecycleState} is ACTIVE before using it. After retiring a security + * attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you + * delete a security attribute, you cannot delete another security attribute until the + * deleted tag's {@code lifecycleState} changes from DELETING to DELETED. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private BaseSecurityAttributeValidator validator; + + public Builder validator(BaseSecurityAttributeValidator validator) { + this.validator = validator; + this.__explicitlySet__.add("validator"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttribute build() { + SecurityAttribute model = + new SecurityAttribute( + this.compartmentId, + this.securityAttributeNamespaceId, + this.securityAttributeNamespaceName, + this.id, + this.name, + this.description, + this.type, + this.isRetired, + this.lifecycleState, + this.timeCreated, + this.validator); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttribute model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceId")) { + this.securityAttributeNamespaceId(model.getSecurityAttributeNamespaceId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceName")) { + this.securityAttributeNamespaceName(model.getSecurityAttributeNamespaceName()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("validator")) { + this.validator(model.getValidator()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the compartment that contains the security attribute definition. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute definition. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The OCID of the security attribute namespace that contains the security attribute definition. + */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private final String securityAttributeNamespaceId; + + /** + * The OCID of the security attribute namespace that contains the security attribute definition. + * + * @return the value + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + + /** The name of the security attribute namespace that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private final String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @return the value + */ + public String getSecurityAttributeNamespaceName() { + return securityAttributeNamespaceName; + } + + /** The OCID of the security attribute definition. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute definition. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The name assigned to the security attribute during creation. This is the security attribute + * key. The name must be unique within the security attribute namespace and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name assigned to the security attribute during creation. This is the security attribute + * key. The name must be unique within the security attribute namespace and cannot be changed. + * + * @return the value + */ + public String getName() { + return name; + } + + /** The description of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the security attribute. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** The data type of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * The data type of the security attribute. + * + * @return the value + */ + public String getType() { + return type; + } + + /** + * Indicates whether the security attribute is retired. See [Managing Security Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute is retired. See [Managing Security Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @return the value + */ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * The security attribute's current state. After creating a security attribute, make sure its + * {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make + * sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security + * attribute, you cannot delete another security attribute until the deleted tag's {@code + * lifecycleState} changes from DELETING to DELETED. + */ + public enum LifecycleState implements com.oracle.bmc.http.internal.BmcEnum { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The security attribute's current state. After creating a security attribute, make sure its + * {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make + * sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security + * attribute, you cannot delete another security attribute until the deleted tag's {@code + * lifecycleState} changes from DELETING to DELETED. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure its + * {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make + * sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security + * attribute, you cannot delete another security attribute until the deleted tag's {@code + * lifecycleState} changes from DELETING to DELETED. + * + * @return the value + */ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private final BaseSecurityAttributeValidator validator; + + public BaseSecurityAttributeValidator getValidator() { + return validator; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttribute("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(", securityAttributeNamespaceName=") + .append(String.valueOf(this.securityAttributeNamespaceName)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", validator=").append(String.valueOf(this.validator)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttribute)) { + return false; + } + + SecurityAttribute other = (SecurityAttribute) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.securityAttributeNamespaceName, other.securityAttributeNamespaceName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.validator, other.validator) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceName == null + ? 43 + : this.securityAttributeNamespaceName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.validator == null ? 43 : this.validator.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java new file mode 100644 index 00000000000..19122ff4a2e --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespace.java @@ -0,0 +1,681 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A managed container for security attributes. A security attribute namespace is unique in a + * tenancy. For more information, see [Managing Security Attributes + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + *

*Warning:** Oracle recommends that you avoid using any confidential information when you + * supply string values using the API.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeNamespace.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeNamespace + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "name", + "description", + "freeformTags", + "definedTags", + "systemTags", + "isRetired", + "mode", + "lifecycleState", + "timeCreated" + }) + public SecurityAttributeNamespace( + String id, + String compartmentId, + String name, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Boolean isRetired, + java.util.List mode, + LifecycleState lifecycleState, + java.util.Date timeCreated) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.isRetired = isRetired; + this.mode = mode; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute namespace. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** The OCID of the compartment that contains the namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the namespace. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and + * cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and + * cannot be changed. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** The description you assign to the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute namespace. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + */ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @param isRetired the value to set + * @return this builder + */ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * Indicates possible modes the security attributes in this namespace can be set to. This is + * not accepted from the user. Currently the supported values are enforce and audit. + */ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private java.util.List mode; + + /** + * Indicates possible modes the security attributes in this namespace can be set to. This is + * not accepted from the user. Currently the supported values are enforce and audit. + * + * @param mode the value to set + * @return this builder + */ + public Builder mode(java.util.List mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring + * a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring + * a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute namespace was created, in the format defined by + * RFC3339. Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by + * RFC3339. Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeNamespace build() { + SecurityAttributeNamespace model = + new SecurityAttributeNamespace( + this.id, + this.compartmentId, + this.name, + this.description, + this.freeformTags, + this.definedTags, + this.systemTags, + this.isRetired, + this.mode, + this.lifecycleState, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeNamespace model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute namespace. + * + * @return the value + */ + public String getId() { + return id; + } + + /** The OCID of the compartment that contains the namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the namespace. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and cannot + * be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the namespace. It must be unique across all namespaces in the tenancy and cannot + * be changed. + * + * @return the value + */ + public String getName() { + return name; + } + + /** The description you assign to the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute namespace. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + */ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @return the value + */ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * Indicates possible modes the security attributes in this namespace can be set to. This is not + * accepted from the user. Currently the supported values are enforce and audit. + */ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final java.util.List mode; + + /** + * Indicates possible modes the security attributes in this namespace can be set to. This is not + * accepted from the user. Currently the supported values are enforce and audit. + * + * @return the value + */ + public java.util.List getMode() { + return mode; + } + + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a + * security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + */ + public enum LifecycleState implements com.oracle.bmc.http.internal.BmcEnum { + Active("ACTIVE"), + Inactive("INACTIVE"), + Deleting("DELETING"), + Deleted("DELETED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a + * security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a + * security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * + * @return the value + */ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeNamespace("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeNamespace)) { + return false; + } + + SecurityAttributeNamespace other = (SecurityAttributeNamespace) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java new file mode 100644 index 00000000000..1a7dd5001fc --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeNamespaceSummary.java @@ -0,0 +1,614 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A container for security attributes.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeNamespaceSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeNamespaceSummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "name", + "description", + "freeformTags", + "definedTags", + "systemTags", + "isRetired", + "mode", + "lifecycleState", + "timeCreated" + }) + public SecurityAttributeNamespaceSummary( + String id, + String compartmentId, + String name, + String description, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + Boolean isRetired, + java.util.List mode, + SecurityAttributeNamespace.LifecycleState lifecycleState, + java.util.Date timeCreated) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.name = name; + this.description = description; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.isRetired = isRetired; + this.mode = mode; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute namespace. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** The OCID of the compartment that contains the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute namespace. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The name of the security attribute namespace. It must be unique across all security + * attribute namespaces in the tenancy and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name of the security attribute namespace. It must be unique across all security + * attribute namespaces in the tenancy and cannot be changed. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * A description you create for the security attribute namespace to help you identify it. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * A description you create for the security attribute namespace to help you identify it. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + */ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** Indicates whether the security attribute namespace is retired. */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * + * @param isRetired the value to set + * @return this builder + */ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * Indicates possible modes the security attributes in the namespace can be set to. This is + * not accepted from the user. Currently the supported values are enforce and audit. + */ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private java.util.List mode; + + /** + * Indicates possible modes the security attributes in the namespace can be set to. This is + * not accepted from the user. Currently the supported values are enforce and audit. + * + * @param mode the value to set + * @return this builder + */ + public Builder mode(java.util.List mode) { + this.mode = mode; + this.__explicitlySet__.add("mode"); + return this; + } + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring + * a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SecurityAttributeNamespace.LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring + * a security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(SecurityAttributeNamespace.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute namespace was created, in the format defined by + * RFC3339. Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by + * RFC3339. Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeNamespaceSummary build() { + SecurityAttributeNamespaceSummary model = + new SecurityAttributeNamespaceSummary( + this.id, + this.compartmentId, + this.name, + this.description, + this.freeformTags, + this.definedTags, + this.systemTags, + this.isRetired, + this.mode, + this.lifecycleState, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeNamespaceSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("mode")) { + this.mode(model.getMode()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute namespace. + * + * @return the value + */ + public String getId() { + return id; + } + + /** The OCID of the compartment that contains the security attribute namespace. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute namespace. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The name of the security attribute namespace. It must be unique across all security attribute + * namespaces in the tenancy and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name of the security attribute namespace. It must be unique across all security attribute + * namespaces in the tenancy and cannot be changed. + * + * @return the value + */ + public String getName() { + return name; + } + + /** A description you create for the security attribute namespace to help you identify it. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * A description you create for the security attribute namespace to help you identify it. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + */ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** Indicates whether the security attribute namespace is retired. */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. + * + * @return the value + */ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * Indicates possible modes the security attributes in the namespace can be set to. This is not + * accepted from the user. Currently the supported values are enforce and audit. + */ + @com.fasterxml.jackson.annotation.JsonProperty("mode") + private final java.util.List mode; + + /** + * Indicates possible modes the security attributes in the namespace can be set to. This is not + * accepted from the user. Currently the supported values are enforce and audit. + * + * @return the value + */ + public java.util.List getMode() { + return mode; + } + + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a + * security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SecurityAttributeNamespace.LifecycleState lifecycleState; + + /** + * The security attribute namespace's current state. After creating a security attribute + * namespace, make sure its {@code lifecycleState} is ACTIVE before using it. After retiring a + * security attribute namespace, make sure its {@code lifecycleState} is INACTIVE. + * + * @return the value + */ + public SecurityAttributeNamespace.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute namespace was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeNamespaceSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", mode=").append(String.valueOf(this.mode)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeNamespaceSummary)) { + return false; + } + + SecurityAttributeNamespaceSummary other = (SecurityAttributeNamespaceSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.mode, other.mode) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.mode == null ? 43 : this.mode.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java new file mode 100644 index 00000000000..a4aeedd7f8f --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeSummary.java @@ -0,0 +1,543 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * A security attribute definition that belongs to a specific security attribute namespace.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeSummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "securityAttributeNamespaceId", + "securityAttributeNamespaceName", + "id", + "name", + "description", + "type", + "isRetired", + "lifecycleState", + "timeCreated" + }) + public SecurityAttributeSummary( + String compartmentId, + String securityAttributeNamespaceId, + String securityAttributeNamespaceName, + String id, + String name, + String description, + String type, + Boolean isRetired, + SecurityAttribute.LifecycleState lifecycleState, + java.util.Date timeCreated) { + super(); + this.compartmentId = compartmentId; + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.id = id; + this.name = name; + this.description = description; + this.type = type; + this.isRetired = isRetired; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the compartment that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The OCID of the namespace that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private String securityAttributeNamespaceId; + + /** + * The OCID of the namespace that contains the security attribute. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + this.__explicitlySet__.add("securityAttributeNamespaceId"); + return this; + } + /** The name of the security attribute namespace that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @param securityAttributeNamespaceName the value to set + * @return this builder + */ + public Builder securityAttributeNamespaceName(String securityAttributeNamespaceName) { + this.securityAttributeNamespaceName = securityAttributeNamespaceName; + this.__explicitlySet__.add("securityAttributeNamespaceName"); + return this; + } + /** The OCID of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the security attribute. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name assigned to the security attribute during creation. This is the security + * attribute. The name must be unique within the security attribute namespace and cannot be + * changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name assigned to the security attribute during creation. This is the security + * attribute. The name must be unique within the security attribute namespace and cannot be + * changed. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** The description you assign to the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** The data type of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private String type; + + /** + * The data type of the security attribute. + * + * @param type the value to set + * @return this builder + */ + public Builder type(String type) { + this.type = type; + this.__explicitlySet__.add("type"); + return this; + } + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @param isRetired the value to set + * @return this builder + */ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * The security attribute's current state. After creating a security attribute, make sure + * its {@code lifecycleState} is ACTIVE before using it. After retiring a security + * attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you + * delete a security attribute, you cannot delete another security attribute until the + * deleted security attribute's {@code lifecycleState} changes from DELETING to DELETED. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private SecurityAttribute.LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure + * its {@code lifecycleState} is ACTIVE before using it. After retiring a security + * attribute, make sure its {@code lifecycleState} is INACTIVE before using it. If you + * delete a security attribute, you cannot delete another security attribute until the + * deleted security attribute's {@code lifecycleState} changes from DELETING to DELETED. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(SecurityAttribute.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. + * Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeSummary build() { + SecurityAttributeSummary model = + new SecurityAttributeSummary( + this.compartmentId, + this.securityAttributeNamespaceId, + this.securityAttributeNamespaceName, + this.id, + this.name, + this.description, + this.type, + this.isRetired, + this.lifecycleState, + this.timeCreated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeSummary model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceId")) { + this.securityAttributeNamespaceId(model.getSecurityAttributeNamespaceId()); + } + if (model.wasPropertyExplicitlySet("securityAttributeNamespaceName")) { + this.securityAttributeNamespaceName(model.getSecurityAttributeNamespaceName()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("type")) { + this.type(model.getType()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the compartment that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the security attribute. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The OCID of the namespace that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceId") + private final String securityAttributeNamespaceId; + + /** + * The OCID of the namespace that contains the security attribute. + * + * @return the value + */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + + /** The name of the security attribute namespace that contains the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("securityAttributeNamespaceName") + private final String securityAttributeNamespaceName; + + /** + * The name of the security attribute namespace that contains the security attribute. + * + * @return the value + */ + public String getSecurityAttributeNamespaceName() { + return securityAttributeNamespaceName; + } + + /** The OCID of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the security attribute. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The name assigned to the security attribute during creation. This is the security attribute. + * The name must be unique within the security attribute namespace and cannot be changed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name assigned to the security attribute during creation. This is the security attribute. + * The name must be unique within the security attribute namespace and cannot be changed. + * + * @return the value + */ + public String getName() { + return name; + } + + /** The description you assign to the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** The data type of the security attribute. */ + @com.fasterxml.jackson.annotation.JsonProperty("type") + private final String type; + + /** + * The data type of the security attribute. + * + * @return the value + */ + public String getType() { + return type; + } + + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @return the value + */ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * The security attribute's current state. After creating a security attribute, make sure its + * {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make + * sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security + * attribute, you cannot delete another security attribute until the deleted security + * attribute's {@code lifecycleState} changes from DELETING to DELETED. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final SecurityAttribute.LifecycleState lifecycleState; + + /** + * The security attribute's current state. After creating a security attribute, make sure its + * {@code lifecycleState} is ACTIVE before using it. After retiring a security attribute, make + * sure its {@code lifecycleState} is INACTIVE before using it. If you delete a security + * attribute, you cannot delete another security attribute until the deleted security + * attribute's {@code lifecycleState} changes from DELETING to DELETED. + * + * @return the value + */ + public SecurityAttribute.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. Example: + * {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * Date and time the security attribute was created, in the format defined by RFC3339. Example: + * {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeSummary("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(", securityAttributeNamespaceName=") + .append(String.valueOf(this.securityAttributeNamespaceName)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", type=").append(String.valueOf(this.type)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeSummary)) { + return false; + } + + SecurityAttributeSummary other = (SecurityAttributeSummary) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.securityAttributeNamespaceName, other.securityAttributeNamespaceName) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.type, other.type) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespaceName == null + ? 43 + : this.securityAttributeNamespaceName.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.type == null ? 43 : this.type.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java new file mode 100644 index 00000000000..8cde719ff7a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequest.java @@ -0,0 +1,475 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The asynchronous API request does not take effect immediately. This request spawns an + * asynchronous workflow to fulfill the request. WorkRequest objects provide visibility for + * in-progress workflows.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeWorkRequest + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "operationType", + "compartmentId", + "status", + "resources", + "timeAccepted", + "timeStarted", + "timeFinished", + "percentComplete" + }) + public SecurityAttributeWorkRequest( + String id, + WorkRequestOperationType operationType, + String compartmentId, + WorkRequestStatus status, + java.util.List resources, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + Float percentComplete) { + super(); + this.id = id; + this.operationType = operationType; + this.compartmentId = compartmentId; + this.status = status; + this.resources = resources; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.percentComplete = percentComplete; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the work request. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** An enum-like description of the type of work the work request is doing. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * + * @param operationType the value to set + * @return this builder + */ + public Builder operationType(WorkRequestOperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** The OCID of the compartment that contains the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The current status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The current status of the work request. + * + * @param status the value to set + * @return this builder + */ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** The resources this work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources this work request affects. + * + * @param resources the value to set + * @return this builder + */ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timeAccepted the value to set + * @return this builder + */ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timeStarted the value to set + * @return this builder + */ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timeFinished the value to set + * @return this builder + */ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** How much progress the operation has made. */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * How much progress the operation has made. + * + * @param percentComplete the value to set + * @return this builder + */ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequest build() { + SecurityAttributeWorkRequest model = + new SecurityAttributeWorkRequest( + this.id, + this.operationType, + this.compartmentId, + this.status, + this.resources, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.percentComplete); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequest model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the work request. + * + * @return the value + */ + public String getId() { + return id; + } + + /** An enum-like description of the type of work the work request is doing. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * + * @return the value + */ + public WorkRequestOperationType getOperationType() { + return operationType; + } + + /** The OCID of the compartment that contains the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The current status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The current status of the work request. + * + * @return the value + */ + public WorkRequestStatus getStatus() { + return status; + } + + /** The resources this work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources this work request affects. + * + * @return the value + */ + public java.util.List getResources() { + return resources; + } + + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** How much progress the operation has made. */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * How much progress the operation has made. + * + * @return the value + */ + public Float getPercentComplete() { + return percentComplete; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", operationType=").append(String.valueOf(this.operationType)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequest)) { + return false; + } + + SecurityAttributeWorkRequest other = (SecurityAttributeWorkRequest) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java new file mode 100644 index 00000000000..ef4d08ec1ef --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestErrorSummary.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The error entity.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequestErrorSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeWorkRequestErrorSummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public SecurityAttributeWorkRequestErrorSummary( + String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** A machine-usable code for the error that occured. */ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occured. + * + * @param code the value to set + * @return this builder + */ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** A human-readable error string. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error string. + * + * @param message the value to set + * @return this builder + */ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * Date and time the error happened, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * Date and time the error happened, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timestamp the value to set + * @return this builder + */ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequestErrorSummary build() { + SecurityAttributeWorkRequestErrorSummary model = + new SecurityAttributeWorkRequestErrorSummary( + this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequestErrorSummary model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** A machine-usable code for the error that occured. */ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occured. + * + * @return the value + */ + public String getCode() { + return code; + } + + /** A human-readable error string. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error string. + * + * @return the value + */ + public String getMessage() { + return message; + } + + /** + * Date and time the error happened, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * Date and time the error happened, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequestErrorSummary("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequestErrorSummary)) { + return false; + } + + SecurityAttributeWorkRequestErrorSummary other = + (SecurityAttributeWorkRequestErrorSummary) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java new file mode 100644 index 00000000000..fde7ca29bcc --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestLogSummary.java @@ -0,0 +1,178 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The log entity.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequestLogSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeWorkRequestLogSummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public SecurityAttributeWorkRequestLogSummary(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** A human-readable error string. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error string. + * + * @param message the value to set + * @return this builder + */ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * Date and time the log was written, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * Date and time the log was written, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timestamp the value to set + * @return this builder + */ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequestLogSummary build() { + SecurityAttributeWorkRequestLogSummary model = + new SecurityAttributeWorkRequestLogSummary(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequestLogSummary model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** A human-readable error string. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error string. + * + * @return the value + */ + public String getMessage() { + return message; + } + + /** + * Date and time the log was written, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * Date and time the log was written, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequestLogSummary("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequestLogSummary)) { + return false; + } + + SecurityAttributeWorkRequestLogSummary other = (SecurityAttributeWorkRequestLogSummary) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java new file mode 100644 index 00000000000..4ee2b570ce6 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SecurityAttributeWorkRequestSummary.java @@ -0,0 +1,473 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The work request summary. Tracks the status of the asynchronous operation.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = SecurityAttributeWorkRequestSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class SecurityAttributeWorkRequestSummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "operationType", + "compartmentId", + "status", + "resources", + "timeAccepted", + "timeStarted", + "timeFinished", + "percentComplete" + }) + public SecurityAttributeWorkRequestSummary( + String id, + WorkRequestOperationType operationType, + String compartmentId, + WorkRequestStatus status, + java.util.List resources, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + Float percentComplete) { + super(); + this.id = id; + this.operationType = operationType; + this.compartmentId = compartmentId; + this.status = status; + this.resources = resources; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.percentComplete = percentComplete; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The OCID of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The OCID of the work request. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** An enum-like description of the type of work the work request is doing. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * + * @param operationType the value to set + * @return this builder + */ + public Builder operationType(WorkRequestOperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** The OCID of the compartment that contains the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The current status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The current status of the work request. + * + * @param status the value to set + * @return this builder + */ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** The resources this work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources this work request affects. + * + * @param resources the value to set + * @return this builder + */ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timeAccepted the value to set + * @return this builder + */ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timeStarted the value to set + * @return this builder + */ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @param timeFinished the value to set + * @return this builder + */ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** How much progress the operation has made. */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * How much progress the operation has made. + * + * @param percentComplete the value to set + * @return this builder + */ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public SecurityAttributeWorkRequestSummary build() { + SecurityAttributeWorkRequestSummary model = + new SecurityAttributeWorkRequestSummary( + this.id, + this.operationType, + this.compartmentId, + this.status, + this.resources, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.percentComplete); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(SecurityAttributeWorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The OCID of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The OCID of the work request. + * + * @return the value + */ + public String getId() { + return id; + } + + /** An enum-like description of the type of work the work request is doing. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final WorkRequestOperationType operationType; + + /** + * An enum-like description of the type of work the work request is doing. + * + * @return the value + */ + public WorkRequestOperationType getOperationType() { + return operationType; + } + + /** The OCID of the compartment that contains the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The OCID of the compartment that contains the work request. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The current status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The current status of the work request. + * + * @return the value + */ + public WorkRequestStatus getStatus() { + return status; + } + + /** The resources this work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources this work request affects. + * + * @return the value + */ + public java.util.List getResources() { + return resources; + } + + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * Date and time the work was accepted, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * Date and time the work started, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * Date and time the work completed, in the format defined by RFC3339. Example: {@code + * 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** How much progress the operation has made. */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * How much progress the operation has made. + * + * @return the value + */ + public Float getPercentComplete() { + return percentComplete; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("SecurityAttributeWorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", operationType=").append(String.valueOf(this.operationType)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof SecurityAttributeWorkRequestSummary)) { + return false; + } + + SecurityAttributeWorkRequestSummary other = (SecurityAttributeWorkRequestSummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java new file mode 100644 index 00000000000..27fc18a024b --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/SortOrder.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The {@code + * name} sort order is case sensitive. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public enum SortOrder implements com.oracle.bmc.http.internal.BmcEnum { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java new file mode 100644 index 00000000000..8684f7fd6e8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeDetails.java @@ -0,0 +1,203 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute to be updated for a specific security attribute namespace.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSecurityAttributeDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class UpdateSecurityAttributeDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "isRetired", "validator"}) + public UpdateSecurityAttributeDetails( + String description, Boolean isRetired, BaseSecurityAttributeValidator validator) { + super(); + this.description = description; + this.isRetired = isRetired; + this.validator = validator; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The description of the security attribute during creation. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description of the security attribute during creation. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @param isRetired the value to set + * @return this builder + */ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private BaseSecurityAttributeValidator validator; + + public Builder validator(BaseSecurityAttributeValidator validator) { + this.validator = validator; + this.__explicitlySet__.add("validator"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSecurityAttributeDetails build() { + UpdateSecurityAttributeDetails model = + new UpdateSecurityAttributeDetails( + this.description, this.isRetired, this.validator); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSecurityAttributeDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("validator")) { + this.validator(model.getValidator()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The description of the security attribute during creation. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description of the security attribute during creation. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Whether the security attribute is retired. See [Managing Security + * Attributes](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attributes.htm). + * + * @return the value + */ + public Boolean getIsRetired() { + return isRetired; + } + + @com.fasterxml.jackson.annotation.JsonProperty("validator") + private final BaseSecurityAttributeValidator validator; + + public BaseSecurityAttributeValidator getValidator() { + return validator; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSecurityAttributeDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", validator=").append(String.valueOf(this.validator)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeDetails)) { + return false; + } + + UpdateSecurityAttributeDetails other = (UpdateSecurityAttributeDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.validator, other.validator) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.validator == null ? 43 : this.validator.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java new file mode 100644 index 00000000000..b322a9b4768 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/UpdateSecurityAttributeNamespaceDetails.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * Details of the security attribute namespace to be updated.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateSecurityAttributeNamespaceDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class UpdateSecurityAttributeNamespaceDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "isRetired", "freeformTags", "definedTags"}) + public UpdateSecurityAttributeNamespaceDetails( + String description, + Boolean isRetired, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.description = description; + this.isRetired = isRetired; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The description you assign to the security attribute namespace to help you identify it. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the security attribute namespace to help you identify it. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @param isRetired the value to set + * @return this builder + */ + public Builder isRetired(Boolean isRetired) { + this.isRetired = isRetired; + this.__explicitlySet__.add("isRetired"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateSecurityAttributeNamespaceDetails build() { + UpdateSecurityAttributeNamespaceDetails model = + new UpdateSecurityAttributeNamespaceDetails( + this.description, this.isRetired, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateSecurityAttributeNamespaceDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("isRetired")) { + this.isRetired(model.getIsRetired()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The description you assign to the security attribute namespace to help you identify it. */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the security attribute namespace to help you identify it. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("isRetired") + private final Boolean isRetired; + + /** + * Indicates whether the security attribute namespace is retired. See [Managing Security + * Attribute + * Namespaces](https://docs.cloud.oracle.com/Content/zero-trust-packet-routing/managing-security-attribute-namespaces.htm). + * + * @return the value + */ + public Boolean getIsRetired() { + return isRetired; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateSecurityAttributeNamespaceDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", isRetired=").append(String.valueOf(this.isRetired)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeNamespaceDetails)) { + return false; + } + + UpdateSecurityAttributeNamespaceDetails other = (UpdateSecurityAttributeNamespaceDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.isRetired, other.isRetired) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.isRetired == null ? 43 : this.isRetired.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java new file mode 100644 index 00000000000..625bf84bdae --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestOperationType.java @@ -0,0 +1,55 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** An enum-like description of the type of work the work request is doing. */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public enum WorkRequestOperationType implements com.oracle.bmc.http.internal.BmcEnum { + DeleteSecurityAttributeDefinition("DELETE_SECURITY_ATTRIBUTE_DEFINITION"), + DeleteNonEmptySecurityAttributeNamespace("DELETE_NON_EMPTY_SECURITY_ATTRIBUTE_NAMESPACE"), + BulkDeleteSecurityAttributes("BULK_DELETE_SECURITY_ATTRIBUTES"), + BulkEditOfSecurityAttributes("BULK_EDIT_OF_SECURITY_ATTRIBUTES"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestOperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestOperationType v : WorkRequestOperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestOperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestOperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestOperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java new file mode 100644 index 00000000000..2a961d723bd --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestResource.java @@ -0,0 +1,292 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** + * The resource entity.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestResource + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"identifier", "entityType", "actionType", "entityUri"}) + public WorkRequestResource( + String identifier, String entityType, ActionType actionType, String entityUri) { + super(); + this.identifier = identifier; + this.entityType = entityType; + this.actionType = actionType; + this.entityUri = entityUri; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The resource identifier the work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * The resource identifier the work request affects. + * + * @param identifier the value to set + * @return this builder + */ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** The resource type the work request is affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type the work request is affects. + * + * @param entityType the value to set + * @return this builder + */ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** The way in which this resource was affected by the work tracked by the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource was affected by the work tracked by the work request. + * + * @param actionType the value to set + * @return this builder + */ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** The URI path that the user can do a GET on to access the resource metadata. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata. + * + * @param entityUri the value to set + * @return this builder + */ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.identifier, this.entityType, this.actionType, this.entityUri); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The resource identifier the work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * The resource identifier the work request affects. + * + * @return the value + */ + public String getIdentifier() { + return identifier; + } + + /** The resource type the work request is affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type the work request is affects. + * + * @return the value + */ + public String getEntityType() { + return entityType; + } + + /** The way in which this resource was affected by the work tracked by the work request. */ + public enum ActionType implements com.oracle.bmc.http.internal.BmcEnum { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + Related("RELATED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** The way in which this resource was affected by the work tracked by the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource was affected by the work tracked by the work request. + * + * @return the value + */ + public ActionType getActionType() { + return actionType; + } + + /** The URI path that the user can do a GET on to access the resource metadata. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that the user can do a GET on to access the resource metadata. + * + * @return the value + */ + public String getEntityUri() { + return entityUri; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java new file mode 100644 index 00000000000..0c96dbe4f49 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/model/WorkRequestStatus.java @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.model; + +/** The current status of the work request. */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public enum WorkRequestStatus implements com.oracle.bmc.http.internal.BmcEnum { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + PartiallySucceeded("PARTIALLY_SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestStatus v : WorkRequestStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java new file mode 100644 index 00000000000..f7cac26b1e2 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkDeleteSecurityAttributesRequest.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * BulkDeleteSecurityAttributesRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkDeleteSecurityAttributesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails> { + + /** Request object for deleting security attributes in bulk. */ + private com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + bulkDeleteSecurityAttributesDetails; + + /** Request object for deleting security attributes in bulk. */ + public com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + getBulkDeleteSecurityAttributesDetails() { + return bulkDeleteSecurityAttributesDetails; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails getBody$() { + return bulkDeleteSecurityAttributesDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkDeleteSecurityAttributesRequest, + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** Request object for deleting security attributes in bulk. */ + private com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + bulkDeleteSecurityAttributesDetails = null; + + /** + * Request object for deleting security attributes in bulk. + * + * @param bulkDeleteSecurityAttributesDetails the value to set + * @return this builder instance + */ + public Builder bulkDeleteSecurityAttributesDetails( + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails + bulkDeleteSecurityAttributesDetails) { + this.bulkDeleteSecurityAttributesDetails = bulkDeleteSecurityAttributesDetails; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(BulkDeleteSecurityAttributesRequest o) { + bulkDeleteSecurityAttributesDetails(o.getBulkDeleteSecurityAttributesDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkDeleteSecurityAttributesRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of BulkDeleteSecurityAttributesRequest + */ + public BulkDeleteSecurityAttributesRequest build() { + BulkDeleteSecurityAttributesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails body) { + bulkDeleteSecurityAttributesDetails(body); + return this; + } + + /** + * Build the instance of BulkDeleteSecurityAttributesRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkDeleteSecurityAttributesRequest + */ + public BulkDeleteSecurityAttributesRequest buildWithoutInvocationCallback() { + BulkDeleteSecurityAttributesRequest request = new BulkDeleteSecurityAttributesRequest(); + request.bulkDeleteSecurityAttributesDetails = bulkDeleteSecurityAttributesDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new BulkDeleteSecurityAttributesRequest(bulkDeleteSecurityAttributesDetails, + // opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .bulkDeleteSecurityAttributesDetails(bulkDeleteSecurityAttributesDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",bulkDeleteSecurityAttributesDetails=") + .append(String.valueOf(this.bulkDeleteSecurityAttributesDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSecurityAttributesRequest)) { + return false; + } + + BulkDeleteSecurityAttributesRequest other = (BulkDeleteSecurityAttributesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.bulkDeleteSecurityAttributesDetails, + other.bulkDeleteSecurityAttributesDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.bulkDeleteSecurityAttributesDetails == null + ? 43 + : this.bulkDeleteSecurityAttributesDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java new file mode 100644 index 00000000000..834d02f6a50 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/BulkEditSecurityAttributesRequest.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * BulkEditSecurityAttributesRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkEditSecurityAttributesRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails> { + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** The request object for bulk editing security attributes on resources in the compartment. */ + private com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + bulkEditSecurityAttributeDetails; + + /** The request object for bulk editing security attributes on resources in the compartment. */ + public com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + getBulkEditSecurityAttributeDetails() { + return bulkEditSecurityAttributeDetails; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails getBody$() { + return bulkEditSecurityAttributeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + BulkEditSecurityAttributesRequest, + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * The request object for bulk editing security attributes on resources in the compartment. + */ + private com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + bulkEditSecurityAttributeDetails = null; + + /** + * The request object for bulk editing security attributes on resources in the compartment. + * + * @param bulkEditSecurityAttributeDetails the value to set + * @return this builder instance + */ + public Builder bulkEditSecurityAttributeDetails( + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails + bulkEditSecurityAttributeDetails) { + this.bulkEditSecurityAttributeDetails = bulkEditSecurityAttributeDetails; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(BulkEditSecurityAttributesRequest o) { + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + bulkEditSecurityAttributeDetails(o.getBulkEditSecurityAttributeDetails()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of BulkEditSecurityAttributesRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of BulkEditSecurityAttributesRequest + */ + public BulkEditSecurityAttributesRequest build() { + BulkEditSecurityAttributesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails body) { + bulkEditSecurityAttributeDetails(body); + return this; + } + + /** + * Build the instance of BulkEditSecurityAttributesRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of BulkEditSecurityAttributesRequest + */ + public BulkEditSecurityAttributesRequest buildWithoutInvocationCallback() { + BulkEditSecurityAttributesRequest request = new BulkEditSecurityAttributesRequest(); + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.bulkEditSecurityAttributeDetails = bulkEditSecurityAttributeDetails; + return request; + // new BulkEditSecurityAttributesRequest(opcRequestId, opcRetryToken, + // bulkEditSecurityAttributeDetails); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .bulkEditSecurityAttributeDetails(bulkEditSecurityAttributeDetails); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",bulkEditSecurityAttributeDetails=") + .append(String.valueOf(this.bulkEditSecurityAttributeDetails)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributesRequest)) { + return false; + } + + BulkEditSecurityAttributesRequest other = (BulkEditSecurityAttributesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals( + this.bulkEditSecurityAttributeDetails, + other.bulkEditSecurityAttributeDetails); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = + (result * PRIME) + + (this.bulkEditSecurityAttributeDetails == null + ? 43 + : this.bulkEditSecurityAttributeDetails.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..95ea51ee877 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CascadingDeleteSecurityAttributeNamespaceRequest.java @@ -0,0 +1,316 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * CascadingDeleteSecurityAttributeNamespaceRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CascadingDeleteSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CascadingDeleteSecurityAttributeNamespaceRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(CascadingDeleteSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CascadingDeleteSecurityAttributeNamespaceRequest as configured by + * this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of CascadingDeleteSecurityAttributeNamespaceRequest + */ + public CascadingDeleteSecurityAttributeNamespaceRequest build() { + CascadingDeleteSecurityAttributeNamespaceRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of CascadingDeleteSecurityAttributeNamespaceRequest as configured by + * this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CascadingDeleteSecurityAttributeNamespaceRequest + */ + public CascadingDeleteSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + CascadingDeleteSecurityAttributeNamespaceRequest request = + new CascadingDeleteSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CascadingDeleteSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, + // ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteSecurityAttributeNamespaceRequest)) { + return false; + } + + CascadingDeleteSecurityAttributeNamespaceRequest other = + (CascadingDeleteSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java new file mode 100644 index 00000000000..08f1d98be34 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ChangeSecurityAttributeNamespaceCompartmentRequest.java @@ -0,0 +1,395 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * ChangeSecurityAttributeNamespaceCompartmentRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ChangeSecurityAttributeNamespaceCompartmentRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails> { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** Request object for changing the compartment of a security attribute namespace. */ + private com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + changeSecurityAttributeNamespaceCompartmentDetails; + + /** Request object for changing the compartment of a security attribute namespace. */ + public com.oracle.bmc.securityattribute.model.ChangeSecurityAttributeNamespaceCompartmentDetails + getChangeSecurityAttributeNamespaceCompartmentDetails() { + return changeSecurityAttributeNamespaceCompartmentDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.ChangeSecurityAttributeNamespaceCompartmentDetails + getBody$() { + return changeSecurityAttributeNamespaceCompartmentDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ChangeSecurityAttributeNamespaceCompartmentRequest, + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** Request object for changing the compartment of a security attribute namespace. */ + private com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + changeSecurityAttributeNamespaceCompartmentDetails = null; + + /** + * Request object for changing the compartment of a security attribute namespace. + * + * @param changeSecurityAttributeNamespaceCompartmentDetails the value to set + * @return this builder instance + */ + public Builder changeSecurityAttributeNamespaceCompartmentDetails( + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + changeSecurityAttributeNamespaceCompartmentDetails) { + this.changeSecurityAttributeNamespaceCompartmentDetails = + changeSecurityAttributeNamespaceCompartmentDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ChangeSecurityAttributeNamespaceCompartmentRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + changeSecurityAttributeNamespaceCompartmentDetails( + o.getChangeSecurityAttributeNamespaceCompartmentDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ChangeSecurityAttributeNamespaceCompartmentRequest as configured by + * this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ChangeSecurityAttributeNamespaceCompartmentRequest + */ + public ChangeSecurityAttributeNamespaceCompartmentRequest build() { + ChangeSecurityAttributeNamespaceCompartmentRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model + .ChangeSecurityAttributeNamespaceCompartmentDetails + body) { + changeSecurityAttributeNamespaceCompartmentDetails(body); + return this; + } + + /** + * Build the instance of ChangeSecurityAttributeNamespaceCompartmentRequest as configured by + * this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ChangeSecurityAttributeNamespaceCompartmentRequest + */ + public ChangeSecurityAttributeNamespaceCompartmentRequest buildWithoutInvocationCallback() { + ChangeSecurityAttributeNamespaceCompartmentRequest request = + new ChangeSecurityAttributeNamespaceCompartmentRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.changeSecurityAttributeNamespaceCompartmentDetails = + changeSecurityAttributeNamespaceCompartmentDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + return request; + // new ChangeSecurityAttributeNamespaceCompartmentRequest(securityAttributeNamespaceId, + // changeSecurityAttributeNamespaceCompartmentDetails, opcRetryToken, ifMatch, + // opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .changeSecurityAttributeNamespaceCompartmentDetails( + changeSecurityAttributeNamespaceCompartmentDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",changeSecurityAttributeNamespaceCompartmentDetails=") + .append(String.valueOf(this.changeSecurityAttributeNamespaceCompartmentDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSecurityAttributeNamespaceCompartmentRequest)) { + return false; + } + + ChangeSecurityAttributeNamespaceCompartmentRequest other = + (ChangeSecurityAttributeNamespaceCompartmentRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.changeSecurityAttributeNamespaceCompartmentDetails, + other.changeSecurityAttributeNamespaceCompartmentDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.changeSecurityAttributeNamespaceCompartmentDetails == null + ? 43 + : this.changeSecurityAttributeNamespaceCompartmentDetails + .hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..83472eba118 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeNamespaceRequest.java @@ -0,0 +1,305 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * CreateSecurityAttributeNamespaceRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails> { + + /** Request object for creating a new security attribute namespace. */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + createSecurityAttributeNamespaceDetails; + + /** Request object for creating a new security attribute namespace. */ + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + getCreateSecurityAttributeNamespaceDetails() { + return createSecurityAttributeNamespaceDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + getBody$() { + return createSecurityAttributeNamespaceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSecurityAttributeNamespaceRequest, + com.oracle.bmc.securityattribute.model + .CreateSecurityAttributeNamespaceDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** Request object for creating a new security attribute namespace. */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + createSecurityAttributeNamespaceDetails = null; + + /** + * Request object for creating a new security attribute namespace. + * + * @param createSecurityAttributeNamespaceDetails the value to set + * @return this builder instance + */ + public Builder createSecurityAttributeNamespaceDetails( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + createSecurityAttributeNamespaceDetails) { + this.createSecurityAttributeNamespaceDetails = createSecurityAttributeNamespaceDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(CreateSecurityAttributeNamespaceRequest o) { + createSecurityAttributeNamespaceDetails(o.getCreateSecurityAttributeNamespaceDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeNamespaceRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of CreateSecurityAttributeNamespaceRequest + */ + public CreateSecurityAttributeNamespaceRequest build() { + CreateSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails + body) { + createSecurityAttributeNamespaceDetails(body); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeNamespaceRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSecurityAttributeNamespaceRequest + */ + public CreateSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + CreateSecurityAttributeNamespaceRequest request = + new CreateSecurityAttributeNamespaceRequest(); + request.createSecurityAttributeNamespaceDetails = + createSecurityAttributeNamespaceDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + return request; + // new CreateSecurityAttributeNamespaceRequest(createSecurityAttributeNamespaceDetails, + // opcRetryToken, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createSecurityAttributeNamespaceDetails(createSecurityAttributeNamespaceDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createSecurityAttributeNamespaceDetails=") + .append(String.valueOf(this.createSecurityAttributeNamespaceDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeNamespaceRequest)) { + return false; + } + + CreateSecurityAttributeNamespaceRequest other = (CreateSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createSecurityAttributeNamespaceDetails, + other.createSecurityAttributeNamespaceDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createSecurityAttributeNamespaceDetails == null + ? 43 + : this.createSecurityAttributeNamespaceDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java new file mode 100644 index 00000000000..759943ead79 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/CreateSecurityAttributeRequest.java @@ -0,0 +1,340 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * CreateSecurityAttributeRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails> { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * Request object for creating a new security attribute in the specified security attribute + * namespace. + */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + createSecurityAttributeDetails; + + /** + * Request object for creating a new security attribute in the specified security attribute + * namespace. + */ + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + getCreateSecurityAttributeDetails() { + return createSecurityAttributeDetails; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails getBody$() { + return createSecurityAttributeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateSecurityAttributeRequest, + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * Request object for creating a new security attribute in the specified security attribute + * namespace. + */ + private com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + createSecurityAttributeDetails = null; + + /** + * Request object for creating a new security attribute in the specified security attribute + * namespace. + * + * @param createSecurityAttributeDetails the value to set + * @return this builder instance + */ + public Builder createSecurityAttributeDetails( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails + createSecurityAttributeDetails) { + this.createSecurityAttributeDetails = createSecurityAttributeDetails; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(CreateSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + createSecurityAttributeDetails(o.getCreateSecurityAttributeDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of CreateSecurityAttributeRequest + */ + public CreateSecurityAttributeRequest build() { + CreateSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails body) { + createSecurityAttributeDetails(body); + return this; + } + + /** + * Build the instance of CreateSecurityAttributeRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateSecurityAttributeRequest + */ + public CreateSecurityAttributeRequest buildWithoutInvocationCallback() { + CreateSecurityAttributeRequest request = new CreateSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.createSecurityAttributeDetails = createSecurityAttributeDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new CreateSecurityAttributeRequest(securityAttributeNamespaceId, + // createSecurityAttributeDetails, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .createSecurityAttributeDetails(createSecurityAttributeDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",createSecurityAttributeDetails=") + .append(String.valueOf(this.createSecurityAttributeDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeRequest)) { + return false; + } + + CreateSecurityAttributeRequest other = (CreateSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.createSecurityAttributeDetails, other.createSecurityAttributeDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.createSecurityAttributeDetails == null + ? 43 + : this.createSecurityAttributeDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..c2faf4b608e --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeNamespaceRequest.java @@ -0,0 +1,314 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * DeleteSecurityAttributeNamespaceRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSecurityAttributeNamespaceRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(DeleteSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSecurityAttributeNamespaceRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of DeleteSecurityAttributeNamespaceRequest + */ + public DeleteSecurityAttributeNamespaceRequest build() { + DeleteSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSecurityAttributeNamespaceRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSecurityAttributeNamespaceRequest + */ + public DeleteSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + DeleteSecurityAttributeNamespaceRequest request = + new DeleteSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DeleteSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, ifMatch, + // opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeNamespaceRequest)) { + return false; + } + + DeleteSecurityAttributeNamespaceRequest other = (DeleteSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java new file mode 100644 index 00000000000..049ea545d15 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/DeleteSecurityAttributeRequest.java @@ -0,0 +1,342 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * DeleteSecurityAttributeRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** The name of the security attribute. */ + private String securityAttributeName; + + /** The name of the security attribute. */ + public String getSecurityAttributeName() { + return securityAttributeName; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteSecurityAttributeRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** The name of the security attribute. */ + private String securityAttributeName = null; + + /** + * The name of the security attribute. + * + * @param securityAttributeName the value to set + * @return this builder instance + */ + public Builder securityAttributeName(String securityAttributeName) { + this.securityAttributeName = securityAttributeName; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(DeleteSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + securityAttributeName(o.getSecurityAttributeName()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteSecurityAttributeRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of DeleteSecurityAttributeRequest + */ + public DeleteSecurityAttributeRequest build() { + DeleteSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteSecurityAttributeRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteSecurityAttributeRequest + */ + public DeleteSecurityAttributeRequest buildWithoutInvocationCallback() { + DeleteSecurityAttributeRequest request = new DeleteSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.securityAttributeName = securityAttributeName; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new DeleteSecurityAttributeRequest(securityAttributeNamespaceId, + // securityAttributeName, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .securityAttributeName(securityAttributeName) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",securityAttributeName=").append(String.valueOf(this.securityAttributeName)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeRequest)) { + return false; + } + + DeleteSecurityAttributeRequest other = (DeleteSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.securityAttributeName, other.securityAttributeName) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeName == null + ? 43 + : this.securityAttributeName.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..b10418eb7f5 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeNamespaceRequest.java @@ -0,0 +1,215 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * GetSecurityAttributeNamespaceRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSecurityAttributeNamespaceRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSecurityAttributeNamespaceRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetSecurityAttributeNamespaceRequest + */ + public GetSecurityAttributeNamespaceRequest build() { + GetSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSecurityAttributeNamespaceRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSecurityAttributeNamespaceRequest + */ + public GetSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + GetSecurityAttributeNamespaceRequest request = + new GetSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.opcRequestId = opcRequestId; + return request; + // new GetSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeNamespaceRequest)) { + return false; + } + + GetSecurityAttributeNamespaceRequest other = (GetSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java new file mode 100644 index 00000000000..b8fc3571866 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeRequest.java @@ -0,0 +1,245 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use GetSecurityAttributeRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** The name of the security attribute. */ + private String securityAttributeName; + + /** The name of the security attribute. */ + public String getSecurityAttributeName() { + return securityAttributeName; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSecurityAttributeRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** The name of the security attribute. */ + private String securityAttributeName = null; + + /** + * The name of the security attribute. + * + * @param securityAttributeName the value to set + * @return this builder instance + */ + public Builder securityAttributeName(String securityAttributeName) { + this.securityAttributeName = securityAttributeName; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + securityAttributeName(o.getSecurityAttributeName()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSecurityAttributeRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetSecurityAttributeRequest + */ + public GetSecurityAttributeRequest build() { + GetSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSecurityAttributeRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSecurityAttributeRequest + */ + public GetSecurityAttributeRequest buildWithoutInvocationCallback() { + GetSecurityAttributeRequest request = new GetSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.securityAttributeName = securityAttributeName; + request.opcRequestId = opcRequestId; + return request; + // new GetSecurityAttributeRequest(securityAttributeNamespaceId, securityAttributeName, + // opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .securityAttributeName(securityAttributeName) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",securityAttributeName=").append(String.valueOf(this.securityAttributeName)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeRequest)) { + return false; + } + + GetSecurityAttributeRequest other = (GetSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.securityAttributeName, other.securityAttributeName) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeName == null + ? 43 + : this.securityAttributeName.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java new file mode 100644 index 00000000000..0e6fde9c849 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/GetSecurityAttributeWorkRequestRequest.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * GetSecurityAttributeWorkRequestRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeWorkRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the work request. */ + private String workRequestId; + + /** The OCID of the work request. */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetSecurityAttributeWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the work request. */ + private String workRequestId = null; + + /** + * The OCID of the work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetSecurityAttributeWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetSecurityAttributeWorkRequestRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetSecurityAttributeWorkRequestRequest + */ + public GetSecurityAttributeWorkRequestRequest build() { + GetSecurityAttributeWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetSecurityAttributeWorkRequestRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetSecurityAttributeWorkRequestRequest + */ + public GetSecurityAttributeWorkRequestRequest buildWithoutInvocationCallback() { + GetSecurityAttributeWorkRequestRequest request = + new GetSecurityAttributeWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetSecurityAttributeWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeWorkRequestRequest)) { + return false; + } + + GetSecurityAttributeWorkRequestRequest other = (GetSecurityAttributeWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java new file mode 100644 index 00000000000..b02ba3bfb51 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeNamespacesRequest.java @@ -0,0 +1,528 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * ListSecurityAttributeNamespacesRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeNamespacesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page; + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + public String getPage() { + return page; + } + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit; + + /** The maximum number of items to return in a paginated "List" call. */ + public Integer getLimit() { + return limit; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.securityattribute.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.securityattribute.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case + * sensitive. + * + *

*Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a single + * Availability Domain. If you call one of these "List" operations without specifying an + * Availability Domain, the resources are grouped by Availability Domain, then sorted. + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case + * sensitive. + * + *

*Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a single + * Availability Domain. If you call one of these "List" operations without specifying an + * Availability Domain, the resources are grouped by Availability Domain, then sorted. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + Timecreated("TIMECREATED"), + Name("NAME"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order for + * TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order is case + * sensitive. + * + *

*Note:** In general, some "List" operations (for example, {@code ListInstances}) let you + * optionally filter by Availability Domain if the scope of the resource type is within a single + * Availability Domain. If you call one of these "List" operations without specifying an + * Availability Domain, the resources are grouped by Availability Domain, then sorted. + */ + public SortBy getSortBy() { + return sortBy; + } + /** A filter to return only resources that match the entire display name given. */ + private String name; + + /** A filter to return only resources that match the entire display name given. */ + public String getName() { + return name; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * An optional boolean parameter indicating whether to retrieve all security attribute + * namespaces in subcompartments. If this parameter is not specified, only the namespaces + * defined in the specified compartment are retrieved. + */ + private Boolean compartmentIdInSubtree; + + /** + * An optional boolean parameter indicating whether to retrieve all security attribute + * namespaces in subcompartments. If this parameter is not specified, only the namespaces + * defined in the specified compartment are retrieved. + */ + public Boolean getCompartmentIdInSubtree() { + return compartmentIdInSubtree; + } + /** + * A filter to only return resources that match the given lifecycle state. The state value is + * case-insensitive. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + lifecycleState; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is + * case-insensitive. + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + getLifecycleState() { + return lifecycleState; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeNamespacesRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.securityattribute.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.securityattribute.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order + * for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order + * is case sensitive. + * + *

*Note:** In general, some "List" operations (for example, {@code ListInstances}) let + * you optionally filter by Availability Domain if the scope of the resource type is within + * a single Availability Domain. If you call one of these "List" operations without + * specifying an Availability Domain, the resources are grouped by Availability Domain, then + * sorted. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide one sort order ({@code sortOrder}). Default order + * for TIMECREATED is descending. Default order for NAME is ascending. The NAME sort order + * is case sensitive. + * + *

*Note:** In general, some "List" operations (for example, {@code ListInstances}) let + * you optionally filter by Availability Domain if the scope of the resource type is within + * a single Availability Domain. If you call one of these "List" operations without + * specifying an Availability Domain, the resources are grouped by Availability Domain, then + * sorted. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** A filter to return only resources that match the entire display name given. */ + private String name = null; + + /** + * A filter to return only resources that match the entire display name given. + * + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * An optional boolean parameter indicating whether to retrieve all security attribute + * namespaces in subcompartments. If this parameter is not specified, only the namespaces + * defined in the specified compartment are retrieved. + */ + private Boolean compartmentIdInSubtree = null; + + /** + * An optional boolean parameter indicating whether to retrieve all security attribute + * namespaces in subcompartments. If this parameter is not specified, only the namespaces + * defined in the specified compartment are retrieved. + * + * @param compartmentIdInSubtree the value to set + * @return this builder instance + */ + public Builder compartmentIdInSubtree(Boolean compartmentIdInSubtree) { + this.compartmentIdInSubtree = compartmentIdInSubtree; + return this; + } + + /** + * A filter to only return resources that match the given lifecycle state. The state value + * is case-insensitive. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + lifecycleState = null; + + /** + * A filter to only return resources that match the given lifecycle state. The state value + * is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeNamespacesRequest o) { + compartmentId(o.getCompartmentId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + name(o.getName()); + opcRequestId(o.getOpcRequestId()); + compartmentIdInSubtree(o.getCompartmentIdInSubtree()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeNamespacesRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeNamespacesRequest + */ + public ListSecurityAttributeNamespacesRequest build() { + ListSecurityAttributeNamespacesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeNamespacesRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeNamespacesRequest + */ + public ListSecurityAttributeNamespacesRequest buildWithoutInvocationCallback() { + ListSecurityAttributeNamespacesRequest request = + new ListSecurityAttributeNamespacesRequest(); + request.compartmentId = compartmentId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.name = name; + request.opcRequestId = opcRequestId; + request.compartmentIdInSubtree = compartmentIdInSubtree; + request.lifecycleState = lifecycleState; + return request; + // new ListSecurityAttributeNamespacesRequest(compartmentId, page, limit, sortOrder, + // sortBy, name, opcRequestId, compartmentIdInSubtree, lifecycleState); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy) + .name(name) + .opcRequestId(opcRequestId) + .compartmentIdInSubtree(compartmentIdInSubtree) + .lifecycleState(lifecycleState); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",compartmentIdInSubtree=").append(String.valueOf(this.compartmentIdInSubtree)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeNamespacesRequest)) { + return false; + } + + ListSecurityAttributeNamespacesRequest other = (ListSecurityAttributeNamespacesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.compartmentIdInSubtree, other.compartmentIdInSubtree) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.compartmentIdInSubtree == null + ? 43 + : this.compartmentIdInSubtree.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..b24f1aab2fc --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestErrorsRequest.java @@ -0,0 +1,270 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * ListSecurityAttributeWorkRequestErrorsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the work request. */ + private String workRequestId; + + /** The OCID of the work request. */ + public String getWorkRequestId() { + return workRequestId; + } + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page; + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + public String getPage() { + return page; + } + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit; + + /** The maximum number of items to return in a paginated "List" call. */ + public Integer getLimit() { + return limit; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the work request. */ + private String workRequestId = null; + + /** + * The OCID of the work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + page(o.getPage()); + limit(o.getLimit()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestErrorsRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeWorkRequestErrorsRequest + */ + public ListSecurityAttributeWorkRequestErrorsRequest build() { + ListSecurityAttributeWorkRequestErrorsRequest request = + buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestErrorsRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeWorkRequestErrorsRequest + */ + public ListSecurityAttributeWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListSecurityAttributeWorkRequestErrorsRequest request = + new ListSecurityAttributeWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.page = page; + request.limit = limit; + request.opcRequestId = opcRequestId; + return request; + // new ListSecurityAttributeWorkRequestErrorsRequest(workRequestId, page, limit, + // opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .page(page) + .limit(limit) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestErrorsRequest)) { + return false; + } + + ListSecurityAttributeWorkRequestErrorsRequest other = + (ListSecurityAttributeWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java new file mode 100644 index 00000000000..f1f2e9ad815 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestLogsRequest.java @@ -0,0 +1,269 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * ListSecurityAttributeWorkRequestLogsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestLogsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the work request. */ + private String workRequestId; + + /** The OCID of the work request. */ + public String getWorkRequestId() { + return workRequestId; + } + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page; + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + public String getPage() { + return page; + } + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit; + + /** The maximum number of items to return in a paginated "List" call. */ + public Integer getLimit() { + return limit; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the work request. */ + private String workRequestId = null; + + /** + * The OCID of the work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + page(o.getPage()); + limit(o.getLimit()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestLogsRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeWorkRequestLogsRequest + */ + public ListSecurityAttributeWorkRequestLogsRequest build() { + ListSecurityAttributeWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestLogsRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeWorkRequestLogsRequest + */ + public ListSecurityAttributeWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListSecurityAttributeWorkRequestLogsRequest request = + new ListSecurityAttributeWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.page = page; + request.limit = limit; + request.opcRequestId = opcRequestId; + return request; + // new ListSecurityAttributeWorkRequestLogsRequest(workRequestId, page, limit, + // opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .page(page) + .limit(limit) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestLogsRequest)) { + return false; + } + + ListSecurityAttributeWorkRequestLogsRequest other = + (ListSecurityAttributeWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java new file mode 100644 index 00000000000..4b8289b1ef6 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributeWorkRequestsRequest.java @@ -0,0 +1,310 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * ListSecurityAttributeWorkRequestsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page; + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + public String getPage() { + return page; + } + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit; + + /** The maximum number of items to return in a paginated "List" call. */ + public Integer getLimit() { + return limit; + } + /** The identifier of the resource the work request affects. */ + private String resourceIdentifier; + + /** The identifier of the resource the work request affects. */ + public String getResourceIdentifier() { + return resourceIdentifier; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributeWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** The identifier of the resource the work request affects. */ + private String resourceIdentifier = null; + + /** + * The identifier of the resource the work request affects. + * + * @param resourceIdentifier the value to set + * @return this builder instance + */ + public Builder resourceIdentifier(String resourceIdentifier) { + this.resourceIdentifier = resourceIdentifier; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListSecurityAttributeWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + page(o.getPage()); + limit(o.getLimit()); + resourceIdentifier(o.getResourceIdentifier()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestsRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributeWorkRequestsRequest + */ + public ListSecurityAttributeWorkRequestsRequest build() { + ListSecurityAttributeWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributeWorkRequestsRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributeWorkRequestsRequest + */ + public ListSecurityAttributeWorkRequestsRequest buildWithoutInvocationCallback() { + ListSecurityAttributeWorkRequestsRequest request = + new ListSecurityAttributeWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.page = page; + request.limit = limit; + request.resourceIdentifier = resourceIdentifier; + request.opcRequestId = opcRequestId; + return request; + // new ListSecurityAttributeWorkRequestsRequest(compartmentId, page, limit, + // resourceIdentifier, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .page(page) + .limit(limit) + .resourceIdentifier(resourceIdentifier) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",resourceIdentifier=").append(String.valueOf(this.resourceIdentifier)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestsRequest)) { + return false; + } + + ListSecurityAttributeWorkRequestsRequest other = + (ListSecurityAttributeWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.resourceIdentifier, other.resourceIdentifier) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = + (result * PRIME) + + (this.resourceIdentifier == null + ? 43 + : this.resourceIdentifier.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java new file mode 100644 index 00000000000..2a9f58f3340 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/ListSecurityAttributesRequest.java @@ -0,0 +1,312 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * ListSecurityAttributesRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributesRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page; + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + public String getPage() { + return page; + } + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit; + + /** The maximum number of items to return in a paginated "List" call. */ + public Integer getLimit() { + return limit; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A filter to only return resources that match the given lifecycle state. The state value is + * case-insensitive. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState lifecycleState; + + /** + * A filter to only return resources that match the given lifecycle state. The state value is + * case-insensitive. + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + getLifecycleState() { + return lifecycleState; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListSecurityAttributesRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** The value of the {@code opc-next-page} response header from the previous "List" call. */ + private String page = null; + + /** + * The value of the {@code opc-next-page} response header from the previous "List" call. + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** The maximum number of items to return in a paginated "List" call. */ + private Integer limit = null; + + /** + * The maximum number of items to return in a paginated "List" call. + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A filter to only return resources that match the given lifecycle state. The state value + * is case-insensitive. + */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + lifecycleState = null; + + /** + * A filter to only return resources that match the given lifecycle state. The state value + * is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.securityattribute.model.SecurityAttribute.LifecycleState + lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListSecurityAttributesRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + page(o.getPage()); + limit(o.getLimit()); + opcRequestId(o.getOpcRequestId()); + lifecycleState(o.getLifecycleState()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListSecurityAttributesRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListSecurityAttributesRequest + */ + public ListSecurityAttributesRequest build() { + ListSecurityAttributesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListSecurityAttributesRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListSecurityAttributesRequest + */ + public ListSecurityAttributesRequest buildWithoutInvocationCallback() { + ListSecurityAttributesRequest request = new ListSecurityAttributesRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.page = page; + request.limit = limit; + request.opcRequestId = opcRequestId; + request.lifecycleState = lifecycleState; + return request; + // new ListSecurityAttributesRequest(securityAttributeNamespaceId, page, limit, + // opcRequestId, lifecycleState); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .page(page) + .limit(limit) + .opcRequestId(opcRequestId) + .lifecycleState(lifecycleState); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributesRequest)) { + return false; + } + + ListSecurityAttributesRequest other = (ListSecurityAttributesRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java new file mode 100644 index 00000000000..036cbea1d4c --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeNamespaceRequest.java @@ -0,0 +1,383 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * UpdateSecurityAttributeNamespaceRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeNamespaceRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails> { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** Request object for updating a namespace. */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + updateSecurityAttributeNamespaceDetails; + + /** Request object for updating a namespace. */ + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + getUpdateSecurityAttributeNamespaceDetails() { + return updateSecurityAttributeNamespaceDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + getBody$() { + return updateSecurityAttributeNamespaceDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSecurityAttributeNamespaceRequest, + com.oracle.bmc.securityattribute.model + .UpdateSecurityAttributeNamespaceDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** Request object for updating a namespace. */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + updateSecurityAttributeNamespaceDetails = null; + + /** + * Request object for updating a namespace. + * + * @param updateSecurityAttributeNamespaceDetails the value to set + * @return this builder instance + */ + public Builder updateSecurityAttributeNamespaceDetails( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + updateSecurityAttributeNamespaceDetails) { + this.updateSecurityAttributeNamespaceDetails = updateSecurityAttributeNamespaceDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(UpdateSecurityAttributeNamespaceRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + updateSecurityAttributeNamespaceDetails(o.getUpdateSecurityAttributeNamespaceDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeNamespaceRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of UpdateSecurityAttributeNamespaceRequest + */ + public UpdateSecurityAttributeNamespaceRequest build() { + UpdateSecurityAttributeNamespaceRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails + body) { + updateSecurityAttributeNamespaceDetails(body); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeNamespaceRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSecurityAttributeNamespaceRequest + */ + public UpdateSecurityAttributeNamespaceRequest buildWithoutInvocationCallback() { + UpdateSecurityAttributeNamespaceRequest request = + new UpdateSecurityAttributeNamespaceRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.updateSecurityAttributeNamespaceDetails = + updateSecurityAttributeNamespaceDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateSecurityAttributeNamespaceRequest(securityAttributeNamespaceId, + // updateSecurityAttributeNamespaceDetails, ifMatch, opcRequestId, opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .updateSecurityAttributeNamespaceDetails(updateSecurityAttributeNamespaceDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",updateSecurityAttributeNamespaceDetails=") + .append(String.valueOf(this.updateSecurityAttributeNamespaceDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeNamespaceRequest)) { + return false; + } + + UpdateSecurityAttributeNamespaceRequest other = (UpdateSecurityAttributeNamespaceRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals( + this.updateSecurityAttributeNamespaceDetails, + other.updateSecurityAttributeNamespaceDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.updateSecurityAttributeNamespaceDetails == null + ? 43 + : this.updateSecurityAttributeNamespaceDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java new file mode 100644 index 00000000000..a0c90e46f19 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/requests/UpdateSecurityAttributeRequest.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.requests; + +import com.oracle.bmc.securityattribute.model.*; +/** + * Example: Click here to see how to use + * UpdateSecurityAttributeRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails> { + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId; + + /** The OCID of the security attribute namespace. */ + public String getSecurityAttributeNamespaceId() { + return securityAttributeNamespaceId; + } + /** The name of the security attribute. */ + private String securityAttributeName; + + /** The name of the security attribute. */ + public String getSecurityAttributeName() { + return securityAttributeName; + } + /** Request object for updating a security attribute. */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + updateSecurityAttributeDetails; + + /** Request object for updating a security attribute. */ + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + getUpdateSecurityAttributeDetails() { + return updateSecurityAttributeDetails; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails getBody$() { + return updateSecurityAttributeDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateSecurityAttributeRequest, + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** The OCID of the security attribute namespace. */ + private String securityAttributeNamespaceId = null; + + /** + * The OCID of the security attribute namespace. + * + * @param securityAttributeNamespaceId the value to set + * @return this builder instance + */ + public Builder securityAttributeNamespaceId(String securityAttributeNamespaceId) { + this.securityAttributeNamespaceId = securityAttributeNamespaceId; + return this; + } + + /** The name of the security attribute. */ + private String securityAttributeName = null; + + /** + * The name of the security attribute. + * + * @param securityAttributeName the value to set + * @return this builder instance + */ + public Builder securityAttributeName(String securityAttributeName) { + this.securityAttributeName = securityAttributeName; + return this; + } + + /** Request object for updating a security attribute. */ + private com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + updateSecurityAttributeDetails = null; + + /** + * Request object for updating a security attribute. + * + * @param updateSecurityAttributeDetails the value to set + * @return this builder instance + */ + public Builder updateSecurityAttributeDetails( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails + updateSecurityAttributeDetails) { + this.updateSecurityAttributeDetails = updateSecurityAttributeDetails; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(UpdateSecurityAttributeRequest o) { + securityAttributeNamespaceId(o.getSecurityAttributeNamespaceId()); + securityAttributeName(o.getSecurityAttributeName()); + updateSecurityAttributeDetails(o.getUpdateSecurityAttributeDetails()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of UpdateSecurityAttributeRequest + */ + public UpdateSecurityAttributeRequest build() { + UpdateSecurityAttributeRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$( + com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails body) { + updateSecurityAttributeDetails(body); + return this; + } + + /** + * Build the instance of UpdateSecurityAttributeRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateSecurityAttributeRequest + */ + public UpdateSecurityAttributeRequest buildWithoutInvocationCallback() { + UpdateSecurityAttributeRequest request = new UpdateSecurityAttributeRequest(); + request.securityAttributeNamespaceId = securityAttributeNamespaceId; + request.securityAttributeName = securityAttributeName; + request.updateSecurityAttributeDetails = updateSecurityAttributeDetails; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + return request; + // new UpdateSecurityAttributeRequest(securityAttributeNamespaceId, + // securityAttributeName, updateSecurityAttributeDetails, ifMatch, opcRequestId, + // opcRetryToken); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .securityAttributeNamespaceId(securityAttributeNamespaceId) + .securityAttributeName(securityAttributeName) + .updateSecurityAttributeDetails(updateSecurityAttributeDetails) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",securityAttributeNamespaceId=") + .append(String.valueOf(this.securityAttributeNamespaceId)); + sb.append(",securityAttributeName=").append(String.valueOf(this.securityAttributeName)); + sb.append(",updateSecurityAttributeDetails=") + .append(String.valueOf(this.updateSecurityAttributeDetails)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeRequest)) { + return false; + } + + UpdateSecurityAttributeRequest other = (UpdateSecurityAttributeRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.securityAttributeNamespaceId, other.securityAttributeNamespaceId) + && java.util.Objects.equals(this.securityAttributeName, other.securityAttributeName) + && java.util.Objects.equals( + this.updateSecurityAttributeDetails, other.updateSecurityAttributeDetails) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.securityAttributeNamespaceId == null + ? 43 + : this.securityAttributeNamespaceId.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeName == null + ? 43 + : this.securityAttributeName.hashCode()); + result = + (result * PRIME) + + (this.updateSecurityAttributeDetails == null + ? 43 + : this.updateSecurityAttributeDetails.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java new file mode 100644 index 00000000000..316b713bafe --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkDeleteSecurityAttributesResponse.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkDeleteSecurityAttributesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private BulkDeleteSecurityAttributesResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + BulkDeleteSecurityAttributesResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(BulkDeleteSecurityAttributesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public BulkDeleteSecurityAttributesResponse build() { + return new BulkDeleteSecurityAttributesResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkDeleteSecurityAttributesResponse)) { + return false; + } + + BulkDeleteSecurityAttributesResponse other = (BulkDeleteSecurityAttributesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java new file mode 100644 index 00000000000..15e63db28a8 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/BulkEditSecurityAttributesResponse.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class BulkEditSecurityAttributesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private BulkEditSecurityAttributesResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + BulkEditSecurityAttributesResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(BulkEditSecurityAttributesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public BulkEditSecurityAttributesResponse build() { + return new BulkEditSecurityAttributesResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof BulkEditSecurityAttributesResponse)) { + return false; + } + + BulkEditSecurityAttributesResponse other = (BulkEditSecurityAttributesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..bdb6d4dcc1a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CascadingDeleteSecurityAttributeNamespaceResponse.java @@ -0,0 +1,188 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CascadingDeleteSecurityAttributeNamespaceResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private CascadingDeleteSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + CascadingDeleteSecurityAttributeNamespaceResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(CascadingDeleteSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public CascadingDeleteSecurityAttributeNamespaceResponse build() { + return new CascadingDeleteSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CascadingDeleteSecurityAttributeNamespaceResponse)) { + return false; + } + + CascadingDeleteSecurityAttributeNamespaceResponse other = + (CascadingDeleteSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java new file mode 100644 index 00000000000..64ae64bc2d5 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ChangeSecurityAttributeNamespaceCompartmentResponse.java @@ -0,0 +1,140 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ChangeSecurityAttributeNamespaceCompartmentResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private ChangeSecurityAttributeNamespaceCompartmentResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ChangeSecurityAttributeNamespaceCompartmentResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ChangeSecurityAttributeNamespaceCompartmentResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ChangeSecurityAttributeNamespaceCompartmentResponse build() { + return new ChangeSecurityAttributeNamespaceCompartmentResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ChangeSecurityAttributeNamespaceCompartmentResponse)) { + return false; + } + + ChangeSecurityAttributeNamespaceCompartmentResponse other = + (ChangeSecurityAttributeNamespaceCompartmentResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..eb2d7589a80 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeNamespaceResponse.java @@ -0,0 +1,222 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** The returned {@code SecurityAttributeNamespace} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned {@code SecurityAttributeNamespace} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + getSecurityAttributeNamespace() { + return securityAttributeNamespace; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttributeNamespace" + }) + private CreateSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttributeNamespace = securityAttributeNamespace; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + CreateSecurityAttributeNamespaceResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** The returned {@code SecurityAttributeNamespace} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned {@code SecurityAttributeNamespace} instance. + * + * @param securityAttributeNamespace the value to set + * @return this builder + */ + public Builder securityAttributeNamespace( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + this.securityAttributeNamespace = securityAttributeNamespace; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(CreateSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttributeNamespace(o.getSecurityAttributeNamespace()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public CreateSecurityAttributeNamespaceResponse build() { + return new CreateSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttributeNamespace); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttributeNamespace=") + .append(String.valueOf(securityAttributeNamespace)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeNamespaceResponse)) { + return false; + } + + CreateSecurityAttributeNamespaceResponse other = + (CreateSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.securityAttributeNamespace, other.securityAttributeNamespace); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespace == null + ? 43 + : this.securityAttributeNamespace.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java new file mode 100644 index 00000000000..70c427d5ec2 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/CreateSecurityAttributeResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class CreateSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** The returned {@code SecurityAttribute} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned {@code SecurityAttribute} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute getSecurityAttribute() { + return securityAttribute; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttribute" + }) + private CreateSecurityAttributeResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttribute = securityAttribute; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + CreateSecurityAttributeResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** The returned {@code SecurityAttribute} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned {@code SecurityAttribute} instance. + * + * @param securityAttribute the value to set + * @return this builder + */ + public Builder securityAttribute( + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + this.securityAttribute = securityAttribute; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(CreateSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttribute(o.getSecurityAttribute()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public CreateSecurityAttributeResponse build() { + return new CreateSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttribute); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttribute=").append(String.valueOf(securityAttribute)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateSecurityAttributeResponse)) { + return false; + } + + CreateSecurityAttributeResponse other = (CreateSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.securityAttribute, other.securityAttribute); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttribute == null ? 43 : this.securityAttribute.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..2b9b4cb2cd5 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeNamespaceResponse.java @@ -0,0 +1,139 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + @java.beans.ConstructorProperties({"__httpStatusCode__", "headers", "opcRequestId"}) + private DeleteSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + DeleteSecurityAttributeNamespaceResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(DeleteSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public DeleteSecurityAttributeNamespaceResponse build() { + return new DeleteSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeNamespaceResponse)) { + return false; + } + + DeleteSecurityAttributeNamespaceResponse other = + (DeleteSecurityAttributeNamespaceResponse) o; + return super.equals(o) && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java new file mode 100644 index 00000000000..4eadf0e6363 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/DeleteSecurityAttributeResponse.java @@ -0,0 +1,186 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class DeleteSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteSecurityAttributeResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + DeleteSecurityAttributeResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + */ + private String opcWorkRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * work request. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(DeleteSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public DeleteSecurityAttributeResponse build() { + return new DeleteSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteSecurityAttributeResponse)) { + return false; + } + + DeleteSecurityAttributeResponse other = (DeleteSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..4d2e8a33709 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeNamespaceResponse.java @@ -0,0 +1,221 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** The returned {@code SecurityAttributeNamespace} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned {@code SecurityAttributeNamespace} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + getSecurityAttributeNamespace() { + return securityAttributeNamespace; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttributeNamespace" + }) + private GetSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttributeNamespace = securityAttributeNamespace; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + GetSecurityAttributeNamespaceResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** The returned {@code SecurityAttributeNamespace} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned {@code SecurityAttributeNamespace} instance. + * + * @param securityAttributeNamespace the value to set + * @return this builder + */ + public Builder securityAttributeNamespace( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + this.securityAttributeNamespace = securityAttributeNamespace; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttributeNamespace(o.getSecurityAttributeNamespace()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetSecurityAttributeNamespaceResponse build() { + return new GetSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttributeNamespace); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttributeNamespace=") + .append(String.valueOf(securityAttributeNamespace)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeNamespaceResponse)) { + return false; + } + + GetSecurityAttributeNamespaceResponse other = (GetSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.securityAttributeNamespace, other.securityAttributeNamespace); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespace == null + ? 43 + : this.securityAttributeNamespace.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java new file mode 100644 index 00000000000..32073b9dac1 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeResponse.java @@ -0,0 +1,211 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** The returned {@code SecurityAttribute} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned {@code SecurityAttribute} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute getSecurityAttribute() { + return securityAttribute; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttribute" + }) + private GetSecurityAttributeResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttribute = securityAttribute; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** The returned {@code SecurityAttribute} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned {@code SecurityAttribute} instance. + * + * @param securityAttribute the value to set + * @return this builder + */ + public Builder securityAttribute( + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + this.securityAttribute = securityAttribute; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttribute(o.getSecurityAttribute()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetSecurityAttributeResponse build() { + return new GetSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttribute); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttribute=").append(String.valueOf(securityAttribute)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeResponse)) { + return false; + } + + GetSecurityAttributeResponse other = (GetSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.securityAttribute, other.securityAttribute); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttribute == null ? 43 : this.securityAttribute.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java new file mode 100644 index 00000000000..2c6e594f414 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/GetSecurityAttributeWorkRequestResponse.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class GetSecurityAttributeWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The number of seconds that the client should wait before polling again. */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** The returned {@code SecurityAttributeWorkRequest} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest; + + /** + * The returned {@code SecurityAttributeWorkRequest} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + getSecurityAttributeWorkRequest() { + return securityAttributeWorkRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "securityAttributeWorkRequest" + }) + private GetSecurityAttributeWorkRequestResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + Float retryAfter, + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.securityAttributeWorkRequest = securityAttributeWorkRequest; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + GetSecurityAttributeWorkRequestResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The number of seconds that the client should wait before polling again. */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** The returned {@code SecurityAttributeWorkRequest} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest; + + /** + * The returned {@code SecurityAttributeWorkRequest} instance. + * + * @param securityAttributeWorkRequest the value to set + * @return this builder + */ + public Builder securityAttributeWorkRequest( + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest + securityAttributeWorkRequest) { + this.securityAttributeWorkRequest = securityAttributeWorkRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetSecurityAttributeWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + securityAttributeWorkRequest(o.getSecurityAttributeWorkRequest()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetSecurityAttributeWorkRequestResponse build() { + return new GetSecurityAttributeWorkRequestResponse( + __httpStatusCode__, + headers, + opcRequestId, + retryAfter, + securityAttributeWorkRequest); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",securityAttributeWorkRequest=") + .append(String.valueOf(securityAttributeWorkRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetSecurityAttributeWorkRequestResponse)) { + return false; + } + + GetSecurityAttributeWorkRequestResponse other = (GetSecurityAttributeWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals( + this.securityAttributeWorkRequest, other.securityAttributeWorkRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeWorkRequest == null + ? 43 + : this.securityAttributeWorkRequest.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java new file mode 100644 index 00000000000..0f100b48c4e --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeNamespacesResponse.java @@ -0,0 +1,240 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeNamespacesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of namespaces. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of namespaces. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} + * instances. + */ + private java.util.List + items; + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} + * instances. + * + * @return the value + */ + public java.util.List + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSecurityAttributeNamespacesResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcNextPage, + java.util.List + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListSecurityAttributeNamespacesResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of namespaces. When paging through a list, if this header + * appears in the response, then a partial list might have been returned. Include this value + * as the {@code page} parameter for the subsequent GET request to get the next batch of + * items. + */ + private String opcNextPage; + + /** + * For pagination of a list of namespaces. When paging through a list, if this header + * appears in the response, then a partial list might have been returned. Include this value + * as the {@code page} parameter for the subsequent GET request to get the next batch of + * items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary> + items; + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary} instances. + * + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeNamespaceSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListSecurityAttributeNamespacesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListSecurityAttributeNamespacesResponse build() { + return new ListSecurityAttributeNamespacesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeNamespacesResponse)) { + return false; + } + + ListSecurityAttributeNamespacesResponse other = (ListSecurityAttributeNamespacesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..e14872a178a --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestErrorsResponse.java @@ -0,0 +1,280 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestErrorsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The number of seconds that the client should wait before polling again. */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the + * response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the + * response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary> + items; + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} instances. + * + * @return the value + */ + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "opcNextPage", + "items" + }) + private ListSecurityAttributeWorkRequestErrorsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + Float retryAfter, + String opcNextPage, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListSecurityAttributeWorkRequestErrorsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The number of seconds that the client should wait before polling again. */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the + * {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the + * {@code page} parameter for the subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} + * instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + items; + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary} + * instances. + * + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestErrorSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListSecurityAttributeWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListSecurityAttributeWorkRequestErrorsResponse build() { + return new ListSecurityAttributeWorkRequestErrorsResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestErrorsResponse)) { + return false; + } + + ListSecurityAttributeWorkRequestErrorsResponse other = + (ListSecurityAttributeWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java new file mode 100644 index 00000000000..e25855b0e06 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestLogsResponse.java @@ -0,0 +1,278 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestLogsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The number of seconds that the client should wait before polling again. */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @return the value + */ + public Float getRetryAfter() { + return retryAfter; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the + * response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the + * response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary> + items; + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} instances. + * + * @return the value + */ + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "retryAfter", + "opcNextPage", + "items" + }) + private ListSecurityAttributeWorkRequestLogsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + Float retryAfter, + String opcNextPage, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListSecurityAttributeWorkRequestLogsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The number of seconds that the client should wait before polling again. */ + private Float retryAfter; + + /** + * The number of seconds that the client should wait before polling again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Float retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the + * {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the + * {@code page} parameter for the subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + items; + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary} instances. + * + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestLogSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListSecurityAttributeWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListSecurityAttributeWorkRequestLogsResponse build() { + return new ListSecurityAttributeWorkRequestLogsResponse( + __httpStatusCode__, headers, opcRequestId, retryAfter, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestLogsResponse)) { + return false; + } + + ListSecurityAttributeWorkRequestLogsResponse other = + (ListSecurityAttributeWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java new file mode 100644 index 00000000000..20d4856853c --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributeWorkRequestsResponse.java @@ -0,0 +1,244 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributeWorkRequestsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the + * response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in the + * response, then a partial list might have been returned. Include this value as the {@code + * page} parameter for the subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} + * instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary> + items; + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} + * instances. + * + * @return the value + */ + public java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary> + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSecurityAttributeWorkRequestsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcNextPage, + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary> + items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListSecurityAttributeWorkRequestsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of items. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the + * {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of items. When paging through a list, if this header appears in + * the response, then a partial list might have been returned. Include this value as the + * {@code page} parameter for the subsequent GET request to get the next batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} instances. + */ + private java.util.List< + com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary> + items; + + /** + * A list of {@code + * com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary} instances. + * + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List< + com.oracle.bmc.securityattribute.model + .SecurityAttributeWorkRequestSummary> + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListSecurityAttributeWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListSecurityAttributeWorkRequestsResponse build() { + return new ListSecurityAttributeWorkRequestsResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributeWorkRequestsResponse)) { + return false; + } + + ListSecurityAttributeWorkRequestsResponse other = + (ListSecurityAttributeWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java new file mode 100644 index 00000000000..0986ce91783 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/ListSecurityAttributesResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class ListSecurityAttributesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For pagination of a list of security attributes. When paging through a list, if this header + * appears in the response, then a partial list might have been returned. Include this value as + * the {@code page} parameter for the subsequent GET request to get the next batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of security attributes. When paging through a list, if this header + * appears in the response, then a partial list might have been returned. Include this value as + * the {@code page} parameter for the subsequent GET request to get the next batch of items. + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} instances. + */ + private java.util.List items; + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} instances. + * + * @return the value + */ + public java.util.List + getItems() { + return items; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "items" + }) + private ListSecurityAttributesResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcNextPage, + java.util.List items) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.items = items; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListSecurityAttributesResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For pagination of a list of security attributes. When paging through a list, if this + * header appears in the response, then a partial list might have been returned. Include + * this value as the {@code page} parameter for the subsequent GET request to get the next + * batch of items. + */ + private String opcNextPage; + + /** + * For pagination of a list of security attributes. When paging through a list, if this + * header appears in the response, then a partial list might have been returned. Include + * this value as the {@code page} parameter for the subsequent GET request to get the next + * batch of items. + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} + * instances. + */ + private java.util.List + items; + + /** + * A list of {@code com.oracle.bmc.securityattribute.model.SecurityAttributeSummary} + * instances. + * + * @param items the value to set + * @return this builder + */ + public Builder items( + java.util.List + items) { + this.items = items; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListSecurityAttributesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + items(o.getItems()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListSecurityAttributesResponse build() { + return new ListSecurityAttributesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, items); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",items=").append(String.valueOf(items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListSecurityAttributesResponse)) { + return false; + } + + ListSecurityAttributesResponse other = (ListSecurityAttributesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.items, other.items); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java new file mode 100644 index 00000000000..7d2c6b511dc --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeNamespaceResponse.java @@ -0,0 +1,222 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeNamespaceResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** The returned {@code SecurityAttributeNamespace} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned {@code SecurityAttributeNamespace} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + getSecurityAttributeNamespace() { + return securityAttributeNamespace; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttributeNamespace" + }) + private UpdateSecurityAttributeNamespaceResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttributeNamespace = securityAttributeNamespace; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + UpdateSecurityAttributeNamespaceResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** The returned {@code SecurityAttributeNamespace} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace; + + /** + * The returned {@code SecurityAttributeNamespace} instance. + * + * @param securityAttributeNamespace the value to set + * @return this builder + */ + public Builder securityAttributeNamespace( + com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace + securityAttributeNamespace) { + this.securityAttributeNamespace = securityAttributeNamespace; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(UpdateSecurityAttributeNamespaceResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttributeNamespace(o.getSecurityAttributeNamespace()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public UpdateSecurityAttributeNamespaceResponse build() { + return new UpdateSecurityAttributeNamespaceResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttributeNamespace); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttributeNamespace=") + .append(String.valueOf(securityAttributeNamespace)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeNamespaceResponse)) { + return false; + } + + UpdateSecurityAttributeNamespaceResponse other = + (UpdateSecurityAttributeNamespaceResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals( + this.securityAttributeNamespace, other.securityAttributeNamespace); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttributeNamespace == null + ? 43 + : this.securityAttributeNamespace.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java new file mode 100644 index 00000000000..82b0c2a0da9 --- /dev/null +++ b/bmc-securityattribute/src/main/java/com/oracle/bmc/securityattribute/responses/UpdateSecurityAttributeResponse.java @@ -0,0 +1,212 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.securityattribute.responses; + +import com.oracle.bmc.securityattribute.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") +public class UpdateSecurityAttributeResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** The returned {@code SecurityAttribute} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned {@code SecurityAttribute} instance. + * + * @return the value + */ + public com.oracle.bmc.securityattribute.model.SecurityAttribute getSecurityAttribute() { + return securityAttribute; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "etag", + "securityAttribute" + }) + private UpdateSecurityAttributeResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String etag, + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.etag = etag; + this.securityAttribute = securityAttribute; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + UpdateSecurityAttributeResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** The returned {@code SecurityAttribute} instance. */ + private com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute; + + /** + * The returned {@code SecurityAttribute} instance. + * + * @param securityAttribute the value to set + * @return this builder + */ + public Builder securityAttribute( + com.oracle.bmc.securityattribute.model.SecurityAttribute securityAttribute) { + this.securityAttribute = securityAttribute; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(UpdateSecurityAttributeResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + etag(o.getEtag()); + securityAttribute(o.getSecurityAttribute()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public UpdateSecurityAttributeResponse build() { + return new UpdateSecurityAttributeResponse( + __httpStatusCode__, headers, opcRequestId, etag, securityAttribute); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",securityAttribute=").append(String.valueOf(securityAttribute)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateSecurityAttributeResponse)) { + return false; + } + + UpdateSecurityAttributeResponse other = (UpdateSecurityAttributeResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.securityAttribute, other.securityAttribute); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = + (result * PRIME) + + (this.securityAttribute == null ? 43 : this.securityAttribute.hashCode()); + return result; + } +} diff --git a/bmc-securityattribute/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-securityattribute/reflect-config.json b/bmc-securityattribute/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-securityattribute/reflect-config.json new file mode 100644 index 00000000000..2372707baf5 --- /dev/null +++ b/bmc-securityattribute/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-securityattribute/reflect-config.json @@ -0,0 +1,337 @@ +[ + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BaseSecurityAttributeValidator", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BaseSecurityAttributeValidator$ValidatorType", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkDeleteSecurityAttributesDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditResource", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditResource$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeOperationDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeOperationDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.BulkEditSecurityAttributeOperationDetails$OperationType", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.ChangeSecurityAttributeNamespaceCompartmentDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.ChangeSecurityAttributeNamespaceCompartmentDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.CreateSecurityAttributeDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.CreateSecurityAttributeNamespaceDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.DefaultSecurityAttributeValidator", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.DefaultSecurityAttributeValidator$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.EnumSecurityAttributeValidator", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.EnumSecurityAttributeValidator$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttribute", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttribute$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttribute$LifecycleState", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeNamespace$LifecycleState", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeNamespaceSummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeSummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeSummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequest$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestErrorSummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestLogSummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SecurityAttributeWorkRequestSummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.SortOrder", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.UpdateSecurityAttributeNamespaceDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.WorkRequestOperationType", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.WorkRequestResource", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.WorkRequestResource$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.WorkRequestResource$ActionType", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.securityattribute.model.WorkRequestStatus", + "allDeclaredFields": true, + "allDeclaredMethods": true + } +] \ No newline at end of file diff --git a/bmc-securityattribute/src/main/resources/com/oracle/bmc/securityattribute/client.properties b/bmc-securityattribute/src/main/resources/com/oracle/bmc/securityattribute/client.properties new file mode 100644 index 00000000000..28be846b5da --- /dev/null +++ b/bmc-securityattribute/src/main/resources/com/oracle/bmc/securityattribute/client.properties @@ -0,0 +1,9 @@ +# +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +# + +java.client.codegen.version = 2.104 +java.minimum.client.codegen.version.from.client = 2.100 + +# @jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240815") \ No newline at end of file diff --git a/bmc-servicecatalog/pom.xml b/bmc-servicecatalog/pom.xml index 2074cb15269..b2bf7b169fc 100644 --- a/bmc-servicecatalog/pom.xml +++ b/bmc-servicecatalog/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-servicecatalog @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-servicemanagerproxy/pom.xml b/bmc-servicemanagerproxy/pom.xml index ac3c29b6662..ddf744b6116 100644 --- a/bmc-servicemanagerproxy/pom.xml +++ b/bmc-servicemanagerproxy/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-servicemanagerproxy @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-servicemesh/pom.xml b/bmc-servicemesh/pom.xml index f0ed391386d..f824dfd36e1 100644 --- a/bmc-servicemesh/pom.xml +++ b/bmc-servicemesh/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-servicemesh @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-shaded/bmc-shaded-full/pom.xml b/bmc-shaded/bmc-shaded-full/pom.xml index 4d860785a6f..bec979276ab 100644 --- a/bmc-shaded/bmc-shaded-full/pom.xml +++ b/bmc-shaded/bmc-shaded-full/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk-shaded - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-shaded-full @@ -17,15 +17,5 @@ slf4j-api ${slf4j.version} - - org.bouncycastle - bcpkix-jdk15to18 - ${bouncycastle.version} - - - org.bouncycastle - bcprov-jdk15to18 - ${bouncycastle.version} - \ No newline at end of file diff --git a/bmc-shaded/pom.xml b/bmc-shaded/pom.xml index 90f2ce63f47..113a8df422b 100644 --- a/bmc-shaded/pom.xml +++ b/bmc-shaded/pom.xml @@ -5,7 +5,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml diff --git a/bmc-stackmonitoring/pom.xml b/bmc-stackmonitoring/pom.xml index e6e4bfe3acb..2835d016424 100644 --- a/bmc-stackmonitoring/pom.xml +++ b/bmc-stackmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-stackmonitoring @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-streaming/pom.xml b/bmc-streaming/pom.xml index 7a5683d1b4c..71f0fa75eb1 100644 --- a/bmc-streaming/pom.xml +++ b/bmc-streaming/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-streaming @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-tenantmanagercontrolplane/pom.xml b/bmc-tenantmanagercontrolplane/pom.xml index f1293551ae0..c53f62a89f1 100644 --- a/bmc-tenantmanagercontrolplane/pom.xml +++ b/bmc-tenantmanagercontrolplane/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-tenantmanagercontrolplane @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-threatintelligence/pom.xml b/bmc-threatintelligence/pom.xml index e3060f6d910..125759adc94 100644 --- a/bmc-threatintelligence/pom.xml +++ b/bmc-threatintelligence/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-threatintelligence @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-usage/pom.xml b/bmc-usage/pom.xml index e49f3ff24be..64703c2e0f3 100644 --- a/bmc-usage/pom.xml +++ b/bmc-usage/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-usage @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-usageapi/pom.xml b/bmc-usageapi/pom.xml index b1fab110218..ad831cb0bad 100644 --- a/bmc-usageapi/pom.xml +++ b/bmc-usageapi/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-usageapi @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-vault/pom.xml b/bmc-vault/pom.xml index b843baf2d93..399d55206b6 100644 --- a/bmc-vault/pom.xml +++ b/bmc-vault/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-vault @@ -15,12 +15,12 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 com.oracle.oci.sdk oci-java-sdk-workrequests - 3.50.0 + 3.50.1 diff --git a/bmc-vbsinst/pom.xml b/bmc-vbsinst/pom.xml index 15f98a024b6..aefc5442804 100644 --- a/bmc-vbsinst/pom.xml +++ b/bmc-vbsinst/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-vbsinst @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-visualbuilder/pom.xml b/bmc-visualbuilder/pom.xml index 00ece241088..25cb788b9dc 100644 --- a/bmc-visualbuilder/pom.xml +++ b/bmc-visualbuilder/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-visualbuilder @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-vnmonitoring/pom.xml b/bmc-vnmonitoring/pom.xml index b75d0ec676b..0e3dcdd85ae 100644 --- a/bmc-vnmonitoring/pom.xml +++ b/bmc-vnmonitoring/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-vnmonitoring @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-vulnerabilityscanning/pom.xml b/bmc-vulnerabilityscanning/pom.xml index 539334fd363..a1e1044983d 100644 --- a/bmc-vulnerabilityscanning/pom.xml +++ b/bmc-vulnerabilityscanning/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-vulnerabilityscanning @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-waa/pom.xml b/bmc-waa/pom.xml index c936294835e..6027888d31b 100644 --- a/bmc-waa/pom.xml +++ b/bmc-waa/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-waa @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-waas/pom.xml b/bmc-waas/pom.xml index 44b93dee8db..1b3f6ccc8ad 100644 --- a/bmc-waas/pom.xml +++ b/bmc-waas/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-waas @@ -16,7 +16,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-waf/pom.xml b/bmc-waf/pom.xml index e84a5bc1483..3e303c256e1 100644 --- a/bmc-waf/pom.xml +++ b/bmc-waf/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-waf @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 \ No newline at end of file diff --git a/bmc-workrequests/pom.xml b/bmc-workrequests/pom.xml index 5869f3ef27b..1f83be0aa5b 100644 --- a/bmc-workrequests/pom.xml +++ b/bmc-workrequests/pom.xml @@ -4,7 +4,7 @@ com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 ../pom.xml oci-java-sdk-workrequests @@ -15,7 +15,7 @@ com.oracle.oci.sdk oci-java-sdk-common - 3.50.0 + 3.50.1 diff --git a/bmc-zpr/pom.xml b/bmc-zpr/pom.xml new file mode 100644 index 00000000000..e650796b68c --- /dev/null +++ b/bmc-zpr/pom.xml @@ -0,0 +1,21 @@ + + + 4.0.0 + + com.oracle.oci.sdk + oci-java-sdk + 3.50.1 + ../pom.xml + + oci-java-sdk-zpr + Oracle Cloud Infrastructure SDK - Zpr + This project contains the SDK used for Oracle Cloud Infrastructure Zpr + https://docs.cloud.oracle.com/Content/API/SDKDocs/javasdk.htm + + + com.oracle.oci.sdk + oci-java-sdk-common + 3.50.1 + + + \ No newline at end of file diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java new file mode 100644 index 00000000000..908360141ec --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/Zpr.java @@ -0,0 +1,335 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Use the Zero Trust Packet Routing Control Plane API to manage ZPR configuration and policy. See + * the [Zero Trust Packet + * Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/home.htm) + * documentation for more information. This service client uses + * CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER for all the operations by default if no circuit + * breaker configuration is defined by the user. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public interface Zpr extends AutoCloseable { + + /** Rebuilds the client from scratch. Useful to refresh certificates. */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * + * @param endpoint The endpoint of the service. + */ + void setEndpoint(String endpoint); + + /** Gets the set endpoint for REST call (ex, https://www.example.com) */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + * + *

Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the + * endpoint. If the service is not available in this Region, however, an + * IllegalArgumentException will be raised. + * + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + * + *

Note, this will first try to map the region ID to a known Region and call {@link + * #setRegion(Region) setRegion}. + * + *

If no known Region could be determined, it will create an endpoint based on the default + * endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. Set + * realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm + * specific endpoint template, otherwise set it to "false" + * + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint + * template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Initiates the process to onboard ZPR in a root compartment (the root compartment is the + * tenancy). It creates an object of ZPR configuration as part of onboarding. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use CreateConfiguration + * API. + */ + CreateConfigurationResponse createConfiguration(CreateConfigurationRequest request); + + /** + * Creates a ZprPolicy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use CreateZprPolicy + * API. + */ + CreateZprPolicyResponse createZprPolicy(CreateZprPolicyRequest request); + + /** + * Deletes a ZprPolicy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use DeleteZprPolicy + * API. + */ + DeleteZprPolicyResponse deleteZprPolicy(DeleteZprPolicyRequest request); + + /** + * Retrieves the ZPR configuration details for the root compartment (the root compartment is the + * tenancy). Returns ZPR configuration for root compartment (the root compartment is the + * tenancy). + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use GetConfiguration + * API. + */ + GetConfigurationResponse getConfiguration(GetConfigurationRequest request); + + /** + * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * GetZprConfigurationWorkRequest API. + */ + GetZprConfigurationWorkRequestResponse getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request); + + /** + * Gets information about a ZprPolicy. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use GetZprPolicy API. + */ + GetZprPolicyResponse getZprPolicy(GetZprPolicyRequest request); + + /** + * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * GetZprPolicyWorkRequest API. + */ + GetZprPolicyWorkRequestResponse getZprPolicyWorkRequest(GetZprPolicyWorkRequestRequest request); + + /** + * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListZprConfigurationWorkRequestErrors API. + */ + ListZprConfigurationWorkRequestErrorsResponse listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request); + + /** + * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListZprConfigurationWorkRequestLogs API. + */ + ListZprConfigurationWorkRequestLogsResponse listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListZprConfigurationWorkRequests API. + */ + ListZprConfigurationWorkRequestsResponse listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request); + + /** + * Gets a list of ZprPolicies. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use ListZprPolicies + * API. + */ + ListZprPoliciesResponse listZprPolicies(ListZprPoliciesRequest request); + + /** + * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListZprPolicyWorkRequestErrors API. + */ + ListZprPolicyWorkRequestErrorsResponse listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request); + + /** + * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListZprPolicyWorkRequestLogs API. + */ + ListZprPolicyWorkRequestLogsResponse listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use + * ListZprPolicyWorkRequests API. + */ + ListZprPolicyWorkRequestsResponse listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request); + + /** + * Updates a specific ZprPolicy. If updating on statements, the entire list of policy statements + * is required, which will replace the existing policy statements associated with the policy ID. + * + * @param request The request object containing the details to send + * @return A response object containing details about the completed operation + * @throws BmcException when an error occurs. This operation uses + * RetryConfiguration.SDK_DEFAULT_RETRY_CONFIGURATION as default if no retry strategy is + * provided. The specifics of the default retry strategy are described here + * https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/javasdkconcepts.htm#javasdkconcepts_topic_Retries + *

Example: Click here to see how to use UpdateZprPolicy + * API. + */ + UpdateZprPolicyResponse updateZprPolicy(UpdateZprPolicyRequest request); + + /** + * Gets the pre-configured waiters available for resources for this service. + * + * @return The service waiters. + */ + ZprWaiters getWaiters(); + + /** + * Gets the pre-configured paginators available for list operations in this service which may + * return multiple pages of data. These paginators provide an {@link java.lang.Iterable} + * interface so that service responses, or resources/records, can be iterated through without + * having to manually deal with pagination and page tokens. + * + * @return The service paginators. + */ + ZprPaginators getPaginators(); +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java new file mode 100644 index 00000000000..60bce201cc9 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsync.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Use the Zero Trust Packet Routing Control Plane API to manage ZPR configuration and policy. See + * the [Zero Trust Packet + * Routing](https://docs.cloud.oracle.com/iaas/Content/zero-trust-packet-routing/home.htm) + * documentation for more information. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public interface ZprAsync extends AutoCloseable { + + /** Rebuilds the client from scratch. Useful to refresh certificates. */ + void refreshClient(); + + /** + * Sets the endpoint to call (ex, https://www.example.com). + * + * @param endpoint The endpoint of the serice. + */ + void setEndpoint(String endpoint); + + /** Gets the set endpoint for REST call (ex, https://www.example.com) */ + String getEndpoint(); + + /** + * Sets the region to call (ex, Region.US_PHOENIX_1). + * + *

Note, this will call {@link #setEndpoint(String) setEndpoint} after resolving the + * endpoint. If the service is not available in this region, however, an + * IllegalArgumentException will be raised. + * + * @param region The region of the service. + */ + void setRegion(com.oracle.bmc.Region region); + + /** + * Sets the region to call (ex, 'us-phoenix-1'). + * + *

Note, this will first try to map the region ID to a known Region and call {@link + * #setRegion(Region) setRegion}. + * + *

If no known Region could be determined, it will create an endpoint based on the default + * endpoint format ({@link com.oracle.bmc.Region#formatDefaultRegionEndpoint(Service, String)} + * and then call {@link #setEndpoint(String) setEndpoint}. + * + * @param regionId The public region ID. + */ + void setRegion(String regionId); + + /** + * Determines whether realm specific endpoint should be used or not. Set + * realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm + * specific endpoint template, otherwise set it to "false" + * + * @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint + * template + */ + void useRealmSpecificEndpointTemplate(boolean realmSpecificEndpointTemplateEnabled); + + /** + * Initiates the process to onboard ZPR in a root compartment (the root compartment is the + * tenancy). It creates an object of ZPR configuration as part of onboarding. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future createConfiguration( + CreateConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler< + CreateConfigurationRequest, CreateConfigurationResponse> + handler); + + /** + * Creates a ZprPolicy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future createZprPolicy( + CreateZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Deletes a ZprPolicy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future deleteZprPolicy( + DeleteZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Retrieves the ZPR configuration details for the root compartment (the root compartment is the + * tenancy). Returns ZPR configuration for root compartment (the root compartment is the + * tenancy). + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future getConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetZprConfigurationWorkRequestRequest, + GetZprConfigurationWorkRequestResponse> + handler); + + /** + * Gets information about a ZprPolicy. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future getZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Gets the details of a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future getZprPolicyWorkRequest( + GetZprPolicyWorkRequestRequest request, + com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse> + handler); + + /** + * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse> + handler); + + /** + * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse> + handler); + + /** + * Gets a list of ZprPolicies. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future listZprPolicies( + ListZprPoliciesRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); + + /** + * Lists the errors for a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future + listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse> + handler); + + /** + * Lists the logs for a work request. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse> + handler); + + /** + * Lists the work requests in a compartment. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request, + com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse> + handler); + + /** + * Updates a specific ZprPolicy. If updating on statements, the entire list of policy statements + * is required, which will replace the existing policy statements associated with the policy ID. + * + * @param request The request object containing the details to send + * @param handler The request handler to invoke upon completion, may be null. + * @return A Future that can be used to get the response if no AsyncHandler was provided. Note, + * if you provide an AsyncHandler and use the Future, some types of responses (like + * java.io.InputStream) may not be able to be read in both places as the underlying stream + * may only be consumed once. + */ + java.util.concurrent.Future updateZprPolicy( + UpdateZprPolicyRequest request, + com.oracle.bmc.responses.AsyncHandler + handler); +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java new file mode 100644 index 00000000000..203fd379f0a --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprAsyncClient.java @@ -0,0 +1,810 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.util.internal.Validate; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +import java.util.Objects; + +/** + * Async client implementation for Zpr service.
+ * There are two ways to use async client: 1. Use AsyncHandler: using AsyncHandler, if the response + * to the call is an {@link java.io.InputStream}, like getObject Api in object storage service, + * developers need to process the stream in AsyncHandler, and not anywhere else, because the stream + * will be closed right after the AsyncHandler is invoked.
+ * 2. Use Java Future: using Java Future, developers need to close the stream after they are done + * with the Java Future.
+ * Accessing the result should be done in a mutually exclusive manner, either through the Future or + * the AsyncHandler, but not both. If the Future is used, the caller should pass in null as the + * AsyncHandler. If the AsyncHandler is used, it is still safe to use the Future to determine + * whether or not the request was completed via Future.isDone/isCancelled.
+ * Please refer to + * https://github.com/oracle/oci-java-sdk/blob/master/bmc-examples/src/main/java/ResteasyClientWithObjectStorageExample.java + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprAsyncClient extends com.oracle.bmc.http.internal.BaseAsyncClient + implements ZprAsync { + /** Service instance for Zpr. */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("ZPR") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://{service}.{region}.oci.{secondLevelDomain}") + .endpointServiceName("${endpoint-template-prefix}") + .build(); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ZprAsyncClient.class); + + ZprAsyncClient( + com.oracle.bmc.common.ClientBuilderBase builder, + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + super(builder, authenticationDetailsProvider); + } + + /** + * Create a builder for this client. + * + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be + * passed to the {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private Builder(com.oracle.bmc.Service service) { + super(service); + final String packageName = "zpr"; + com.oracle.bmc.internal.Alloy.throwDisabledServiceExceptionIfAppropriate(packageName); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Build the client. + * + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public ZprAsyncClient build( + @jakarta.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + return new ZprAsyncClient(this, authenticationDetailsProvider); + } + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + super.setRegion(region); + } + + @Override + public void setRegion(String regionId) { + super.setRegion(regionId); + } + + @Override + public java.util.concurrent.Future createConfiguration( + CreateConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateConfigurationRequest, CreateConfigurationResponse> + handler) { + Objects.requireNonNull( + request.getCreateConfigurationDetails(), "createConfigurationDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, CreateConfigurationResponse::builder) + .logger(LOG, "createConfiguration") + .serviceDetails("Zpr", "CreateConfiguration", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateConfigurationRequest::builder) + .basePath("/20240301") + .appendPathParam("configuration") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .hasBody() + .handleResponseHeaderString( + "opc-request-id", CreateConfigurationResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + CreateConfigurationResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future createZprPolicy( + CreateZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + CreateZprPolicyRequest, CreateZprPolicyResponse> + handler) { + Objects.requireNonNull( + request.getCreateZprPolicyDetails(), "createZprPolicyDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, CreateZprPolicyResponse::builder) + .logger(LOG, "createZprPolicy") + .serviceDetails("Zpr", "CreateZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .hasBody() + .handleBody( + com.oracle.bmc.zpr.model.ZprPolicy.class, + CreateZprPolicyResponse.Builder::zprPolicy) + .handleResponseHeaderString("location", CreateZprPolicyResponse.Builder::location) + .handleResponseHeaderString( + "content-location", CreateZprPolicyResponse.Builder::contentLocation) + .handleResponseHeaderString( + "opc-request-id", CreateZprPolicyResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", CreateZprPolicyResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future deleteZprPolicy( + DeleteZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + DeleteZprPolicyRequest, DeleteZprPolicyResponse> + handler) { + + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("zprPolicyId", request.getZprPolicyId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, DeleteZprPolicyResponse::builder) + .logger(LOG, "deleteZprPolicy") + .serviceDetails("Zpr", "DeleteZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.DELETE) + .requestBuilder(DeleteZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendPathParam(request.getZprPolicyId()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .handleResponseHeaderString( + "opc-request-id", DeleteZprPolicyResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", DeleteZprPolicyResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future getConfiguration( + GetConfigurationRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetConfigurationRequest, GetConfigurationResponse> + handler) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetConfigurationResponse::builder) + .logger(LOG, "getConfiguration") + .serviceDetails("Zpr", "GetConfiguration", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetConfigurationRequest::builder) + .basePath("/20240301") + .appendPathParam("configuration") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.Configuration.class, + GetConfigurationResponse.Builder::configuration) + .handleResponseHeaderString("etag", GetConfigurationResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", GetConfigurationResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetZprConfigurationWorkRequestRequest, + GetZprConfigurationWorkRequestResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetZprConfigurationWorkRequestResponse::builder) + .logger(LOG, "getZprConfigurationWorkRequest") + .serviceDetails("Zpr", "GetZprConfigurationWorkRequest", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetZprConfigurationWorkRequestRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequest.class, + GetZprConfigurationWorkRequestResponse.Builder::workRequest) + .handleResponseHeaderString( + "etag", GetZprConfigurationWorkRequestResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", + GetZprConfigurationWorkRequestResponse.Builder::opcRequestId) + .handleResponseHeaderInteger( + "retry-after", GetZprConfigurationWorkRequestResponse.Builder::retryAfter) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future getZprPolicy( + GetZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler + handler) { + + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("zprPolicyId", request.getZprPolicyId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetZprPolicyResponse::builder) + .logger(LOG, "getZprPolicy") + .serviceDetails("Zpr", "GetZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendPathParam(request.getZprPolicyId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.ZprPolicy.class, + GetZprPolicyResponse.Builder::zprPolicy) + .handleResponseHeaderString("etag", GetZprPolicyResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", GetZprPolicyResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future getZprPolicyWorkRequest( + GetZprPolicyWorkRequestRequest request, + final com.oracle.bmc.responses.AsyncHandler< + GetZprPolicyWorkRequestRequest, GetZprPolicyWorkRequestResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetZprPolicyWorkRequestResponse::builder) + .logger(LOG, "getZprPolicyWorkRequest") + .serviceDetails("Zpr", "GetZprPolicyWorkRequest", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetZprPolicyWorkRequestRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequest.class, + GetZprPolicyWorkRequestResponse.Builder::workRequest) + .handleResponseHeaderString("etag", GetZprPolicyWorkRequestResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", GetZprPolicyWorkRequestResponse.Builder::opcRequestId) + .handleResponseHeaderInteger( + "retry-after", GetZprPolicyWorkRequestResponse.Builder::retryAfter) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprConfigurationWorkRequestErrorsResponse::builder) + .logger(LOG, "listZprConfigurationWorkRequestErrors") + .serviceDetails("Zpr", "ListZprConfigurationWorkRequestErrors", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprConfigurationWorkRequestErrorsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("errors") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection.class, + ListZprConfigurationWorkRequestErrorsResponse.Builder + ::workRequestErrorCollection) + .handleResponseHeaderString( + "opc-next-page", + ListZprConfigurationWorkRequestErrorsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprConfigurationWorkRequestErrorsResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprConfigurationWorkRequestLogsResponse::builder) + .logger(LOG, "listZprConfigurationWorkRequestLogs") + .serviceDetails("Zpr", "ListZprConfigurationWorkRequestLogs", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprConfigurationWorkRequestLogsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("logs") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection.class, + ListZprConfigurationWorkRequestLogsResponse.Builder + ::workRequestLogEntryCollection) + .handleResponseHeaderString( + "opc-next-page", + ListZprConfigurationWorkRequestLogsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprConfigurationWorkRequestLogsResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse> + handler) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprConfigurationWorkRequestsResponse::builder) + .logger(LOG, "listZprConfigurationWorkRequests") + .serviceDetails("Zpr", "ListZprConfigurationWorkRequests", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprConfigurationWorkRequestsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("workRequestId", request.getWorkRequestId()) + .appendEnumQueryParam("status", request.getStatus()) + .appendQueryParam("resourceId", request.getResourceId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection.class, + ListZprConfigurationWorkRequestsResponse.Builder + ::workRequestSummaryCollection) + .handleResponseHeaderString( + "opc-request-id", + ListZprConfigurationWorkRequestsResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", + ListZprConfigurationWorkRequestsResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future listZprPolicies( + ListZprPoliciesRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPoliciesRequest, ListZprPoliciesResponse> + handler) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPoliciesResponse::builder) + .logger(LOG, "listZprPolicies") + .serviceDetails("Zpr", "ListZprPolicies", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPoliciesRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendEnumQueryParam("lifecycleState", request.getLifecycleState()) + .appendQueryParam("name", request.getName()) + .appendQueryParam("id", request.getId()) + .appendQueryParam("limit", request.getLimit()) + .appendQueryParam("page", request.getPage()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.ZprPolicyCollection.class, + ListZprPoliciesResponse.Builder::zprPolicyCollection) + .handleResponseHeaderString( + "opc-request-id", ListZprPoliciesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", ListZprPoliciesResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPolicyWorkRequestErrorsResponse::builder) + .logger(LOG, "listZprPolicyWorkRequestErrors") + .serviceDetails("Zpr", "ListZprPolicyWorkRequestErrors", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPolicyWorkRequestErrorsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("errors") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection.class, + ListZprPolicyWorkRequestErrorsResponse.Builder::workRequestErrorCollection) + .handleResponseHeaderString( + "opc-next-page", + ListZprPolicyWorkRequestErrorsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprPolicyWorkRequestErrorsResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future + listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse> + handler) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPolicyWorkRequestLogsResponse::builder) + .logger(LOG, "listZprPolicyWorkRequestLogs") + .serviceDetails("Zpr", "ListZprPolicyWorkRequestLogs", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPolicyWorkRequestLogsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("logs") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection.class, + ListZprPolicyWorkRequestLogsResponse.Builder::workRequestLogEntryCollection) + .handleResponseHeaderString( + "opc-next-page", ListZprPolicyWorkRequestLogsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprPolicyWorkRequestLogsResponse.Builder::opcRequestId) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request, + final com.oracle.bmc.responses.AsyncHandler< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse> + handler) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPolicyWorkRequestsResponse::builder) + .logger(LOG, "listZprPolicyWorkRequests") + .serviceDetails("Zpr", "ListZprPolicyWorkRequests", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPolicyWorkRequestsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("workRequestId", request.getWorkRequestId()) + .appendEnumQueryParam("status", request.getStatus()) + .appendQueryParam("resourceId", request.getResourceId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection.class, + ListZprPolicyWorkRequestsResponse.Builder::workRequestSummaryCollection) + .handleResponseHeaderString( + "opc-request-id", ListZprPolicyWorkRequestsResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", ListZprPolicyWorkRequestsResponse.Builder::opcNextPage) + .callAsync(handler); + } + + @Override + public java.util.concurrent.Future updateZprPolicy( + UpdateZprPolicyRequest request, + final com.oracle.bmc.responses.AsyncHandler< + UpdateZprPolicyRequest, UpdateZprPolicyResponse> + handler) { + + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + Objects.requireNonNull( + request.getUpdateZprPolicyDetails(), "updateZprPolicyDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("zprPolicyId", request.getZprPolicyId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, UpdateZprPolicyResponse::builder) + .logger(LOG, "updateZprPolicy") + .serviceDetails("Zpr", "UpdateZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.PUT) + .requestBuilder(UpdateZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendPathParam(request.getZprPolicyId()) + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .hasBody() + .handleResponseHeaderString( + "opc-request-id", UpdateZprPolicyResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", UpdateZprPolicyResponse.Builder::opcWorkRequestId) + .callAsync(handler); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(builder(), authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(builder().configuration(configuration), authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + builder().configuration(configuration).clientConfigurator(clientConfigurator), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint), + authenticationDetailsProvider); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @param signingStrategyRequestSignerFactories {@link + * Builder#signingStrategyRequestSignerFactories} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprAsyncClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint) + .signingStrategyRequestSignerFactories( + signingStrategyRequestSignerFactories), + authenticationDetailsProvider); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java new file mode 100644 index 00000000000..42cd1fe5743 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprClient.java @@ -0,0 +1,843 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.util.internal.Validate; +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; +import com.oracle.bmc.circuitbreaker.CircuitBreakerConfiguration; +import com.oracle.bmc.util.CircuitBreakerUtils; + +import java.util.Objects; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprClient extends com.oracle.bmc.http.internal.BaseSyncClient implements Zpr { + /** Service instance for Zpr. */ + public static final com.oracle.bmc.Service SERVICE = + com.oracle.bmc.Services.serviceBuilder() + .serviceName("ZPR") + .serviceEndpointPrefix("") + .serviceEndpointTemplate("https://{service}.{region}.oci.{secondLevelDomain}") + .endpointServiceName("${endpoint-template-prefix}") + .build(); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ZprClient.class); + + private final ZprWaiters waiters; + + private final ZprPaginators paginators; + + ZprClient( + com.oracle.bmc.common.ClientBuilderBase builder, + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + java.util.concurrent.ExecutorService executorService) { + super( + builder, + authenticationDetailsProvider, + CircuitBreakerUtils.DEFAULT_CIRCUIT_BREAKER_CONFIGURATION); + + if (executorService == null) { + // up to 50 (core) threads, time out after 60s idle, all daemon + java.util.concurrent.ThreadPoolExecutor threadPoolExecutor = + new java.util.concurrent.ThreadPoolExecutor( + 50, + 50, + 60L, + java.util.concurrent.TimeUnit.SECONDS, + new java.util.concurrent.LinkedBlockingQueue(), + com.oracle.bmc.internal.ClientThreadFactory.builder() + .isDaemon(true) + .nameFormat("Zpr-waiters-%d") + .build()); + threadPoolExecutor.allowCoreThreadTimeOut(true); + + executorService = threadPoolExecutor; + } + this.waiters = new ZprWaiters(executorService, this); + + this.paginators = new ZprPaginators(this); + } + + /** + * Create a builder for this client. + * + * @return builder + */ + public static Builder builder() { + return new Builder(SERVICE); + } + + /** + * Builder class for this client. The "authenticationDetailsProvider" is required and must be + * passed to the {@link #build(AbstractAuthenticationDetailsProvider)} method. + */ + public static class Builder + extends com.oracle.bmc.common.RegionalClientBuilder { + private java.util.concurrent.ExecutorService executorService; + + private Builder(com.oracle.bmc.Service service) { + super(service); + final String packageName = "zpr"; + com.oracle.bmc.internal.Alloy.throwDisabledServiceExceptionIfAppropriate(packageName); + requestSignerFactory = + new com.oracle.bmc.http.signing.internal.DefaultRequestSignerFactory( + com.oracle.bmc.http.signing.SigningStrategy.STANDARD); + } + + /** + * Set the ExecutorService for the client to be created. + * + * @param executorService executorService + * @return this builder + */ + public Builder executorService(java.util.concurrent.ExecutorService executorService) { + this.executorService = executorService; + return this; + } + + /** + * Build the client. + * + * @param authenticationDetailsProvider authentication details provider + * @return the client + */ + public ZprClient build( + @jakarta.annotation.Nonnull + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider + authenticationDetailsProvider) { + return new ZprClient(this, authenticationDetailsProvider, executorService); + } + } + + @Override + public void setRegion(com.oracle.bmc.Region region) { + super.setRegion(region); + } + + @Override + public void setRegion(String regionId) { + super.setRegion(regionId); + } + + @Override + public CreateConfigurationResponse createConfiguration(CreateConfigurationRequest request) { + Objects.requireNonNull( + request.getCreateConfigurationDetails(), "createConfigurationDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, CreateConfigurationResponse::builder) + .logger(LOG, "createConfiguration") + .serviceDetails("Zpr", "CreateConfiguration", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateConfigurationRequest::builder) + .basePath("/20240301") + .appendPathParam("configuration") + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .operationUsesDefaultRetries() + .hasBody() + .handleResponseHeaderString( + "opc-request-id", CreateConfigurationResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", + CreateConfigurationResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public CreateZprPolicyResponse createZprPolicy(CreateZprPolicyRequest request) { + Objects.requireNonNull( + request.getCreateZprPolicyDetails(), "createZprPolicyDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, CreateZprPolicyResponse::builder) + .logger(LOG, "createZprPolicy") + .serviceDetails("Zpr", "CreateZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.POST) + .requestBuilder(CreateZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .operationUsesDefaultRetries() + .hasBody() + .handleBody( + com.oracle.bmc.zpr.model.ZprPolicy.class, + CreateZprPolicyResponse.Builder::zprPolicy) + .handleResponseHeaderString("location", CreateZprPolicyResponse.Builder::location) + .handleResponseHeaderString( + "content-location", CreateZprPolicyResponse.Builder::contentLocation) + .handleResponseHeaderString( + "opc-request-id", CreateZprPolicyResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", CreateZprPolicyResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public DeleteZprPolicyResponse deleteZprPolicy(DeleteZprPolicyRequest request) { + + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("zprPolicyId", request.getZprPolicyId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, DeleteZprPolicyResponse::builder) + .logger(LOG, "deleteZprPolicy") + .serviceDetails("Zpr", "DeleteZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.DELETE) + .requestBuilder(DeleteZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendPathParam(request.getZprPolicyId()) + .accept("application/json") + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .operationUsesDefaultRetries() + .handleResponseHeaderString( + "opc-request-id", DeleteZprPolicyResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", DeleteZprPolicyResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public GetConfigurationResponse getConfiguration(GetConfigurationRequest request) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetConfigurationResponse::builder) + .logger(LOG, "getConfiguration") + .serviceDetails("Zpr", "GetConfiguration", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetConfigurationRequest::builder) + .basePath("/20240301") + .appendPathParam("configuration") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.Configuration.class, + GetConfigurationResponse.Builder::configuration) + .handleResponseHeaderString("etag", GetConfigurationResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", GetConfigurationResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public GetZprConfigurationWorkRequestResponse getZprConfigurationWorkRequest( + GetZprConfigurationWorkRequestRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetZprConfigurationWorkRequestResponse::builder) + .logger(LOG, "getZprConfigurationWorkRequest") + .serviceDetails("Zpr", "GetZprConfigurationWorkRequest", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetZprConfigurationWorkRequestRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequest.class, + GetZprConfigurationWorkRequestResponse.Builder::workRequest) + .handleResponseHeaderString( + "etag", GetZprConfigurationWorkRequestResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", + GetZprConfigurationWorkRequestResponse.Builder::opcRequestId) + .handleResponseHeaderInteger( + "retry-after", GetZprConfigurationWorkRequestResponse.Builder::retryAfter) + .callSync(); + } + + @Override + public GetZprPolicyResponse getZprPolicy(GetZprPolicyRequest request) { + + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("zprPolicyId", request.getZprPolicyId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetZprPolicyResponse::builder) + .logger(LOG, "getZprPolicy") + .serviceDetails("Zpr", "GetZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendPathParam(request.getZprPolicyId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.ZprPolicy.class, + GetZprPolicyResponse.Builder::zprPolicy) + .handleResponseHeaderString("etag", GetZprPolicyResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", GetZprPolicyResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public GetZprPolicyWorkRequestResponse getZprPolicyWorkRequest( + GetZprPolicyWorkRequestRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, GetZprPolicyWorkRequestResponse::builder) + .logger(LOG, "getZprPolicyWorkRequest") + .serviceDetails("Zpr", "GetZprPolicyWorkRequest", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(GetZprPolicyWorkRequestRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequest.class, + GetZprPolicyWorkRequestResponse.Builder::workRequest) + .handleResponseHeaderString("etag", GetZprPolicyWorkRequestResponse.Builder::etag) + .handleResponseHeaderString( + "opc-request-id", GetZprPolicyWorkRequestResponse.Builder::opcRequestId) + .handleResponseHeaderInteger( + "retry-after", GetZprPolicyWorkRequestResponse.Builder::retryAfter) + .callSync(); + } + + @Override + public ListZprConfigurationWorkRequestErrorsResponse listZprConfigurationWorkRequestErrors( + ListZprConfigurationWorkRequestErrorsRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprConfigurationWorkRequestErrorsResponse::builder) + .logger(LOG, "listZprConfigurationWorkRequestErrors") + .serviceDetails("Zpr", "ListZprConfigurationWorkRequestErrors", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprConfigurationWorkRequestErrorsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("errors") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection.class, + ListZprConfigurationWorkRequestErrorsResponse.Builder + ::workRequestErrorCollection) + .handleResponseHeaderString( + "opc-next-page", + ListZprConfigurationWorkRequestErrorsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprConfigurationWorkRequestErrorsResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public ListZprConfigurationWorkRequestLogsResponse listZprConfigurationWorkRequestLogs( + ListZprConfigurationWorkRequestLogsRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprConfigurationWorkRequestLogsResponse::builder) + .logger(LOG, "listZprConfigurationWorkRequestLogs") + .serviceDetails("Zpr", "ListZprConfigurationWorkRequestLogs", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprConfigurationWorkRequestLogsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("logs") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection.class, + ListZprConfigurationWorkRequestLogsResponse.Builder + ::workRequestLogEntryCollection) + .handleResponseHeaderString( + "opc-next-page", + ListZprConfigurationWorkRequestLogsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprConfigurationWorkRequestLogsResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public ListZprConfigurationWorkRequestsResponse listZprConfigurationWorkRequests( + ListZprConfigurationWorkRequestsRequest request) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprConfigurationWorkRequestsResponse::builder) + .logger(LOG, "listZprConfigurationWorkRequests") + .serviceDetails("Zpr", "ListZprConfigurationWorkRequests", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprConfigurationWorkRequestsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprConfigurationWorkRequests") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("workRequestId", request.getWorkRequestId()) + .appendEnumQueryParam("status", request.getStatus()) + .appendQueryParam("resourceId", request.getResourceId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection.class, + ListZprConfigurationWorkRequestsResponse.Builder + ::workRequestSummaryCollection) + .handleResponseHeaderString( + "opc-request-id", + ListZprConfigurationWorkRequestsResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", + ListZprConfigurationWorkRequestsResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public ListZprPoliciesResponse listZprPolicies(ListZprPoliciesRequest request) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPoliciesResponse::builder) + .logger(LOG, "listZprPolicies") + .serviceDetails("Zpr", "ListZprPolicies", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPoliciesRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendEnumQueryParam("lifecycleState", request.getLifecycleState()) + .appendQueryParam("name", request.getName()) + .appendQueryParam("id", request.getId()) + .appendQueryParam("limit", request.getLimit()) + .appendQueryParam("page", request.getPage()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.ZprPolicyCollection.class, + ListZprPoliciesResponse.Builder::zprPolicyCollection) + .handleResponseHeaderString( + "opc-request-id", ListZprPoliciesResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", ListZprPoliciesResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public ListZprPolicyWorkRequestErrorsResponse listZprPolicyWorkRequestErrors( + ListZprPolicyWorkRequestErrorsRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPolicyWorkRequestErrorsResponse::builder) + .logger(LOG, "listZprPolicyWorkRequestErrors") + .serviceDetails("Zpr", "ListZprPolicyWorkRequestErrors", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPolicyWorkRequestErrorsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("errors") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection.class, + ListZprPolicyWorkRequestErrorsResponse.Builder::workRequestErrorCollection) + .handleResponseHeaderString( + "opc-next-page", + ListZprPolicyWorkRequestErrorsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprPolicyWorkRequestErrorsResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public ListZprPolicyWorkRequestLogsResponse listZprPolicyWorkRequestLogs( + ListZprPolicyWorkRequestLogsRequest request) { + + Validate.notBlank(request.getWorkRequestId(), "workRequestId must not be blank"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("workRequestId", request.getWorkRequestId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPolicyWorkRequestLogsResponse::builder) + .logger(LOG, "listZprPolicyWorkRequestLogs") + .serviceDetails("Zpr", "ListZprPolicyWorkRequestLogs", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPolicyWorkRequestLogsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendPathParam(request.getWorkRequestId()) + .appendPathParam("logs") + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection.class, + ListZprPolicyWorkRequestLogsResponse.Builder::workRequestLogEntryCollection) + .handleResponseHeaderString( + "opc-next-page", ListZprPolicyWorkRequestLogsResponse.Builder::opcNextPage) + .handleResponseHeaderString( + "opc-request-id", + ListZprPolicyWorkRequestLogsResponse.Builder::opcRequestId) + .callSync(); + } + + @Override + public ListZprPolicyWorkRequestsResponse listZprPolicyWorkRequests( + ListZprPolicyWorkRequestsRequest request) { + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, ListZprPolicyWorkRequestsResponse::builder) + .logger(LOG, "listZprPolicyWorkRequests") + .serviceDetails("Zpr", "ListZprPolicyWorkRequests", "") + .method(com.oracle.bmc.http.client.Method.GET) + .requestBuilder(ListZprPolicyWorkRequestsRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicyWorkRequests") + .appendQueryParam("compartmentId", request.getCompartmentId()) + .appendQueryParam("workRequestId", request.getWorkRequestId()) + .appendEnumQueryParam("status", request.getStatus()) + .appendQueryParam("resourceId", request.getResourceId()) + .appendQueryParam("page", request.getPage()) + .appendQueryParam("limit", request.getLimit()) + .appendEnumQueryParam("sortOrder", request.getSortOrder()) + .appendEnumQueryParam("sortBy", request.getSortBy()) + .accept("application/json") + .appendHeader("opc-request-id", request.getOpcRequestId()) + .operationUsesDefaultRetries() + .handleBody( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection.class, + ListZprPolicyWorkRequestsResponse.Builder::workRequestSummaryCollection) + .handleResponseHeaderString( + "opc-request-id", ListZprPolicyWorkRequestsResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-next-page", ListZprPolicyWorkRequestsResponse.Builder::opcNextPage) + .callSync(); + } + + @Override + public UpdateZprPolicyResponse updateZprPolicy(UpdateZprPolicyRequest request) { + + Validate.notBlank(request.getZprPolicyId(), "zprPolicyId must not be blank"); + Objects.requireNonNull( + request.getUpdateZprPolicyDetails(), "updateZprPolicyDetails is required"); + + java.util.Map requiredParametersMap = new java.util.HashMap<>(); + requiredParametersMap.put("zprPolicyId", request.getZprPolicyId()); + this.populateServiceParametersInEndpoint(this.getEndpoint(), requiredParametersMap); + + return clientCall(request, UpdateZprPolicyResponse::builder) + .logger(LOG, "updateZprPolicy") + .serviceDetails("Zpr", "UpdateZprPolicy", "") + .method(com.oracle.bmc.http.client.Method.PUT) + .requestBuilder(UpdateZprPolicyRequest::builder) + .basePath("/20240301") + .appendPathParam("zprPolicies") + .appendPathParam(request.getZprPolicyId()) + .accept("application/json") + .appendHeader("opc-retry-token", request.getOpcRetryToken()) + .appendHeader("if-match", request.getIfMatch()) + .appendHeader("opc-request-id", request.getOpcRequestId()) + .appendHeader("opc-dry-run", request.getOpcDryRun()) + .operationUsesDefaultRetries() + .hasBody() + .handleResponseHeaderString( + "opc-request-id", UpdateZprPolicyResponse.Builder::opcRequestId) + .handleResponseHeaderString( + "opc-work-request-id", UpdateZprPolicyResponse.Builder::opcWorkRequestId) + .callSync(); + } + + @Override + public ZprWaiters getWaiters() { + return waiters; + } + + @Override + public ZprPaginators getPaginators() { + return paginators; + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider) { + this(builder(), authenticationDetailsProvider, null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration) { + this(builder().configuration(configuration), authenticationDetailsProvider, null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.BasicAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator) { + this( + builder().configuration(configuration).clientConfigurator(clientConfigurator), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @param signingStrategyRequestSignerFactories {@link + * Builder#signingStrategyRequestSignerFactories} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint) + .signingStrategyRequestSignerFactories( + signingStrategyRequestSignerFactories), + authenticationDetailsProvider, + null); + } + + /** + * Create a new client instance. + * + * @param authenticationDetailsProvider The authentication details (see {@link Builder#build}) + * @param configuration {@link Builder#configuration} + * @param clientConfigurator {@link Builder#clientConfigurator} + * @param defaultRequestSignerFactory {@link Builder#requestSignerFactory} + * @param additionalClientConfigurators {@link Builder#additionalClientConfigurators} + * @param endpoint {@link Builder#endpoint} + * @param signingStrategyRequestSignerFactories {@link + * Builder#signingStrategyRequestSignerFactories} + * @param executorService {@link Builder#executorService} + * @deprecated Use the {@link #builder() builder} instead. + */ + @Deprecated + public ZprClient( + com.oracle.bmc.auth.AbstractAuthenticationDetailsProvider authenticationDetailsProvider, + com.oracle.bmc.ClientConfiguration configuration, + com.oracle.bmc.http.ClientConfigurator clientConfigurator, + com.oracle.bmc.http.signing.RequestSignerFactory defaultRequestSignerFactory, + java.util.Map< + com.oracle.bmc.http.signing.SigningStrategy, + com.oracle.bmc.http.signing.RequestSignerFactory> + signingStrategyRequestSignerFactories, + java.util.List additionalClientConfigurators, + String endpoint, + java.util.concurrent.ExecutorService executorService) { + this( + builder() + .configuration(configuration) + .clientConfigurator(clientConfigurator) + .requestSignerFactory(defaultRequestSignerFactory) + .additionalClientConfigurators(additionalClientConfigurators) + .endpoint(endpoint) + .signingStrategyRequestSignerFactories( + signingStrategyRequestSignerFactories), + authenticationDetailsProvider, + executorService); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java new file mode 100644 index 00000000000..91b1b459af5 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprPaginators.java @@ -0,0 +1,920 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Collection of helper methods that can be used to provide an {@link java.lang.Iterable} interface + * to any list operations of Zpr where multiple pages of data may be fetched. Two styles of + * iteration are supported: + * + *

    + *
  • Iterating over the Response objects returned by the list operation. These are referred to + * as ResponseIterators, and the methods are suffixed with ResponseIterator. For example: + * listUsersResponseIterator + *
  • Iterating over the resources/records being listed. These are referred to as + * RecordIterators, and the methods are suffixed with RecordIterator. For example: + * listUsersRecordIterator + *
+ * + * These iterables abstract away the need to write code to manually handle pagination via looping + * and using the page tokens. They will automatically fetch more data from the service when + * required. + * + *

As an example, if we were using the ListUsers operation in IdentityService, then the {@link + * java.lang.Iterable} returned by calling a ResponseIterator method would iterate over the + * ListUsersResponse objects returned by each ListUsers call, whereas the {@link java.lang.Iterable} + * returned by calling a RecordIterator method would iterate over the User records and we don't have + * to deal with ListUsersResponse objects at all. In either case, pagination will be automatically + * handled so we can iterate until there are no more responses or no more resources/records + * available. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprPaginators { + private final Zpr client; + + public ZprPaginators(Zpr client) { + this.client = client; + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprConfigurationWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listZprConfigurationWorkRequestErrorsResponseIterator( + final ListZprConfigurationWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprConfigurationWorkRequestErrorsRequest.Builder, + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestErrorsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest.Builder get() { + return ListZprConfigurationWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder>, + ListZprConfigurationWorkRequestErrorsRequest>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>() { + @Override + public ListZprConfigurationWorkRequestErrorsResponse apply( + ListZprConfigurationWorkRequestErrorsRequest request) { + return client.listZprConfigurationWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestError} objects contained in responses from the + * listZprConfigurationWorkRequestErrors operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestError} objects contained in responses received from + * the service. + */ + public Iterable + listZprConfigurationWorkRequestErrorsRecordIterator( + final ListZprConfigurationWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprConfigurationWorkRequestErrorsRequest.Builder, + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse, + com.oracle.bmc.zpr.model.WorkRequestError>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestErrorsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest.Builder get() { + return ListZprConfigurationWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder>, + ListZprConfigurationWorkRequestErrorsRequest>() { + @Override + public ListZprConfigurationWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsRequest, + ListZprConfigurationWorkRequestErrorsResponse>() { + @Override + public ListZprConfigurationWorkRequestErrorsResponse apply( + ListZprConfigurationWorkRequestErrorsRequest request) { + return client.listZprConfigurationWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprConfigurationWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprConfigurationWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listZprConfigurationWorkRequestLogsResponseIterator( + final ListZprConfigurationWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprConfigurationWorkRequestLogsRequest.Builder, + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestLogsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest.Builder get() { + return ListZprConfigurationWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder>, + ListZprConfigurationWorkRequestLogsRequest>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>() { + @Override + public ListZprConfigurationWorkRequestLogsResponse apply( + ListZprConfigurationWorkRequestLogsRequest request) { + return client.listZprConfigurationWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects contained in responses from the + * listZprConfigurationWorkRequestLogs operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects contained in responses received + * from the service. + */ + public Iterable + listZprConfigurationWorkRequestLogsRecordIterator( + final ListZprConfigurationWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprConfigurationWorkRequestLogsRequest.Builder, + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse, + com.oracle.bmc.zpr.model.WorkRequestLogEntry>( + new java.util.function.Supplier< + ListZprConfigurationWorkRequestLogsRequest.Builder>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest.Builder get() { + return ListZprConfigurationWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder>, + ListZprConfigurationWorkRequestLogsRequest>() { + @Override + public ListZprConfigurationWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsRequest, + ListZprConfigurationWorkRequestLogsResponse>() { + @Override + public ListZprConfigurationWorkRequestLogsResponse apply( + ListZprConfigurationWorkRequestLogsRequest request) { + return client.listZprConfigurationWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestLogsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprConfigurationWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprConfigurationWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listZprConfigurationWorkRequestsResponseIterator( + final ListZprConfigurationWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprConfigurationWorkRequestsRequest.Builder, + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprConfigurationWorkRequestsRequest.Builder get() { + return ListZprConfigurationWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder>, + ListZprConfigurationWorkRequestsRequest>() { + @Override + public ListZprConfigurationWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>() { + @Override + public ListZprConfigurationWorkRequestsResponse apply( + ListZprConfigurationWorkRequestsRequest request) { + return client.listZprConfigurationWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestSummary} objects contained in responses from the + * listZprConfigurationWorkRequests operation. This iterable will fetch more data from the + * server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestSummary} objects contained in responses received from + * the service. + */ + public Iterable + listZprConfigurationWorkRequestsRecordIterator( + final ListZprConfigurationWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprConfigurationWorkRequestsRequest.Builder, + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse, + com.oracle.bmc.zpr.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListZprConfigurationWorkRequestsRequest.Builder get() { + return ListZprConfigurationWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsResponse, String>() { + @Override + public String apply(ListZprConfigurationWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder>, + ListZprConfigurationWorkRequestsRequest>() { + @Override + public ListZprConfigurationWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprConfigurationWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsRequest, + ListZprConfigurationWorkRequestsResponse>() { + @Override + public ListZprConfigurationWorkRequestsResponse apply( + ListZprConfigurationWorkRequestsRequest request) { + return client.listZprConfigurationWorkRequests(request); + } + }, + new java.util.function.Function< + ListZprConfigurationWorkRequestsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprConfigurationWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprPolicies operation. This iterable will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable listZprPoliciesResponseIterator( + final ListZprPoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPoliciesRequest.Builder, ListZprPoliciesRequest, ListZprPoliciesResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPoliciesRequest.Builder get() { + return ListZprPoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder>, + ListZprPoliciesRequest>() { + @Override + public ListZprPoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListZprPoliciesResponse apply(ListZprPoliciesRequest request) { + return client.listZprPolicies(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.ZprPolicySummary} objects contained in responses from the + * listZprPolicies operation. This iterable will fetch more data from the server as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.ZprPolicySummary} objects contained in responses received from + * the service. + */ + public Iterable listZprPoliciesRecordIterator( + final ListZprPoliciesRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPoliciesRequest.Builder, + ListZprPoliciesRequest, + ListZprPoliciesResponse, + com.oracle.bmc.zpr.model.ZprPolicySummary>( + new java.util.function.Supplier() { + @Override + public ListZprPoliciesRequest.Builder get() { + return ListZprPoliciesRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPoliciesResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder>, + ListZprPoliciesRequest>() { + @Override + public ListZprPoliciesRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPoliciesRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function() { + @Override + public ListZprPoliciesResponse apply(ListZprPoliciesRequest request) { + return client.listZprPolicies(request); + } + }, + new java.util.function.Function< + ListZprPoliciesResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPoliciesResponse response) { + return response.getZprPolicyCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprPolicyWorkRequestErrors operation. This iterable will fetch more data from the server + * as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listZprPolicyWorkRequestErrorsResponseIterator( + final ListZprPolicyWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPolicyWorkRequestErrorsRequest.Builder, + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestErrorsRequest.Builder get() { + return ListZprPolicyWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder>, + ListZprPolicyWorkRequestErrorsRequest>() { + @Override + public ListZprPolicyWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse>() { + @Override + public ListZprPolicyWorkRequestErrorsResponse apply( + ListZprPolicyWorkRequestErrorsRequest request) { + return client.listZprPolicyWorkRequestErrors(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestError} objects contained in responses from the + * listZprPolicyWorkRequestErrors operation. This iterable will fetch more data from the server + * as needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestError} objects contained in responses received from + * the service. + */ + public Iterable + listZprPolicyWorkRequestErrorsRecordIterator( + final ListZprPolicyWorkRequestErrorsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPolicyWorkRequestErrorsRequest.Builder, + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse, + com.oracle.bmc.zpr.model.WorkRequestError>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestErrorsRequest.Builder get() { + return ListZprPolicyWorkRequestErrorsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestErrorsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder>, + ListZprPolicyWorkRequestErrorsRequest>() { + @Override + public ListZprPolicyWorkRequestErrorsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestErrorsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestErrorsRequest, + ListZprPolicyWorkRequestErrorsResponse>() { + @Override + public ListZprPolicyWorkRequestErrorsResponse apply( + ListZprPolicyWorkRequestErrorsRequest request) { + return client.listZprPolicyWorkRequestErrors(request); + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestErrorsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPolicyWorkRequestErrorsResponse response) { + return response.getWorkRequestErrorCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprPolicyWorkRequestLogs operation. This iterable will fetch more data from the server as + * needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable + listZprPolicyWorkRequestLogsResponseIterator( + final ListZprPolicyWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPolicyWorkRequestLogsRequest.Builder, + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestLogsRequest.Builder get() { + return ListZprPolicyWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder>, + ListZprPolicyWorkRequestLogsRequest>() { + @Override + public ListZprPolicyWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>() { + @Override + public ListZprPolicyWorkRequestLogsResponse apply( + ListZprPolicyWorkRequestLogsRequest request) { + return client.listZprPolicyWorkRequestLogs(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects contained in responses from the + * listZprPolicyWorkRequestLogs operation. This iterable will fetch more data from the server as + * needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestLogEntry} objects contained in responses received + * from the service. + */ + public Iterable + listZprPolicyWorkRequestLogsRecordIterator( + final ListZprPolicyWorkRequestLogsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPolicyWorkRequestLogsRequest.Builder, + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse, + com.oracle.bmc.zpr.model.WorkRequestLogEntry>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestLogsRequest.Builder get() { + return ListZprPolicyWorkRequestLogsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestLogsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder>, + ListZprPolicyWorkRequestLogsRequest>() { + @Override + public ListZprPolicyWorkRequestLogsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestLogsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestLogsRequest, + ListZprPolicyWorkRequestLogsResponse>() { + @Override + public ListZprPolicyWorkRequestLogsResponse apply( + ListZprPolicyWorkRequestLogsRequest request) { + return client.listZprPolicyWorkRequestLogs(request); + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestLogsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPolicyWorkRequestLogsResponse response) { + return response.getWorkRequestLogEntryCollection().getItems(); + } + }); + } + + /** + * Creates a new iterable which will iterate over the responses received from the + * listZprPolicyWorkRequests operation. This iterable will fetch more data from the server as + * needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the responses + * received from the service. + */ + public Iterable listZprPolicyWorkRequestsResponseIterator( + final ListZprPolicyWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseIterable< + ListZprPolicyWorkRequestsRequest.Builder, + ListZprPolicyWorkRequestsRequest, + ListZprPolicyWorkRequestsResponse>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestsRequest.Builder get() { + return ListZprPolicyWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder>, + ListZprPolicyWorkRequestsRequest>() { + @Override + public ListZprPolicyWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse>() { + @Override + public ListZprPolicyWorkRequestsResponse apply( + ListZprPolicyWorkRequestsRequest request) { + return client.listZprPolicyWorkRequests(request); + } + }); + } + + /** + * Creates a new iterable which will iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestSummary} objects contained in responses from the + * listZprPolicyWorkRequests operation. This iterable will fetch more data from the server as + * needed. + * + * @param request a request which can be sent to the service operation + * @return an {@link java.lang.Iterable} which can be used to iterate over the {@link + * com.oracle.bmc.zpr.model.WorkRequestSummary} objects contained in responses received from + * the service. + */ + public Iterable + listZprPolicyWorkRequestsRecordIterator( + final ListZprPolicyWorkRequestsRequest request) { + return new com.oracle.bmc.paginator.internal.ResponseRecordIterable< + ListZprPolicyWorkRequestsRequest.Builder, + ListZprPolicyWorkRequestsRequest, + ListZprPolicyWorkRequestsResponse, + com.oracle.bmc.zpr.model.WorkRequestSummary>( + new java.util.function.Supplier() { + @Override + public ListZprPolicyWorkRequestsRequest.Builder get() { + return ListZprPolicyWorkRequestsRequest.builder().copy(request); + } + }, + new java.util.function.Function() { + @Override + public String apply(ListZprPolicyWorkRequestsResponse response) { + return response.getOpcNextPage(); + } + }, + new java.util.function.Function< + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder>, + ListZprPolicyWorkRequestsRequest>() { + @Override + public ListZprPolicyWorkRequestsRequest apply( + com.oracle.bmc.paginator.internal.RequestBuilderAndToken< + ListZprPolicyWorkRequestsRequest.Builder> + input) { + if (input.getNextPageToken() == null) { + return input.getRequestBuilder().build(); + } else { + return input.getRequestBuilder() + .page(input.getNextPageToken().orElse(null)) + .build(); + } + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestsRequest, ListZprPolicyWorkRequestsResponse>() { + @Override + public ListZprPolicyWorkRequestsResponse apply( + ListZprPolicyWorkRequestsRequest request) { + return client.listZprPolicyWorkRequests(request); + } + }, + new java.util.function.Function< + ListZprPolicyWorkRequestsResponse, + java.util.List>() { + @Override + public java.util.List apply( + ListZprPolicyWorkRequestsResponse response) { + return response.getWorkRequestSummaryCollection().getItems(); + } + }); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java new file mode 100644 index 00000000000..75640cd6eb4 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/ZprWaiters.java @@ -0,0 +1,230 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr; + +import com.oracle.bmc.zpr.requests.*; +import com.oracle.bmc.zpr.responses.*; + +/** + * Collection of helper methods to produce {@link com.oracle.bmc.waiter.Waiter}s for different + * resources of Zpr. + * + *

The default configuration used is defined by {@link + * com.oracle.bmc.waiter.Waiters.Waiters#DEFAULT_POLLING_WAITER}. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ZprWaiters { + private final java.util.concurrent.ExecutorService executorService; + private final Zpr client; + + public ZprWaiters(java.util.concurrent.ExecutorService executorService, Zpr client) { + this.executorService = executorService; + this.client = client; + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the + * waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.zpr.model.Configuration.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forConfiguration( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.zpr.model.Configuration.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource + * reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter + forConfiguration( + GetConfigurationRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.zpr.model.Configuration.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forConfiguration( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for Configuration. + private com.oracle.bmc.waiter.Waiter + forConfiguration( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetConfigurationRequest request, + final com.oracle.bmc.zpr.model.Configuration.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetConfigurationRequest, GetConfigurationResponse>() { + @Override + public GetConfigurationResponse apply(GetConfigurationRequest request) { + return client.getConfiguration(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetConfigurationResponse response) { + return targetStatesSet.contains( + response.getConfiguration().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.zpr.model.Configuration.LifecycleState.Deleted)), + request); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the default configuration. + * + * @param request the request to send + * @param targetStates the desired states to wait for. If multiple states are provided then the + * waiter will return once the resource reaches any of the provided states + * @return a new {@code Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one targetState must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null targetState values are not permitted"); + + return forZprPolicy( + com.oracle.bmc.waiter.Waiters.DEFAULT_POLLING_WAITER, request, targetStates); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param targetState the desired state to wait for + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState targetState, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy) { + com.oracle.bmc.util.internal.Validate.notNull( + targetState, "The targetState cannot be null"); + + return forZprPolicy( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetState); + } + + /** + * Creates a new {@link com.oracle.bmc.waiter.Waiter} using the provided configuration. + * + * @param request the request to send + * @param terminationStrategy the {@link com.oracle.bmc.waiter.TerminationStrategy} to use + * @param delayStrategy the {@link com.oracle.bmc.waiter.DelayStrategy} to use + * @param targetStates the desired states to wait for. The waiter will return once the resource + * reaches any of the provided states + * @return a new {@code com.oracle.bmc.waiter.Waiter} instance + */ + public com.oracle.bmc.waiter.Waiter forZprPolicy( + GetZprPolicyRequest request, + com.oracle.bmc.waiter.TerminationStrategy terminationStrategy, + com.oracle.bmc.waiter.DelayStrategy delayStrategy, + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState... targetStates) { + com.oracle.bmc.util.internal.Validate.notEmpty( + targetStates, "At least one target state must be provided"); + com.oracle.bmc.util.internal.Validate.noNullElements( + targetStates, "Null target states are not permitted"); + + return forZprPolicy( + com.oracle.bmc.waiter.Waiters.newWaiter(terminationStrategy, delayStrategy), + request, + targetStates); + } + + // Helper method to create a new Waiter for ZprPolicy. + private com.oracle.bmc.waiter.Waiter forZprPolicy( + com.oracle.bmc.waiter.BmcGenericWaiter waiter, + final GetZprPolicyRequest request, + final com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState... targetStates) { + final java.util.Set targetStatesSet = + new java.util.HashSet<>(java.util.Arrays.asList(targetStates)); + + return new com.oracle.bmc.waiter.internal.SimpleWaiterImpl<>( + executorService, + waiter.toCallable( + () -> request, + new java.util.function.Function< + GetZprPolicyRequest, GetZprPolicyResponse>() { + @Override + public GetZprPolicyResponse apply(GetZprPolicyRequest request) { + return client.getZprPolicy(request); + } + }, + new java.util.function.Predicate() { + @Override + public boolean test(GetZprPolicyResponse response) { + return targetStatesSet.contains( + response.getZprPolicy().getLifecycleState()); + } + }, + targetStatesSet.contains( + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState.Deleted)), + request); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java new file mode 100644 index 00000000000..ffaed86729a --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ActionType.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** Possible types of actions. */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum ActionType implements com.oracle.bmc.http.internal.BmcEnum { + Created("CREATED"), + Updated("UPDATED"), + Deleted("DELETED"), + InProgress("IN_PROGRESS"), + Related("RELATED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(ActionType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ActionType v : ActionType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ActionType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ActionType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ActionType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java new file mode 100644 index 00000000000..82d6b0b0890 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/Configuration.java @@ -0,0 +1,691 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The configuration details of ZPR in the root compartment (the root compartment is the tenancy). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = Configuration.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class Configuration extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "compartmentId", + "zprStatus", + "timeCreated", + "timeUpdated", + "lifecycleState", + "lifecycleDetails", + "freeformTags", + "definedTags", + "systemTags" + }) + public Configuration( + String id, + String compartmentId, + ZprStatus zprStatus, + java.util.Date timeCreated, + java.util.Date timeUpdated, + LifecycleState lifecycleState, + String lifecycleDetails, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags) { + super(); + this.id = id; + this.compartmentId = compartmentId; + this.zprStatus = zprStatus; + this.timeCreated = timeCreated; + this.timeUpdated = timeUpdated; + this.lifecycleState = lifecycleState; + this.lifecycleDetails = lifecycleDetails; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprConfiguration. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprConfiguration. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR will be onboarded. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR will be onboarded. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The enabled or disabled status of ZPR in tenancy. */ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in tenancy. + * + * @param zprStatus the value to set + * @return this builder + */ + public Builder zprStatus(ZprStatus zprStatus) { + this.zprStatus = zprStatus; + this.__explicitlySet__.add("zprStatus"); + return this; + } + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * The date and time that ZPR was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time that ZPR was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + */ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + /** The current state of ZPR in the tenancy. */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of ZPR in the tenancy. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * A message that describes the current state of ZPR in more detail. For example, can be + * used to provide actionable information for a resource in the Failed state. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of ZPR in more detail. For example, can be + * used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + */ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + */ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public Configuration build() { + Configuration model = + new Configuration( + this.id, + this.compartmentId, + this.zprStatus, + this.timeCreated, + this.timeUpdated, + this.lifecycleState, + this.lifecycleDetails, + this.freeformTags, + this.definedTags, + this.systemTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(Configuration model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("zprStatus")) { + this.zprStatus(model.getZprStatus()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprConfiguration. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprConfiguration. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR will be onboarded. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR will be onboarded. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The enabled or disabled status of ZPR in tenancy. */ + public enum ZprStatus implements com.oracle.bmc.http.internal.BmcEnum { + Enabled("ENABLED"), + Disabled("DISABLED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(ZprStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (ZprStatus v : ZprStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + ZprStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static ZprStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'ZprStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** The enabled or disabled status of ZPR in tenancy. */ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private final ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in tenancy. + * + * @return the value + */ + public ZprStatus getZprStatus() { + return zprStatus; + } + + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time that ZPR was onboarded to the tenancy, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * The date and time that ZPR was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time that ZPR was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + /** The current state of ZPR in the tenancy. */ + public enum LifecycleState implements com.oracle.bmc.http.internal.BmcEnum { + Active("ACTIVE"), + Creating("CREATING"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + Failed("FAILED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** The current state of ZPR in the tenancy. */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of ZPR in the tenancy. + * + * @return the value + */ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * A message that describes the current state of ZPR in more detail. For example, can be used to + * provide actionable information for a resource in the Failed state. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of ZPR in more detail. For example, can be used to + * provide actionable information for a resource in the Failed state. + * + * @return the value + */ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + */ + public java.util.Map> getSystemTags() { + return systemTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("Configuration("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", zprStatus=").append(String.valueOf(this.zprStatus)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof Configuration)) { + return false; + } + + Configuration other = (Configuration) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.zprStatus, other.zprStatus) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.zprStatus == null ? 43 : this.zprStatus.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java new file mode 100644 index 00000000000..ad313089a3d --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateConfigurationDetails.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The configuration details to onboard ZPR in the root compartment (the root compartment is the + * tenancy).
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateConfigurationDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class CreateConfigurationDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"compartmentId", "zprStatus", "freeformTags", "definedTags"}) + public CreateConfigurationDetails( + String compartmentId, + Configuration.ZprStatus zprStatus, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.zprStatus = zprStatus; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR resources will be bootstrapped. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR resources will be bootstrapped. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The enabled or disabled status of ZPR in the tenancy. */ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private Configuration.ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in the tenancy. + * + * @param zprStatus the value to set + * @return this builder + */ + public Builder zprStatus(Configuration.ZprStatus zprStatus) { + this.zprStatus = zprStatus; + this.__explicitlySet__.add("zprStatus"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateConfigurationDetails build() { + CreateConfigurationDetails model = + new CreateConfigurationDetails( + this.compartmentId, + this.zprStatus, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateConfigurationDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("zprStatus")) { + this.zprStatus(model.getZprStatus()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR resources will be bootstrapped. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the + * tenancy into which ZPR resources will be bootstrapped. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The enabled or disabled status of ZPR in the tenancy. */ + @com.fasterxml.jackson.annotation.JsonProperty("zprStatus") + private final Configuration.ZprStatus zprStatus; + + /** + * The enabled or disabled status of ZPR in the tenancy. + * + * @return the value + */ + public Configuration.ZprStatus getZprStatus() { + return zprStatus; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateConfigurationDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", zprStatus=").append(String.valueOf(this.zprStatus)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateConfigurationDetails)) { + return false; + } + + CreateConfigurationDetails other = (CreateConfigurationDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.zprStatus, other.zprStatus) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.zprStatus == null ? 43 : this.zprStatus.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java new file mode 100644 index 00000000000..c90b542aa7b --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/CreateZprPolicyDetails.java @@ -0,0 +1,404 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The data to create a ZprPolicy.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = CreateZprPolicyDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class CreateZprPolicyDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "compartmentId", + "description", + "name", + "statements", + "freeformTags", + "definedTags" + }) + public CreateZprPolicyDetails( + String compartmentId, + String description, + String name, + java.util.List statements, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.compartmentId = compartmentId; + this.description = description; + this.name = name; + this.statements = statements; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment to create the ZprPolicy in. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment to create the ZprPolicy in. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all + * ZPL policies in the tenancy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all + * ZPL policies in the tenancy. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + * + * @param statements the value to set + * @return this builder + */ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public CreateZprPolicyDetails build() { + CreateZprPolicyDetails model = + new CreateZprPolicyDetails( + this.compartmentId, + this.description, + this.name, + this.statements, + this.freeformTags, + this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(CreateZprPolicyDetails model) { + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment to create the ZprPolicy in. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment to create the ZprPolicy in. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL + * policies in the tenancy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL + * policies in the tenancy. + * + * @return the value + */ + public String getName() { + return name; + } + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust + * Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust + * Packet Routing Policy Language. + * + * @return the value + */ + public java.util.List getStatements() { + return statements; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("CreateZprPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateZprPolicyDetails)) { + return false; + } + + CreateZprPolicyDetails other = (CreateZprPolicyDetails) o; + return java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java new file mode 100644 index 00000000000..dc5fa685458 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/OperationType.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** The asynchronous operation tracked by the work request. */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum OperationType implements com.oracle.bmc.http.internal.BmcEnum { + CreateZprPolicy("CREATE_ZPR_POLICY"), + UpdateZprPolicy("UPDATE_ZPR_POLICY"), + DeleteZprPolicy("DELETE_ZPR_POLICY"), + CreateZprConfiguration("CREATE_ZPR_CONFIGURATION"), + UpdateZprConfiguration("UPDATE_ZPR_CONFIGURATION"), + DeleteZprConfiguration("DELETE_ZPR_CONFIGURATION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(OperationType.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (OperationType v : OperationType.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + OperationType(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static OperationType create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'OperationType', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java new file mode 100644 index 00000000000..9ece815107c --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/SortOrder.java @@ -0,0 +1,43 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). The {@code + * name} sort order is case sensitive. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum SortOrder implements com.oracle.bmc.http.internal.BmcEnum { + Asc("ASC"), + Desc("DESC"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortOrder v : SortOrder.values()) { + map.put(v.getValue(), v); + } + } + + SortOrder(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortOrder create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortOrder: " + key); + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java new file mode 100644 index 00000000000..558c6c4a961 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/UpdateZprPolicyDetails.java @@ -0,0 +1,302 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * The data to update a ZprPolicy.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = UpdateZprPolicyDetails.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class UpdateZprPolicyDetails + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"description", "statements", "freeformTags", "definedTags"}) + public UpdateZprPolicyDetails( + String description, + java.util.List statements, + java.util.Map freeformTags, + java.util.Map> definedTags) { + super(); + this.description = description; + this.statements = statements; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + * + * @param statements the value to set + * @return this builder + */ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public UpdateZprPolicyDetails build() { + UpdateZprPolicyDetails model = + new UpdateZprPolicyDetails( + this.description, this.statements, this.freeformTags, this.definedTags); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(UpdateZprPolicyDetails model) { + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust + * Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust + * Packet Routing Policy Language. + * + * @return the value + */ + public java.util.List getStatements() { + return statements; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("UpdateZprPolicyDetails("); + sb.append("super=").append(super.toString()); + sb.append("description=").append(String.valueOf(this.description)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateZprPolicyDetails)) { + return false; + } + + UpdateZprPolicyDetails other = (UpdateZprPolicyDetails) o; + return java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java new file mode 100644 index 00000000000..a7dd5be492e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequest.java @@ -0,0 +1,544 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * An asynchronous work request. Work requests help you monitor long-running operations. When you + * start a long-running operation, the service creates a work request. A work request is an activity + * log that lets you track each step in the operation's progress. Each work request has an OCID that + * lets you interact with it programmatically and use it for automation.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequest.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequest extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequest( + OperationType operationType, + WorkRequestStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The asynchronous operation tracked by this work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * + * @param operationType the value to set + * @return this builder + */ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** The status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The status of the work request. + * + * @param status the value to set + * @return this builder + */ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the work request. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment that contains the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The resources that are affected by the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources that are affected by the work request. + * + * @param resources the value to set + * @return this builder + */ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the + * total work that must be performed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the + * total work that must be performed. + * + * @param percentComplete the value to set + * @return this builder + */ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeAccepted the value to set + * @return this builder + */ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeStarted the value to set + * @return this builder + */ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + */ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + */ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequest build() { + WorkRequest model = + new WorkRequest( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequest model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The asynchronous operation tracked by this work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * + * @return the value + */ + public OperationType getOperationType() { + return operationType; + } + + /** The status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The status of the work request. + * + * @return the value + */ + public WorkRequestStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the work request. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment that contains the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment that contains the work request. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The resources that are affected by the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources that are affected by the work request. + * + * @return the value + */ + public java.util.List getResources() { + return resources; + } + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total + * work that must be performed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total + * work that must be performed. + * + * @return the value + */ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequest("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequest)) { + return false; + } + + WorkRequest other = (WorkRequest) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java new file mode 100644 index 00000000000..bf970049a87 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestError.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * An error encountered while performing an operation that is tracked by a work request.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = WorkRequestError.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestError + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"code", "message", "timestamp"}) + public WorkRequestError(String code, String message, java.util.Date timestamp) { + super(); + this.code = code; + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * A machine-usable code for the error that occurred. For a list of error codes, see [API + * Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private String code; + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see [API + * Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + * @param code the value to set + * @return this builder + */ + public Builder code(String code) { + this.code = code; + this.__explicitlySet__.add("code"); + return this; + } + /** A human-readable error message. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable error message. + * + * @param message the value to set + * @return this builder + */ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The date and time the error occurred, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The date and time the error occurred, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timestamp the value to set + * @return this builder + */ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestError build() { + WorkRequestError model = new WorkRequestError(this.code, this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestError model) { + if (model.wasPropertyExplicitlySet("code")) { + this.code(model.getCode()); + } + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see [API + * Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + */ + @com.fasterxml.jackson.annotation.JsonProperty("code") + private final String code; + + /** + * A machine-usable code for the error that occurred. For a list of error codes, see [API + * Errors](https://docs.cloud.oracle.com/iaas/Content/API/References/apierrors.htm). + * + * @return the value + */ + public String getCode() { + return code; + } + + /** A human-readable error message. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable error message. + * + * @return the value + */ + public String getMessage() { + return message; + } + + /** + * The date and time the error occurred, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The date and time the error occurred, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + */ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestError("); + sb.append("super=").append(super.toString()); + sb.append("code=").append(String.valueOf(this.code)); + sb.append(", message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestError)) { + return false; + } + + WorkRequestError other = (WorkRequestError) o; + return java.util.Objects.equals(this.code, other.code) + && java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.code == null ? 43 : this.code.hashCode()); + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java new file mode 100644 index 00000000000..08a20f984b9 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestErrorCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A list of work request errors. Can contain both errors and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestErrorCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestErrorCollection + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestErrorCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** A list of work request errors. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work request errors. + * + * @param items the value to set + * @return this builder + */ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestErrorCollection build() { + WorkRequestErrorCollection model = new WorkRequestErrorCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestErrorCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** A list of work request errors. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work request errors. + * + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestErrorCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestErrorCollection)) { + return false; + } + + WorkRequestErrorCollection other = (WorkRequestErrorCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java new file mode 100644 index 00000000000..5df1a11cad7 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntry.java @@ -0,0 +1,177 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A log message from performing an operation that is tracked by a work request.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntry.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestLogEntry + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"message", "timestamp"}) + public WorkRequestLogEntry(String message, java.util.Date timestamp) { + super(); + this.message = message; + this.timestamp = timestamp; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** A human-readable log message. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private String message; + + /** + * A human-readable log message. + * + * @param message the value to set + * @return this builder + */ + public Builder message(String message) { + this.message = message; + this.__explicitlySet__.add("message"); + return this; + } + /** + * The date and time the log message was written, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private java.util.Date timestamp; + + /** + * The date and time the log message was written, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timestamp the value to set + * @return this builder + */ + public Builder timestamp(java.util.Date timestamp) { + this.timestamp = timestamp; + this.__explicitlySet__.add("timestamp"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntry build() { + WorkRequestLogEntry model = new WorkRequestLogEntry(this.message, this.timestamp); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntry model) { + if (model.wasPropertyExplicitlySet("message")) { + this.message(model.getMessage()); + } + if (model.wasPropertyExplicitlySet("timestamp")) { + this.timestamp(model.getTimestamp()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** A human-readable log message. */ + @com.fasterxml.jackson.annotation.JsonProperty("message") + private final String message; + + /** + * A human-readable log message. + * + * @return the value + */ + public String getMessage() { + return message; + } + + /** + * The date and time the log message was written, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timestamp") + private final java.util.Date timestamp; + + /** + * The date and time the log message was written, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + */ + public java.util.Date getTimestamp() { + return timestamp; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntry("); + sb.append("super=").append(super.toString()); + sb.append("message=").append(String.valueOf(this.message)); + sb.append(", timestamp=").append(String.valueOf(this.timestamp)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntry)) { + return false; + } + + WorkRequestLogEntry other = (WorkRequestLogEntry) o; + return java.util.Objects.equals(this.message, other.message) + && java.util.Objects.equals(this.timestamp, other.timestamp) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.message == null ? 43 : this.message.hashCode()); + result = (result * PRIME) + (this.timestamp == null ? 43 : this.timestamp.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java new file mode 100644 index 00000000000..4c21672b912 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestLogEntryCollection.java @@ -0,0 +1,133 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A list of work request logs. Can contain both logs and other information, such as metadata.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestLogEntryCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestLogEntryCollection + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestLogEntryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** A list of work request log entries. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work request log entries. + * + * @param items the value to set + * @return this builder + */ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestLogEntryCollection build() { + WorkRequestLogEntryCollection model = new WorkRequestLogEntryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestLogEntryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** A list of work request log entries. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work request log entries. + * + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestLogEntryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestLogEntryCollection)) { + return false; + } + + WorkRequestLogEntryCollection other = (WorkRequestLogEntryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java new file mode 100644 index 00000000000..7dfaf6f4664 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResource.java @@ -0,0 +1,315 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A resource created or operated on by a work request.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestResource.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestResource + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "entityType", + "actionType", + "identifier", + "entityUri", + "metadata" + }) + public WorkRequestResource( + String entityType, + ActionType actionType, + String identifier, + String entityUri, + java.util.Map metadata) { + super(); + this.entityType = entityType; + this.actionType = actionType; + this.identifier = identifier; + this.entityUri = entityUri; + this.metadata = metadata; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The resource type that the work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private String entityType; + + /** + * The resource type that the work request affects. + * + * @param entityType the value to set + * @return this builder + */ + public Builder entityType(String entityType) { + this.entityType = entityType; + this.__explicitlySet__.add("entityType"); + return this; + } + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until work + * is complete for that resource, at which point it transitions to CREATED, UPDATED, or + * DELETED, respectively. + */ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private ActionType actionType; + + /** + * The way in which this resource is affected by the operation tracked in the work request. + * A resource being created, updated, or deleted remains in the IN_PROGRESS state until work + * is complete for that resource, at which point it transitions to CREATED, UPDATED, or + * DELETED, respectively. + * + * @param actionType the value to set + * @return this builder + */ + public Builder actionType(ActionType actionType) { + this.actionType = actionType; + this.__explicitlySet__.add("actionType"); + return this; + } + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or + * other unique identifier for the resource. + */ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private String identifier; + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or + * other unique identifier for the resource. + * + * @param identifier the value to set + * @return this builder + */ + public Builder identifier(String identifier) { + this.identifier = identifier; + this.__explicitlySet__.add("identifier"); + return this; + } + /** The URI path that you can use for a GET request to access the resource metadata. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private String entityUri; + + /** + * The URI path that you can use for a GET request to access the resource metadata. + * + * @param entityUri the value to set + * @return this builder + */ + public Builder entityUri(String entityUri) { + this.entityUri = entityUri; + this.__explicitlySet__.add("entityUri"); + return this; + } + /** Additional information that helps to explain the resource. */ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * + * @param metadata the value to set + * @return this builder + */ + public Builder metadata(java.util.Map metadata) { + this.metadata = metadata; + this.__explicitlySet__.add("metadata"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestResource build() { + WorkRequestResource model = + new WorkRequestResource( + this.entityType, + this.actionType, + this.identifier, + this.entityUri, + this.metadata); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestResource model) { + if (model.wasPropertyExplicitlySet("entityType")) { + this.entityType(model.getEntityType()); + } + if (model.wasPropertyExplicitlySet("actionType")) { + this.actionType(model.getActionType()); + } + if (model.wasPropertyExplicitlySet("identifier")) { + this.identifier(model.getIdentifier()); + } + if (model.wasPropertyExplicitlySet("entityUri")) { + this.entityUri(model.getEntityUri()); + } + if (model.wasPropertyExplicitlySet("metadata")) { + this.metadata(model.getMetadata()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The resource type that the work request affects. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityType") + private final String entityType; + + /** + * The resource type that the work request affects. + * + * @return the value + */ + public String getEntityType() { + return entityType; + } + + /** + * The way in which this resource is affected by the operation tracked in the work request. A + * resource being created, updated, or deleted remains in the IN_PROGRESS state until work is + * complete for that resource, at which point it transitions to CREATED, UPDATED, or DELETED, + * respectively. + */ + @com.fasterxml.jackson.annotation.JsonProperty("actionType") + private final ActionType actionType; + + /** + * The way in which this resource is affected by the operation tracked in the work request. A + * resource being created, updated, or deleted remains in the IN_PROGRESS state until work is + * complete for that resource, at which point it transitions to CREATED, UPDATED, or DELETED, + * respectively. + * + * @return the value + */ + public ActionType getActionType() { + return actionType; + } + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or + * other unique identifier for the resource. + */ + @com.fasterxml.jackson.annotation.JsonProperty("identifier") + private final String identifier; + + /** + * An [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) or + * other unique identifier for the resource. + * + * @return the value + */ + public String getIdentifier() { + return identifier; + } + + /** The URI path that you can use for a GET request to access the resource metadata. */ + @com.fasterxml.jackson.annotation.JsonProperty("entityUri") + private final String entityUri; + + /** + * The URI path that you can use for a GET request to access the resource metadata. + * + * @return the value + */ + public String getEntityUri() { + return entityUri; + } + + /** Additional information that helps to explain the resource. */ + @com.fasterxml.jackson.annotation.JsonProperty("metadata") + private final java.util.Map metadata; + + /** + * Additional information that helps to explain the resource. + * + * @return the value + */ + public java.util.Map getMetadata() { + return metadata; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestResource("); + sb.append("super=").append(super.toString()); + sb.append("entityType=").append(String.valueOf(this.entityType)); + sb.append(", actionType=").append(String.valueOf(this.actionType)); + sb.append(", identifier=").append(String.valueOf(this.identifier)); + sb.append(", entityUri=").append(String.valueOf(this.entityUri)); + sb.append(", metadata=").append(String.valueOf(this.metadata)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestResource)) { + return false; + } + + WorkRequestResource other = (WorkRequestResource) o; + return java.util.Objects.equals(this.entityType, other.entityType) + && java.util.Objects.equals(this.actionType, other.actionType) + && java.util.Objects.equals(this.identifier, other.identifier) + && java.util.Objects.equals(this.entityUri, other.entityUri) + && java.util.Objects.equals(this.metadata, other.metadata) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.entityType == null ? 43 : this.entityType.hashCode()); + result = (result * PRIME) + (this.actionType == null ? 43 : this.actionType.hashCode()); + result = (result * PRIME) + (this.identifier == null ? 43 : this.identifier.hashCode()); + result = (result * PRIME) + (this.entityUri == null ? 43 : this.entityUri.hashCode()); + result = (result * PRIME) + (this.metadata == null ? 43 : this.metadata.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java new file mode 100644 index 00000000000..a5cf8f7f6ef --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestResourceMetadataKey.java @@ -0,0 +1,52 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** Possible metadata keys for work request resource metadata. */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum WorkRequestResourceMetadataKey implements com.oracle.bmc.http.internal.BmcEnum { + IsDryRun("IS_DRY_RUN"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestResourceMetadataKey.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestResourceMetadataKey v : WorkRequestResourceMetadataKey.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestResourceMetadataKey(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestResourceMetadataKey create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestResourceMetadataKey', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java new file mode 100644 index 00000000000..5baf3a910b0 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestStatus.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** The status of the work request. */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public enum WorkRequestStatus implements com.oracle.bmc.http.internal.BmcEnum { + Accepted("ACCEPTED"), + InProgress("IN_PROGRESS"), + Waiting("WAITING"), + NeedsAttention("NEEDS_ATTENTION"), + Failed("FAILED"), + Succeeded("SUCCEEDED"), + Canceling("CANCELING"), + Canceled("CANCELED"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by this + * version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(WorkRequestStatus.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (WorkRequestStatus v : WorkRequestStatus.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + WorkRequestStatus(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static WorkRequestStatus create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'WorkRequestStatus', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java new file mode 100644 index 00000000000..e376b75d244 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummary.java @@ -0,0 +1,543 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Summary information about an asynchronous work request.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestSummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "operationType", + "status", + "id", + "compartmentId", + "resources", + "percentComplete", + "timeAccepted", + "timeStarted", + "timeFinished", + "timeUpdated" + }) + public WorkRequestSummary( + OperationType operationType, + WorkRequestStatus status, + String id, + String compartmentId, + java.util.List resources, + Float percentComplete, + java.util.Date timeAccepted, + java.util.Date timeStarted, + java.util.Date timeFinished, + java.util.Date timeUpdated) { + super(); + this.operationType = operationType; + this.status = status; + this.id = id; + this.compartmentId = compartmentId; + this.resources = resources; + this.percentComplete = percentComplete; + this.timeAccepted = timeAccepted; + this.timeStarted = timeStarted; + this.timeFinished = timeFinished; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** The asynchronous operation tracked by this work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * + * @param operationType the value to set + * @return this builder + */ + public Builder operationType(OperationType operationType) { + this.operationType = operationType; + this.__explicitlySet__.add("operationType"); + return this; + } + /** The status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private WorkRequestStatus status; + + /** + * The status of the work request. + * + * @param status the value to set + * @return this builder + */ + public Builder status(WorkRequestStatus status) { + this.status = status; + this.__explicitlySet__.add("status"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the work request. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment that contains the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment that contains the work request. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** The resources that are affected by this work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private java.util.List resources; + + /** + * The resources that are affected by this work request. + * + * @param resources the value to set + * @return this builder + */ + public Builder resources(java.util.List resources) { + this.resources = resources; + this.__explicitlySet__.add("resources"); + return this; + } + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the + * total work that must be performed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the + * total work that must be performed. + * + * @param percentComplete the value to set + * @return this builder + */ + public Builder percentComplete(Float percentComplete) { + this.percentComplete = percentComplete; + this.__explicitlySet__.add("percentComplete"); + return this; + } + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeAccepted the value to set + * @return this builder + */ + public Builder timeAccepted(java.util.Date timeAccepted) { + this.timeAccepted = timeAccepted; + this.__explicitlySet__.add("timeAccepted"); + return this; + } + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @param timeStarted the value to set + * @return this builder + */ + public Builder timeStarted(java.util.Date timeStarted) { + this.timeStarted = timeStarted; + this.__explicitlySet__.add("timeStarted"); + return this; + } + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeFinished the value to set + * @return this builder + */ + public Builder timeFinished(java.util.Date timeFinished) { + this.timeFinished = timeFinished; + this.__explicitlySet__.add("timeFinished"); + return this; + } + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @param timeUpdated the value to set + * @return this builder + */ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummary build() { + WorkRequestSummary model = + new WorkRequestSummary( + this.operationType, + this.status, + this.id, + this.compartmentId, + this.resources, + this.percentComplete, + this.timeAccepted, + this.timeStarted, + this.timeFinished, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummary model) { + if (model.wasPropertyExplicitlySet("operationType")) { + this.operationType(model.getOperationType()); + } + if (model.wasPropertyExplicitlySet("status")) { + this.status(model.getStatus()); + } + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("resources")) { + this.resources(model.getResources()); + } + if (model.wasPropertyExplicitlySet("percentComplete")) { + this.percentComplete(model.getPercentComplete()); + } + if (model.wasPropertyExplicitlySet("timeAccepted")) { + this.timeAccepted(model.getTimeAccepted()); + } + if (model.wasPropertyExplicitlySet("timeStarted")) { + this.timeStarted(model.getTimeStarted()); + } + if (model.wasPropertyExplicitlySet("timeFinished")) { + this.timeFinished(model.getTimeFinished()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** The asynchronous operation tracked by this work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("operationType") + private final OperationType operationType; + + /** + * The asynchronous operation tracked by this work request. + * + * @return the value + */ + public OperationType getOperationType() { + return operationType; + } + + /** The status of the work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("status") + private final WorkRequestStatus status; + + /** + * The status of the work request. + * + * @return the value + */ + public WorkRequestStatus getStatus() { + return status; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the work request. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment that contains the work request. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment that contains the work request. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** The resources that are affected by this work request. */ + @com.fasterxml.jackson.annotation.JsonProperty("resources") + private final java.util.List resources; + + /** + * The resources that are affected by this work request. + * + * @return the value + */ + public java.util.List getResources() { + return resources; + } + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total + * work that must be performed. + */ + @com.fasterxml.jackson.annotation.JsonProperty("percentComplete") + private final Float percentComplete; + + /** + * Shows the progress of the operation tracked by the work request, as a percentage of the total + * work that must be performed. + * + * @return the value + */ + public Float getPercentComplete() { + return percentComplete; + } + + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeAccepted") + private final java.util.Date timeAccepted; + + /** + * The date and time the work request was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeAccepted() { + return timeAccepted; + } + + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeStarted") + private final java.util.Date timeStarted; + + /** + * The date and time the work request was started, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeStarted() { + return timeStarted; + } + + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeFinished") + private final java.util.Date timeFinished; + + /** + * The date and time the work request was finished, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeFinished() { + return timeFinished; + } + + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the work request was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/rfc/rfc3339). + * + * @return the value + */ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummary("); + sb.append("super=").append(super.toString()); + sb.append("operationType=").append(String.valueOf(this.operationType)); + sb.append(", status=").append(String.valueOf(this.status)); + sb.append(", id=").append(String.valueOf(this.id)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", resources=").append(String.valueOf(this.resources)); + sb.append(", percentComplete=").append(String.valueOf(this.percentComplete)); + sb.append(", timeAccepted=").append(String.valueOf(this.timeAccepted)); + sb.append(", timeStarted=").append(String.valueOf(this.timeStarted)); + sb.append(", timeFinished=").append(String.valueOf(this.timeFinished)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummary)) { + return false; + } + + WorkRequestSummary other = (WorkRequestSummary) o; + return java.util.Objects.equals(this.operationType, other.operationType) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.resources, other.resources) + && java.util.Objects.equals(this.percentComplete, other.percentComplete) + && java.util.Objects.equals(this.timeAccepted, other.timeAccepted) + && java.util.Objects.equals(this.timeStarted, other.timeStarted) + && java.util.Objects.equals(this.timeFinished, other.timeFinished) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = + (result * PRIME) + + (this.operationType == null ? 43 : this.operationType.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.resources == null ? 43 : this.resources.hashCode()); + result = + (result * PRIME) + + (this.percentComplete == null ? 43 : this.percentComplete.hashCode()); + result = (result * PRIME) + (this.timeAccepted == null ? 43 : this.timeAccepted.hashCode()); + result = (result * PRIME) + (this.timeStarted == null ? 43 : this.timeStarted.hashCode()); + result = (result * PRIME) + (this.timeFinished == null ? 43 : this.timeFinished.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java new file mode 100644 index 00000000000..1f53eb9771e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/WorkRequestSummaryCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A list of work requests. Can contain both work requests and other information, such as metadata. + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = WorkRequestSummaryCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class WorkRequestSummaryCollection + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public WorkRequestSummaryCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** A list of work requests. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * A list of work requests. + * + * @param items the value to set + * @return this builder + */ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public WorkRequestSummaryCollection build() { + WorkRequestSummaryCollection model = new WorkRequestSummaryCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(WorkRequestSummaryCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** A list of work requests. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * A list of work requests. + * + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("WorkRequestSummaryCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof WorkRequestSummaryCollection)) { + return false; + } + + WorkRequestSummaryCollection other = (WorkRequestSummaryCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java new file mode 100644 index 00000000000..5f011680746 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicy.java @@ -0,0 +1,752 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * A ZprPolicy is a rule that governs the communication between specific endpoints identified by + * their security attributes. + * + *

To use any of the API operations, you must be authorized in an IAM policy. If you're not + * authorized, talk to an administrator. If you're an administrator who needs to write policies to + * give users access, see [Getting Started with + * Policies](https://docs.cloud.oracle.com/iaas/Content/Identity/policiesgs/get-started-with-policies.htm). + *
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ZprPolicy.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class ZprPolicy extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "compartmentId", + "statements", + "lifecycleState", + "timeCreated", + "freeformTags", + "definedTags", + "systemTags", + "lifecycleDetails", + "timeUpdated" + }) + public ZprPolicy( + String id, + String name, + String description, + String compartmentId, + java.util.List statements, + LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String lifecycleDetails, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.compartmentId = compartmentId; + this.statements = statements; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.lifecycleDetails = lifecycleDetails; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all + * ZPL policies in the tenancy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all + * ZPL policies in the tenancy. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + * + * @param statements the value to set + * @return this builder + */ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** The current state of the ZprPolicy. */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + */ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + */ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + */ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZprPolicy build() { + ZprPolicy model = + new ZprPolicy( + this.id, + this.name, + this.description, + this.compartmentId, + this.statements, + this.lifecycleState, + this.timeCreated, + this.freeformTags, + this.definedTags, + this.systemTags, + this.lifecycleDetails, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZprPolicy model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL + * policies in the tenancy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL + * policies in the tenancy. + * + * @return the value + */ + public String getName() { + return name; + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements (up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + * + * @return the value + */ + public java.util.List getStatements() { + return statements; + } + + /** The current state of the ZprPolicy. */ + public enum LifecycleState implements com.oracle.bmc.http.internal.BmcEnum { + Active("ACTIVE"), + Creating("CREATING"), + Failed("FAILED"), + Updating("UPDATING"), + Deleting("DELETING"), + Deleted("DELETED"), + NeedsAttention("NEEDS_ATTENTION"), + + /** + * This value is used if a service returns a value for this enum that is not recognized by + * this version of the SDK. + */ + UnknownEnumValue(null); + + private static final org.slf4j.Logger LOG = + org.slf4j.LoggerFactory.getLogger(LifecycleState.class); + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (LifecycleState v : LifecycleState.values()) { + if (v != UnknownEnumValue) { + map.put(v.getValue(), v); + } + } + } + + LifecycleState(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static LifecycleState create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + LOG.warn( + "Received unknown value '{}' for enum 'LifecycleState', returning UnknownEnumValue", + key); + return UnknownEnumValue; + } + }; + /** The current state of the ZprPolicy. */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * + * @return the value + */ + public LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + */ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, can + * be used to provide actionable information for a resource in the Failed state. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, can + * be used to provide actionable information for a resource in the Failed state. + * + * @return the value + */ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZprPolicy("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZprPolicy)) { + return false; + } + + ZprPolicy other = (ZprPolicy) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java new file mode 100644 index 00000000000..40533cb9d2d --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicyCollection.java @@ -0,0 +1,134 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Results of a zprPolicy search. Contains both ZprPolicySummary items and other information, such + * as metadata.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize( + builder = ZprPolicyCollection.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class ZprPolicyCollection + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({"items"}) + public ZprPolicyCollection(java.util.List items) { + super(); + this.items = items; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** List of zprPolicies. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private java.util.List items; + + /** + * List of zprPolicies. + * + * @param items the value to set + * @return this builder + */ + public Builder items(java.util.List items) { + this.items = items; + this.__explicitlySet__.add("items"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZprPolicyCollection build() { + ZprPolicyCollection model = new ZprPolicyCollection(this.items); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZprPolicyCollection model) { + if (model.wasPropertyExplicitlySet("items")) { + this.items(model.getItems()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** List of zprPolicies. */ + @com.fasterxml.jackson.annotation.JsonProperty("items") + private final java.util.List items; + + /** + * List of zprPolicies. + * + * @return the value + */ + public java.util.List getItems() { + return items; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZprPolicyCollection("); + sb.append("super=").append(super.toString()); + sb.append("items=").append(String.valueOf(this.items)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZprPolicyCollection)) { + return false; + } + + ZprPolicyCollection other = (ZprPolicyCollection) o; + return java.util.Objects.equals(this.items, other.items) && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.items == null ? 43 : this.items.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java new file mode 100644 index 00000000000..eeb540ca5c2 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/model/ZprPolicySummary.java @@ -0,0 +1,695 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.model; + +/** + * Summary information about a ZprPolicy.
+ * Note: Objects should always be created or deserialized using the {@link Builder}. This model + * distinguishes fields that are {@code null} because they are unset from fields that are explicitly + * set to {@code null}. This is done in the setter methods of the {@link Builder}, which maintain a + * set of all explicitly set fields called {@link Builder#__explicitlySet__}. The {@link + * #hashCode()} and {@link #equals(Object)} methods are implemented to take the explicitly set + * fields into account. The constructor, on the other hand, does not take the explicitly set fields + * into account (since the constructor cannot distinguish explicit {@code null} from unset {@code + * null}). + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +@com.fasterxml.jackson.databind.annotation.JsonDeserialize(builder = ZprPolicySummary.Builder.class) +@com.fasterxml.jackson.annotation.JsonFilter( + com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel.EXPLICITLY_SET_FILTER_NAME) +public final class ZprPolicySummary + extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel { + @Deprecated + @java.beans.ConstructorProperties({ + "id", + "name", + "description", + "compartmentId", + "statements", + "lifecycleState", + "timeCreated", + "freeformTags", + "definedTags", + "systemTags", + "lifecycleDetails", + "timeUpdated" + }) + public ZprPolicySummary( + String id, + String name, + String description, + String compartmentId, + java.util.List statements, + ZprPolicy.LifecycleState lifecycleState, + java.util.Date timeCreated, + java.util.Map freeformTags, + java.util.Map> definedTags, + java.util.Map> systemTags, + String lifecycleDetails, + java.util.Date timeUpdated) { + super(); + this.id = id; + this.name = name; + this.description = description; + this.compartmentId = compartmentId; + this.statements = statements; + this.lifecycleState = lifecycleState; + this.timeCreated = timeCreated; + this.freeformTags = freeformTags; + this.definedTags = definedTags; + this.systemTags = systemTags; + this.lifecycleDetails = lifecycleDetails; + this.timeUpdated = timeUpdated; + } + + @com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder(withPrefix = "") + public static class Builder { + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + * + * @param id the value to set + * @return this builder + */ + public Builder id(String id) { + this.id = id; + this.__explicitlySet__.add("id"); + return this; + } + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all + * ZPL policies in the tenancy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all + * ZPL policies in the tenancy. + * + * @param name the value to set + * @return this builder + */ + public Builder name(String name) { + this.name = name; + this.__explicitlySet__.add("name"); + return this; + } + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, + * and it's changeable. + * + * @param description the value to set + * @return this builder + */ + public Builder description(String description) { + this.description = description; + this.__explicitlySet__.add("description"); + return this; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment. + * + * @param compartmentId the value to set + * @return this builder + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + this.__explicitlySet__.add("compartmentId"); + return this; + } + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero + * Trust Packet Routing Policy Language. + * + * @param statements the value to set + * @return this builder + */ + public Builder statements(java.util.List statements) { + this.statements = statements; + this.__explicitlySet__.add("statements"); + return this; + } + /** The current state of the ZprPolicy. */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private ZprPolicy.LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * + * @param lifecycleState the value to set + * @return this builder + */ + public Builder lifecycleState(ZprPolicy.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + this.__explicitlySet__.add("lifecycleState"); + return this; + } + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeCreated the value to set + * @return this builder + */ + public Builder timeCreated(java.util.Date timeCreated) { + this.timeCreated = timeCreated; + this.__explicitlySet__.add("timeCreated"); + return this; + } + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @param freeformTags the value to set + * @return this builder + */ + public Builder freeformTags(java.util.Map freeformTags) { + this.freeformTags = freeformTags; + this.__explicitlySet__.add("freeformTags"); + return this; + } + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For + * more information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @param definedTags the value to set + * @return this builder + */ + public Builder definedTags( + java.util.Map> definedTags) { + this.definedTags = definedTags; + this.__explicitlySet__.add("definedTags"); + return this; + } + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @param systemTags the value to set + * @return this builder + */ + public Builder systemTags(java.util.Map> systemTags) { + this.systemTags = systemTags; + this.__explicitlySet__.add("systemTags"); + return this; + } + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, + * can be used to provide actionable information for a resource in the Failed state. + * + * @param lifecycleDetails the value to set + * @return this builder + */ + public Builder lifecycleDetails(String lifecycleDetails) { + this.lifecycleDetails = lifecycleDetails; + this.__explicitlySet__.add("lifecycleDetails"); + return this; + } + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @param timeUpdated the value to set + * @return this builder + */ + public Builder timeUpdated(java.util.Date timeUpdated) { + this.timeUpdated = timeUpdated; + this.__explicitlySet__.add("timeUpdated"); + return this; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + private final java.util.Set __explicitlySet__ = new java.util.HashSet(); + + public ZprPolicySummary build() { + ZprPolicySummary model = + new ZprPolicySummary( + this.id, + this.name, + this.description, + this.compartmentId, + this.statements, + this.lifecycleState, + this.timeCreated, + this.freeformTags, + this.definedTags, + this.systemTags, + this.lifecycleDetails, + this.timeUpdated); + for (String explicitlySetProperty : this.__explicitlySet__) { + model.markPropertyAsExplicitlySet(explicitlySetProperty); + } + return model; + } + + @com.fasterxml.jackson.annotation.JsonIgnore + public Builder copy(ZprPolicySummary model) { + if (model.wasPropertyExplicitlySet("id")) { + this.id(model.getId()); + } + if (model.wasPropertyExplicitlySet("name")) { + this.name(model.getName()); + } + if (model.wasPropertyExplicitlySet("description")) { + this.description(model.getDescription()); + } + if (model.wasPropertyExplicitlySet("compartmentId")) { + this.compartmentId(model.getCompartmentId()); + } + if (model.wasPropertyExplicitlySet("statements")) { + this.statements(model.getStatements()); + } + if (model.wasPropertyExplicitlySet("lifecycleState")) { + this.lifecycleState(model.getLifecycleState()); + } + if (model.wasPropertyExplicitlySet("timeCreated")) { + this.timeCreated(model.getTimeCreated()); + } + if (model.wasPropertyExplicitlySet("freeformTags")) { + this.freeformTags(model.getFreeformTags()); + } + if (model.wasPropertyExplicitlySet("definedTags")) { + this.definedTags(model.getDefinedTags()); + } + if (model.wasPropertyExplicitlySet("systemTags")) { + this.systemTags(model.getSystemTags()); + } + if (model.wasPropertyExplicitlySet("lifecycleDetails")) { + this.lifecycleDetails(model.getLifecycleDetails()); + } + if (model.wasPropertyExplicitlySet("timeUpdated")) { + this.timeUpdated(model.getTimeUpdated()); + } + return this; + } + } + + /** Create a new builder. */ + public static Builder builder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder().copy(this); + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("id") + private final String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + * + * @return the value + */ + public String getId() { + return id; + } + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL + * policies in the tenancy. + */ + @com.fasterxml.jackson.annotation.JsonProperty("name") + private final String name; + + /** + * The name you assign to the ZprPolicy during creation. The name must be unique across all ZPL + * policies in the tenancy. + * + * @return the value + */ + public String getName() { + return name; + } + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + */ + @com.fasterxml.jackson.annotation.JsonProperty("description") + private final String description; + + /** + * The description you assign to the ZprPolicy during creation. Does not have to be unique, and + * it's changeable. + * + * @return the value + */ + public String getDescription() { + return description; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment. + */ + @com.fasterxml.jackson.annotation.JsonProperty("compartmentId") + private final String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment. + * + * @return the value + */ + public String getCompartmentId() { + return compartmentId; + } + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust + * Packet Routing Policy Language. + */ + @com.fasterxml.jackson.annotation.JsonProperty("statements") + private final java.util.List statements; + + /** + * An array of ZprPolicy statements(up to 25 statements per ZprPolicy) written in the Zero Trust + * Packet Routing Policy Language. + * + * @return the value + */ + public java.util.List getStatements() { + return statements; + } + + /** The current state of the ZprPolicy. */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleState") + private final ZprPolicy.LifecycleState lifecycleState; + + /** + * The current state of the ZprPolicy. + * + * @return the value + */ + public ZprPolicy.LifecycleState getLifecycleState() { + return lifecycleState; + } + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeCreated") + private final java.util.Date timeCreated; + + /** + * The date and time the ZprPolicy was created, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeCreated() { + return timeCreated; + } + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("freeformTags") + private final java.util.Map freeformTags; + + /** + * 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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Department": "Finance"}} + * + * @return the value + */ + public java.util.Map getFreeformTags() { + return freeformTags; + } + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("definedTags") + private final java.util.Map> definedTags; + + /** + * Defined tags for this resource. Each key is predefined and scoped to a namespace. For more + * information, see [Resource + * Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). + * + *

Example: {@code {"Operations": {"CostCenter": "42"}}} + * + * @return the value + */ + public java.util.Map> getDefinedTags() { + return definedTags; + } + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + */ + @com.fasterxml.jackson.annotation.JsonProperty("systemTags") + private final java.util.Map> systemTags; + + /** + * System tags for this resource. Each key is predefined and scoped to a namespace. + * + *

Example: {@code {"orcl-cloud": {"free-tier-retained": "true"}}} + * + * @return the value + */ + public java.util.Map> getSystemTags() { + return systemTags; + } + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, can + * be used to provide actionable information for a resource in the Failed state. + */ + @com.fasterxml.jackson.annotation.JsonProperty("lifecycleDetails") + private final String lifecycleDetails; + + /** + * A message that describes the current state of the ZprPolicy in more detail. For example, can + * be used to provide actionable information for a resource in the Failed state. + * + * @return the value + */ + public String getLifecycleDetails() { + return lifecycleDetails; + } + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + */ + @com.fasterxml.jackson.annotation.JsonProperty("timeUpdated") + private final java.util.Date timeUpdated; + + /** + * The date and time the ZprPolicy was updated, in the format defined by [RFC + * 3339](https://tools.ietf.org/html/rfc3339). + * + *

Example: {@code 2016-08-25T21:10:29.600Z} + * + * @return the value + */ + public java.util.Date getTimeUpdated() { + return timeUpdated; + } + + @Override + public String toString() { + return this.toString(true); + } + + /** + * Return a string representation of the object. + * + * @param includeByteArrayContents true to include the full contents of byte arrays + * @return string representation + */ + public String toString(boolean includeByteArrayContents) { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("ZprPolicySummary("); + sb.append("super=").append(super.toString()); + sb.append("id=").append(String.valueOf(this.id)); + sb.append(", name=").append(String.valueOf(this.name)); + sb.append(", description=").append(String.valueOf(this.description)); + sb.append(", compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(", statements=").append(String.valueOf(this.statements)); + sb.append(", lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(", timeCreated=").append(String.valueOf(this.timeCreated)); + sb.append(", freeformTags=").append(String.valueOf(this.freeformTags)); + sb.append(", definedTags=").append(String.valueOf(this.definedTags)); + sb.append(", systemTags=").append(String.valueOf(this.systemTags)); + sb.append(", lifecycleDetails=").append(String.valueOf(this.lifecycleDetails)); + sb.append(", timeUpdated=").append(String.valueOf(this.timeUpdated)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ZprPolicySummary)) { + return false; + } + + ZprPolicySummary other = (ZprPolicySummary) o; + return java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.description, other.description) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.statements, other.statements) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.timeCreated, other.timeCreated) + && java.util.Objects.equals(this.freeformTags, other.freeformTags) + && java.util.Objects.equals(this.definedTags, other.definedTags) + && java.util.Objects.equals(this.systemTags, other.systemTags) + && java.util.Objects.equals(this.lifecycleDetails, other.lifecycleDetails) + && java.util.Objects.equals(this.timeUpdated, other.timeUpdated) + && super.equals(other); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = 1; + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.description == null ? 43 : this.description.hashCode()); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.statements == null ? 43 : this.statements.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.timeCreated == null ? 43 : this.timeCreated.hashCode()); + result = (result * PRIME) + (this.freeformTags == null ? 43 : this.freeformTags.hashCode()); + result = (result * PRIME) + (this.definedTags == null ? 43 : this.definedTags.hashCode()); + result = (result * PRIME) + (this.systemTags == null ? 43 : this.systemTags.hashCode()); + result = + (result * PRIME) + + (this.lifecycleDetails == null ? 43 : this.lifecycleDetails.hashCode()); + result = (result * PRIME) + (this.timeUpdated == null ? 43 : this.timeUpdated.hashCode()); + result = (result * PRIME) + super.hashCode(); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java new file mode 100644 index 00000000000..e2cfc40e2ab --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateConfigurationRequest.java @@ -0,0 +1,331 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use CreateConfigurationRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateConfigurationRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.zpr.model.CreateConfigurationDetails> { + + /** Details for ZPR configuration in the tenancy. */ + private com.oracle.bmc.zpr.model.CreateConfigurationDetails createConfigurationDetails; + + /** Details for ZPR configuration in the tenancy. */ + public com.oracle.bmc.zpr.model.CreateConfigurationDetails getCreateConfigurationDetails() { + return createConfigurationDetails; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.zpr.model.CreateConfigurationDetails getBody$() { + return createConfigurationDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateConfigurationRequest, + com.oracle.bmc.zpr.model.CreateConfigurationDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** Details for ZPR configuration in the tenancy. */ + private com.oracle.bmc.zpr.model.CreateConfigurationDetails createConfigurationDetails = + null; + + /** + * Details for ZPR configuration in the tenancy. + * + * @param createConfigurationDetails the value to set + * @return this builder instance + */ + public Builder createConfigurationDetails( + com.oracle.bmc.zpr.model.CreateConfigurationDetails createConfigurationDetails) { + this.createConfigurationDetails = createConfigurationDetails; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(CreateConfigurationRequest o) { + createConfigurationDetails(o.getCreateConfigurationDetails()); + opcRequestId(o.getOpcRequestId()); + opcRetryToken(o.getOpcRetryToken()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateConfigurationRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of CreateConfigurationRequest + */ + public CreateConfigurationRequest build() { + CreateConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.zpr.model.CreateConfigurationDetails body) { + createConfigurationDetails(body); + return this; + } + + /** + * Build the instance of CreateConfigurationRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateConfigurationRequest + */ + public CreateConfigurationRequest buildWithoutInvocationCallback() { + CreateConfigurationRequest request = new CreateConfigurationRequest(); + request.createConfigurationDetails = createConfigurationDetails; + request.opcRequestId = opcRequestId; + request.opcRetryToken = opcRetryToken; + request.opcDryRun = opcDryRun; + return request; + // new CreateConfigurationRequest(createConfigurationDetails, opcRequestId, + // opcRetryToken, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createConfigurationDetails(createConfigurationDetails) + .opcRequestId(opcRequestId) + .opcRetryToken(opcRetryToken) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createConfigurationDetails=") + .append(String.valueOf(this.createConfigurationDetails)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateConfigurationRequest)) { + return false; + } + + CreateConfigurationRequest other = (CreateConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createConfigurationDetails, other.createConfigurationDetails) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createConfigurationDetails == null + ? 43 + : this.createConfigurationDetails.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java new file mode 100644 index 00000000000..7160889115c --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/CreateZprPolicyRequest.java @@ -0,0 +1,328 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use CreateZprPolicyRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateZprPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.zpr.model.CreateZprPolicyDetails> { + + /** Details for the new ZprPolicy. */ + private com.oracle.bmc.zpr.model.CreateZprPolicyDetails createZprPolicyDetails; + + /** Details for the new ZprPolicy. */ + public com.oracle.bmc.zpr.model.CreateZprPolicyDetails getCreateZprPolicyDetails() { + return createZprPolicyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.zpr.model.CreateZprPolicyDetails getBody$() { + return createZprPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + CreateZprPolicyRequest, com.oracle.bmc.zpr.model.CreateZprPolicyDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** Details for the new ZprPolicy. */ + private com.oracle.bmc.zpr.model.CreateZprPolicyDetails createZprPolicyDetails = null; + + /** + * Details for the new ZprPolicy. + * + * @param createZprPolicyDetails the value to set + * @return this builder instance + */ + public Builder createZprPolicyDetails( + com.oracle.bmc.zpr.model.CreateZprPolicyDetails createZprPolicyDetails) { + this.createZprPolicyDetails = createZprPolicyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(CreateZprPolicyRequest o) { + createZprPolicyDetails(o.getCreateZprPolicyDetails()); + opcRetryToken(o.getOpcRetryToken()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of CreateZprPolicyRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of CreateZprPolicyRequest + */ + public CreateZprPolicyRequest build() { + CreateZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.zpr.model.CreateZprPolicyDetails body) { + createZprPolicyDetails(body); + return this; + } + + /** + * Build the instance of CreateZprPolicyRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of CreateZprPolicyRequest + */ + public CreateZprPolicyRequest buildWithoutInvocationCallback() { + CreateZprPolicyRequest request = new CreateZprPolicyRequest(); + request.createZprPolicyDetails = createZprPolicyDetails; + request.opcRetryToken = opcRetryToken; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new CreateZprPolicyRequest(createZprPolicyDetails, opcRetryToken, opcRequestId, + // opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .createZprPolicyDetails(createZprPolicyDetails) + .opcRetryToken(opcRetryToken) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",createZprPolicyDetails=").append(String.valueOf(this.createZprPolicyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateZprPolicyRequest)) { + return false; + } + + CreateZprPolicyRequest other = (CreateZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals( + this.createZprPolicyDetails, other.createZprPolicyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.createZprPolicyDetails == null + ? 43 + : this.createZprPolicyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java new file mode 100644 index 00000000000..5e8007edaa5 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/DeleteZprPolicyRequest.java @@ -0,0 +1,300 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use DeleteZprPolicyRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class DeleteZprPolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + private String zprPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + public String getZprPolicyId() { + return zprPolicyId; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + DeleteZprPolicyRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + */ + private String zprPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + * + * @param zprPolicyId the value to set + * @return this builder instance + */ + public Builder zprPolicyId(String zprPolicyId) { + this.zprPolicyId = zprPolicyId; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(DeleteZprPolicyRequest o) { + zprPolicyId(o.getZprPolicyId()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of DeleteZprPolicyRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of DeleteZprPolicyRequest + */ + public DeleteZprPolicyRequest build() { + DeleteZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of DeleteZprPolicyRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of DeleteZprPolicyRequest + */ + public DeleteZprPolicyRequest buildWithoutInvocationCallback() { + DeleteZprPolicyRequest request = new DeleteZprPolicyRequest(); + request.zprPolicyId = zprPolicyId; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new DeleteZprPolicyRequest(zprPolicyId, ifMatch, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .zprPolicyId(zprPolicyId) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zprPolicyId=").append(String.valueOf(this.zprPolicyId)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteZprPolicyRequest)) { + return false; + } + + DeleteZprPolicyRequest other = (DeleteZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zprPolicyId, other.zprPolicyId) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zprPolicyId == null ? 43 : this.zprPolicyId.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java new file mode 100644 index 00000000000..685e73a09d2 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetConfigurationRequest.java @@ -0,0 +1,216 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use GetConfigurationRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetConfigurationRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetConfigurationRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetConfigurationRequest o) { + compartmentId(o.getCompartmentId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetConfigurationRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetConfigurationRequest + */ + public GetConfigurationRequest build() { + GetConfigurationRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetConfigurationRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetConfigurationRequest + */ + public GetConfigurationRequest buildWithoutInvocationCallback() { + GetConfigurationRequest request = new GetConfigurationRequest(); + request.compartmentId = compartmentId; + request.opcRequestId = opcRequestId; + return request; + // new GetConfigurationRequest(compartmentId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().compartmentId(compartmentId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetConfigurationRequest)) { + return false; + } + + GetConfigurationRequest other = (GetConfigurationRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java new file mode 100644 index 00000000000..ac5cc95a72b --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprConfigurationWorkRequestRequest.java @@ -0,0 +1,219 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * GetZprConfigurationWorkRequestRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprConfigurationWorkRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetZprConfigurationWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetZprConfigurationWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetZprConfigurationWorkRequestRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetZprConfigurationWorkRequestRequest + */ + public GetZprConfigurationWorkRequestRequest build() { + GetZprConfigurationWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetZprConfigurationWorkRequestRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetZprConfigurationWorkRequestRequest + */ + public GetZprConfigurationWorkRequestRequest buildWithoutInvocationCallback() { + GetZprConfigurationWorkRequestRequest request = + new GetZprConfigurationWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetZprConfigurationWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprConfigurationWorkRequestRequest)) { + return false; + } + + GetZprConfigurationWorkRequestRequest other = (GetZprConfigurationWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java new file mode 100644 index 00000000000..79a202084a7 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyRequest.java @@ -0,0 +1,214 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use GetZprPolicyRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + private String zprPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + public String getZprPolicyId() { + return zprPolicyId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetZprPolicyRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + */ + private String zprPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + * + * @param zprPolicyId the value to set + * @return this builder instance + */ + public Builder zprPolicyId(String zprPolicyId) { + this.zprPolicyId = zprPolicyId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetZprPolicyRequest o) { + zprPolicyId(o.getZprPolicyId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetZprPolicyRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetZprPolicyRequest + */ + public GetZprPolicyRequest build() { + GetZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetZprPolicyRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetZprPolicyRequest + */ + public GetZprPolicyRequest buildWithoutInvocationCallback() { + GetZprPolicyRequest request = new GetZprPolicyRequest(); + request.zprPolicyId = zprPolicyId; + request.opcRequestId = opcRequestId; + return request; + // new GetZprPolicyRequest(zprPolicyId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().zprPolicyId(zprPolicyId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zprPolicyId=").append(String.valueOf(this.zprPolicyId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyRequest)) { + return false; + } + + GetZprPolicyRequest other = (GetZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zprPolicyId, other.zprPolicyId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zprPolicyId == null ? 43 : this.zprPolicyId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java new file mode 100644 index 00000000000..c3b529cd9eb --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/GetZprPolicyWorkRequestRequest.java @@ -0,0 +1,218 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * GetZprPolicyWorkRequestRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyWorkRequestRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + GetZprPolicyWorkRequestRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(GetZprPolicyWorkRequestRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of GetZprPolicyWorkRequestRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of GetZprPolicyWorkRequestRequest + */ + public GetZprPolicyWorkRequestRequest build() { + GetZprPolicyWorkRequestRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of GetZprPolicyWorkRequestRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of GetZprPolicyWorkRequestRequest + */ + public GetZprPolicyWorkRequestRequest buildWithoutInvocationCallback() { + GetZprPolicyWorkRequestRequest request = new GetZprPolicyWorkRequestRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + return request; + // new GetZprPolicyWorkRequestRequest(workRequestId, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder().workRequestId(workRequestId).opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyWorkRequestRequest)) { + return false; + } + + GetZprPolicyWorkRequestRequest other = (GetZprPolicyWorkRequestRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..9fde08f3d5f --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestErrorsRequest.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * ListZprConfigurationWorkRequestErrorsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprConfigurationWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestErrorsRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprConfigurationWorkRequestErrorsRequest + */ + public ListZprConfigurationWorkRequestErrorsRequest build() { + ListZprConfigurationWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestErrorsRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprConfigurationWorkRequestErrorsRequest + */ + public ListZprConfigurationWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListZprConfigurationWorkRequestErrorsRequest request = + new ListZprConfigurationWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprConfigurationWorkRequestErrorsRequest(workRequestId, opcRequestId, page, + // limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestErrorsRequest)) { + return false; + } + + ListZprConfigurationWorkRequestErrorsRequest other = + (ListZprConfigurationWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java new file mode 100644 index 00000000000..20a32a1a873 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestLogsRequest.java @@ -0,0 +1,407 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * ListZprConfigurationWorkRequestLogsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestLogsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprConfigurationWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestLogsRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprConfigurationWorkRequestLogsRequest + */ + public ListZprConfigurationWorkRequestLogsRequest build() { + ListZprConfigurationWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestLogsRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprConfigurationWorkRequestLogsRequest + */ + public ListZprConfigurationWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListZprConfigurationWorkRequestLogsRequest request = + new ListZprConfigurationWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprConfigurationWorkRequestLogsRequest(workRequestId, opcRequestId, page, + // limit, sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestLogsRequest)) { + return false; + } + + ListZprConfigurationWorkRequestLogsRequest other = + (ListZprConfigurationWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java new file mode 100644 index 00000000000..7963b1ba9d2 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprConfigurationWorkRequestsRequest.java @@ -0,0 +1,509 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * ListZprConfigurationWorkRequestsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** A filter to return only the resources that match the given lifecycle state. */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status; + + /** A filter to return only the resources that match the given lifecycle state. */ + public com.oracle.bmc.zpr.model.WorkRequestStatus getStatus() { + return status; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the resource affected by the work request. + */ + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprConfigurationWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** A filter to return only the resources that match the given lifecycle state. */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status = null; + + /** + * A filter to return only the resources that match the given lifecycle state. + * + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.zpr.model.WorkRequestStatus status) { + this.status = status; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the resource affected by the work request. + * + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprConfigurationWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestsRequest as configured by this + * builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprConfigurationWorkRequestsRequest + */ + public ListZprConfigurationWorkRequestsRequest build() { + ListZprConfigurationWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprConfigurationWorkRequestsRequest as configured by this + * builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprConfigurationWorkRequestsRequest + */ + public ListZprConfigurationWorkRequestsRequest buildWithoutInvocationCallback() { + ListZprConfigurationWorkRequestsRequest request = + new ListZprConfigurationWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListZprConfigurationWorkRequestsRequest(compartmentId, workRequestId, status, + // resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestsRequest)) { + return false; + } + + ListZprConfigurationWorkRequestsRequest other = (ListZprConfigurationWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java new file mode 100644 index 00000000000..bac55220f65 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPoliciesRequest.java @@ -0,0 +1,506 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use ListZprPoliciesRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPoliciesRequest extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * A filter to return only resources that match the given lifecycle state. The state value is + * case-insensitive. + */ + private com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState lifecycleState; + + /** + * A filter to return only resources that match the given lifecycle state. The state value is + * case-insensitive. + */ + public com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState getLifecycleState() { + return lifecycleState; + } + /** A filter to return only resources that match the entire display name given. */ + private String name; + + /** A filter to return only resources that match the entire display name given. */ + public String getName() { + return name; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + private String id; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + public String getId() { + return id; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. You can provide only one sort order. Default order for {@code + * timeCreated} is descending. Default order for {@code name} is ascending. + */ + private SortBy sortBy; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code + * timeCreated} is descending. Default order for {@code name} is ascending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + TimeCreated("timeCreated"), + Name("name"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code + * timeCreated} is descending. Default order for {@code name} is ascending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPoliciesRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * A filter to return only resources that match the given lifecycle state. The state value + * is case-insensitive. + */ + private com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState lifecycleState = null; + + /** + * A filter to return only resources that match the given lifecycle state. The state value + * is case-insensitive. + * + * @param lifecycleState the value to set + * @return this builder instance + */ + public Builder lifecycleState( + com.oracle.bmc.zpr.model.ZprPolicy.LifecycleState lifecycleState) { + this.lifecycleState = lifecycleState; + return this; + } + + /** A filter to return only resources that match the entire display name given. */ + private String name = null; + + /** + * A filter to return only resources that match the entire display name given. + * + * @param name the value to set + * @return this builder instance + */ + public Builder name(String name) { + this.name = name; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + */ + private String id = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + * + * @param id the value to set + * @return this builder instance + */ + public Builder id(String id) { + this.id = id; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code + * timeCreated} is descending. Default order for {@code name} is ascending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. You can provide only one sort order. Default order for {@code + * timeCreated} is descending. Default order for {@code name} is ascending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprPoliciesRequest o) { + compartmentId(o.getCompartmentId()); + lifecycleState(o.getLifecycleState()); + name(o.getName()); + id(o.getId()); + limit(o.getLimit()); + page(o.getPage()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + opcRequestId(o.getOpcRequestId()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPoliciesRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprPoliciesRequest + */ + public ListZprPoliciesRequest build() { + ListZprPoliciesRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPoliciesRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPoliciesRequest + */ + public ListZprPoliciesRequest buildWithoutInvocationCallback() { + ListZprPoliciesRequest request = new ListZprPoliciesRequest(); + request.compartmentId = compartmentId; + request.lifecycleState = lifecycleState; + request.name = name; + request.id = id; + request.limit = limit; + request.page = page; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + request.opcRequestId = opcRequestId; + return request; + // new ListZprPoliciesRequest(compartmentId, lifecycleState, name, id, limit, page, + // sortOrder, sortBy, opcRequestId); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .lifecycleState(lifecycleState) + .name(name) + .id(id) + .limit(limit) + .page(page) + .sortOrder(sortOrder) + .sortBy(sortBy) + .opcRequestId(opcRequestId); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",lifecycleState=").append(String.valueOf(this.lifecycleState)); + sb.append(",name=").append(String.valueOf(this.name)); + sb.append(",id=").append(String.valueOf(this.id)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPoliciesRequest)) { + return false; + } + + ListZprPoliciesRequest other = (ListZprPoliciesRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.lifecycleState, other.lifecycleState) + && java.util.Objects.equals(this.name, other.name) + && java.util.Objects.equals(this.id, other.id) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.lifecycleState == null ? 43 : this.lifecycleState.hashCode()); + result = (result * PRIME) + (this.name == null ? 43 : this.name.hashCode()); + result = (result * PRIME) + (this.id == null ? 43 : this.id.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java new file mode 100644 index 00000000000..3f391bbc437 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestErrorsRequest.java @@ -0,0 +1,404 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * ListZprPolicyWorkRequestErrorsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestErrorsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPolicyWorkRequestErrorsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestErrorsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPolicyWorkRequestErrorsRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprPolicyWorkRequestErrorsRequest + */ + public ListZprPolicyWorkRequestErrorsRequest build() { + ListZprPolicyWorkRequestErrorsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPolicyWorkRequestErrorsRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPolicyWorkRequestErrorsRequest + */ + public ListZprPolicyWorkRequestErrorsRequest buildWithoutInvocationCallback() { + ListZprPolicyWorkRequestErrorsRequest request = + new ListZprPolicyWorkRequestErrorsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprPolicyWorkRequestErrorsRequest(workRequestId, opcRequestId, page, limit, + // sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestErrorsRequest)) { + return false; + } + + ListZprPolicyWorkRequestErrorsRequest other = (ListZprPolicyWorkRequestErrorsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java new file mode 100644 index 00000000000..df653708ff3 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestLogsRequest.java @@ -0,0 +1,403 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * ListZprPolicyWorkRequestLogsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestLogsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + Timestamp("timestamp"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPolicyWorkRequestLogsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timestamp} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestLogsRequest o) { + workRequestId(o.getWorkRequestId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortBy(o.getSortBy()); + sortOrder(o.getSortOrder()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPolicyWorkRequestLogsRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprPolicyWorkRequestLogsRequest + */ + public ListZprPolicyWorkRequestLogsRequest build() { + ListZprPolicyWorkRequestLogsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPolicyWorkRequestLogsRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPolicyWorkRequestLogsRequest + */ + public ListZprPolicyWorkRequestLogsRequest buildWithoutInvocationCallback() { + ListZprPolicyWorkRequestLogsRequest request = new ListZprPolicyWorkRequestLogsRequest(); + request.workRequestId = workRequestId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortBy = sortBy; + request.sortOrder = sortOrder; + return request; + // new ListZprPolicyWorkRequestLogsRequest(workRequestId, opcRequestId, page, limit, + // sortBy, sortOrder); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .workRequestId(workRequestId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortBy(sortBy) + .sortOrder(sortOrder); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestLogsRequest)) { + return false; + } + + ListZprPolicyWorkRequestLogsRequest other = (ListZprPolicyWorkRequestLogsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortBy, other.sortBy) + && java.util.Objects.equals(this.sortOrder, other.sortOrder); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java new file mode 100644 index 00000000000..ab7c83039ae --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/ListZprPolicyWorkRequestsRequest.java @@ -0,0 +1,506 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use + * ListZprPolicyWorkRequestsRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestsRequest + extends com.oracle.bmc.requests.BmcRequest { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + private String compartmentId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the compartment in which to list resources. + */ + public String getCompartmentId() { + return compartmentId; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + private String workRequestId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the asynchronous work request. + */ + public String getWorkRequestId() { + return workRequestId; + } + /** A filter to return only the resources that match the given lifecycle state. */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status; + + /** A filter to return only the resources that match the given lifecycle state. */ + public com.oracle.bmc.zpr.model.WorkRequestStatus getStatus() { + return status; + } + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the resource affected by the work request. + */ + private String resourceId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the resource affected by the work request. + */ + public String getResourceId() { + return resourceId; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page; + + /** + * For list pagination. The value of the opc-next-page response header from the previous "List" + * call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public String getPage() { + return page; + } + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + public Integer getLimit() { + return limit; + } + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder; + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + public com.oracle.bmc.zpr.model.SortOrder getSortOrder() { + return sortOrder; + } + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + private SortBy sortBy; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + public enum SortBy implements com.oracle.bmc.http.internal.BmcEnum { + TimeAccepted("timeAccepted"), + ; + + private final String value; + private static java.util.Map map; + + static { + map = new java.util.HashMap<>(); + for (SortBy v : SortBy.values()) { + map.put(v.getValue(), v); + } + } + + SortBy(String value) { + this.value = value; + } + + @com.fasterxml.jackson.annotation.JsonValue + public String getValue() { + return value; + } + + @com.fasterxml.jackson.annotation.JsonCreator + public static SortBy create(String key) { + if (map.containsKey(key)) { + return map.get(key); + } + throw new IllegalArgumentException("Invalid SortBy: " + key); + } + }; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + public SortBy getSortBy() { + return sortBy; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + ListZprPolicyWorkRequestsRequest, java.lang.Void> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + */ + private String compartmentId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the compartment in which to list resources. + * + * @param compartmentId the value to set + * @return this builder instance + */ + public Builder compartmentId(String compartmentId) { + this.compartmentId = compartmentId; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + */ + private String workRequestId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the asynchronous work request. + * + * @param workRequestId the value to set + * @return this builder instance + */ + public Builder workRequestId(String workRequestId) { + this.workRequestId = workRequestId; + return this; + } + + /** A filter to return only the resources that match the given lifecycle state. */ + private com.oracle.bmc.zpr.model.WorkRequestStatus status = null; + + /** + * A filter to return only the resources that match the given lifecycle state. + * + * @param status the value to set + * @return this builder instance + */ + public Builder status(com.oracle.bmc.zpr.model.WorkRequestStatus status) { + this.status = status; + return this; + } + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the resource affected by the work request. + */ + private String resourceId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the resource affected by the work request. + * + * @param resourceId the value to set + * @return this builder instance + */ + public Builder resourceId(String resourceId) { + this.resourceId = resourceId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String page = null; + + /** + * For list pagination. The value of the opc-next-page response header from the previous + * "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param page the value to set + * @return this builder instance + */ + public Builder page(String page) { + this.page = page; + return this; + } + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private Integer limit = null; + + /** + * For list pagination. The maximum number of results per page, or items to return in a + * paginated "List" call. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param limit the value to set + * @return this builder instance + */ + public Builder limit(Integer limit) { + this.limit = limit; + return this; + } + + /** The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). */ + private com.oracle.bmc.zpr.model.SortOrder sortOrder = null; + + /** + * The sort order to use, either ascending ({@code ASC}) or descending ({@code DESC}). + * + * @param sortOrder the value to set + * @return this builder instance + */ + public Builder sortOrder(com.oracle.bmc.zpr.model.SortOrder sortOrder) { + this.sortOrder = sortOrder; + return this; + } + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + */ + private SortBy sortBy = null; + + /** + * The field to sort by. Only one sort order may be provided. Default order for {@code + * timeAccepted} is descending. + * + * @param sortBy the value to set + * @return this builder instance + */ + public Builder sortBy(SortBy sortBy) { + this.sortBy = sortBy; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(ListZprPolicyWorkRequestsRequest o) { + compartmentId(o.getCompartmentId()); + workRequestId(o.getWorkRequestId()); + status(o.getStatus()); + resourceId(o.getResourceId()); + opcRequestId(o.getOpcRequestId()); + page(o.getPage()); + limit(o.getLimit()); + sortOrder(o.getSortOrder()); + sortBy(o.getSortBy()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of ListZprPolicyWorkRequestsRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of ListZprPolicyWorkRequestsRequest + */ + public ListZprPolicyWorkRequestsRequest build() { + ListZprPolicyWorkRequestsRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Build the instance of ListZprPolicyWorkRequestsRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of ListZprPolicyWorkRequestsRequest + */ + public ListZprPolicyWorkRequestsRequest buildWithoutInvocationCallback() { + ListZprPolicyWorkRequestsRequest request = new ListZprPolicyWorkRequestsRequest(); + request.compartmentId = compartmentId; + request.workRequestId = workRequestId; + request.status = status; + request.resourceId = resourceId; + request.opcRequestId = opcRequestId; + request.page = page; + request.limit = limit; + request.sortOrder = sortOrder; + request.sortBy = sortBy; + return request; + // new ListZprPolicyWorkRequestsRequest(compartmentId, workRequestId, status, + // resourceId, opcRequestId, page, limit, sortOrder, sortBy); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .compartmentId(compartmentId) + .workRequestId(workRequestId) + .status(status) + .resourceId(resourceId) + .opcRequestId(opcRequestId) + .page(page) + .limit(limit) + .sortOrder(sortOrder) + .sortBy(sortBy); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",compartmentId=").append(String.valueOf(this.compartmentId)); + sb.append(",workRequestId=").append(String.valueOf(this.workRequestId)); + sb.append(",status=").append(String.valueOf(this.status)); + sb.append(",resourceId=").append(String.valueOf(this.resourceId)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",page=").append(String.valueOf(this.page)); + sb.append(",limit=").append(String.valueOf(this.limit)); + sb.append(",sortOrder=").append(String.valueOf(this.sortOrder)); + sb.append(",sortBy=").append(String.valueOf(this.sortBy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestsRequest)) { + return false; + } + + ListZprPolicyWorkRequestsRequest other = (ListZprPolicyWorkRequestsRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.compartmentId, other.compartmentId) + && java.util.Objects.equals(this.workRequestId, other.workRequestId) + && java.util.Objects.equals(this.status, other.status) + && java.util.Objects.equals(this.resourceId, other.resourceId) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.page, other.page) + && java.util.Objects.equals(this.limit, other.limit) + && java.util.Objects.equals(this.sortOrder, other.sortOrder) + && java.util.Objects.equals(this.sortBy, other.sortBy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = + (result * PRIME) + + (this.compartmentId == null ? 43 : this.compartmentId.hashCode()); + result = + (result * PRIME) + + (this.workRequestId == null ? 43 : this.workRequestId.hashCode()); + result = (result * PRIME) + (this.status == null ? 43 : this.status.hashCode()); + result = (result * PRIME) + (this.resourceId == null ? 43 : this.resourceId.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.page == null ? 43 : this.page.hashCode()); + result = (result * PRIME) + (this.limit == null ? 43 : this.limit.hashCode()); + result = (result * PRIME) + (this.sortOrder == null ? 43 : this.sortOrder.hashCode()); + result = (result * PRIME) + (this.sortBy == null ? 43 : this.sortBy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java new file mode 100644 index 00000000000..d49ca67555a --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/requests/UpdateZprPolicyRequest.java @@ -0,0 +1,410 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.requests; + +import com.oracle.bmc.zpr.model.*; +/** + * Example: Click here to see how to use UpdateZprPolicyRequest. + */ +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class UpdateZprPolicyRequest + extends com.oracle.bmc.requests.BmcRequest< + com.oracle.bmc.zpr.model.UpdateZprPolicyDetails> { + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + private String zprPolicyId; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of + * the ZprPolicy. + */ + public String getZprPolicyId() { + return zprPolicyId; + } + /** The information to be updated. */ + private com.oracle.bmc.zpr.model.UpdateZprPolicyDetails updateZprPolicyDetails; + + /** The information to be updated. */ + public com.oracle.bmc.zpr.model.UpdateZprPolicyDetails getUpdateZprPolicyDetails() { + return updateZprPolicyDetails; + } + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + private String opcRetryToken; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original creation + * request might be rejected. + */ + public String getOpcRetryToken() { + return opcRetryToken; + } + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + private String ifMatch; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the {@code + * 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. + */ + public String getIfMatch() { + return ifMatch; + } + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request IDs + * are letters, numbers, underscore, and dash. + */ + public String getOpcRequestId() { + return opcRequestId; + } + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + private Boolean opcDryRun; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not modify + * the configuration item details and is used only to perform validation on the submitted data. + */ + public Boolean getOpcDryRun() { + return opcDryRun; + } + + /** + * Alternative accessor for the body parameter. + * + * @return body parameter + */ + @Override + @com.oracle.bmc.InternalSdk + public com.oracle.bmc.zpr.model.UpdateZprPolicyDetails getBody$() { + return updateZprPolicyDetails; + } + + public static class Builder + implements com.oracle.bmc.requests.BmcRequest.Builder< + UpdateZprPolicyRequest, com.oracle.bmc.zpr.model.UpdateZprPolicyDetails> { + private com.oracle.bmc.http.client.RequestInterceptor invocationCallback = null; + private com.oracle.bmc.retrier.RetryConfiguration retryConfiguration = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + */ + private String zprPolicyId = null; + + /** + * The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) + * of the ZprPolicy. + * + * @param zprPolicyId the value to set + * @return this builder instance + */ + public Builder zprPolicyId(String zprPolicyId) { + this.zprPolicyId = zprPolicyId; + return this; + } + + /** The information to be updated. */ + private com.oracle.bmc.zpr.model.UpdateZprPolicyDetails updateZprPolicyDetails = null; + + /** + * The information to be updated. + * + * @param updateZprPolicyDetails the value to set + * @return this builder instance + */ + public Builder updateZprPolicyDetails( + com.oracle.bmc.zpr.model.UpdateZprPolicyDetails updateZprPolicyDetails) { + this.updateZprPolicyDetails = updateZprPolicyDetails; + return this; + } + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + */ + private String opcRetryToken = null; + + /** + * A token that uniquely identifies a request so it can be retried in case of a timeout or + * server error without risk of running 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 removed from the system, then a retry of the original + * creation request might be rejected. + * + * @param opcRetryToken the value to set + * @return this builder instance + */ + public Builder opcRetryToken(String opcRetryToken) { + this.opcRetryToken = opcRetryToken; + return this; + } + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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. + */ + private String ifMatch = null; + + /** + * For optimistic concurrency control. In the PUT or DELETE call for a resource, set the + * {@code 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 ifMatch the value to set + * @return this builder instance + */ + public Builder ifMatch(String ifMatch) { + this.ifMatch = ifMatch; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + */ + private String opcRequestId = null; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. The only valid characters for request + * IDs are letters, numbers, underscore, and dash. + * + * @param opcRequestId the value to set + * @return this builder instance + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + */ + private Boolean opcDryRun = null; + + /** + * Indicates that the request is a dry run, if set to "true". A dry run request does not + * modify the configuration item details and is used only to perform validation on the + * submitted data. + * + * @param opcDryRun the value to set + * @return this builder instance + */ + public Builder opcDryRun(Boolean opcDryRun) { + this.opcDryRun = opcDryRun; + return this; + } + + /** + * Set the invocation callback for the request to be built. + * + * @param invocationCallback the invocation callback to be set for the request + * @return this builder instance + */ + public Builder invocationCallback( + com.oracle.bmc.http.client.RequestInterceptor invocationCallback) { + this.invocationCallback = invocationCallback; + return this; + } + + /** + * Set the retry configuration for the request to be built. + * + * @param retryConfiguration the retry configuration to be used for the request + * @return this builder instance + */ + public Builder retryConfiguration( + com.oracle.bmc.retrier.RetryConfiguration retryConfiguration) { + this.retryConfiguration = retryConfiguration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + public Builder copy(UpdateZprPolicyRequest o) { + zprPolicyId(o.getZprPolicyId()); + updateZprPolicyDetails(o.getUpdateZprPolicyDetails()); + opcRetryToken(o.getOpcRetryToken()); + ifMatch(o.getIfMatch()); + opcRequestId(o.getOpcRequestId()); + opcDryRun(o.getOpcDryRun()); + invocationCallback(o.getInvocationCallback()); + retryConfiguration(o.getRetryConfiguration()); + return this; + } + + /** + * Build the instance of UpdateZprPolicyRequest as configured by this builder + * + *

Note that this method takes calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#buildWithoutInvocationCallback} does not. + * + *

This is the preferred method to build an instance. + * + * @return instance of UpdateZprPolicyRequest + */ + public UpdateZprPolicyRequest build() { + UpdateZprPolicyRequest request = buildWithoutInvocationCallback(); + request.setInvocationCallback(invocationCallback); + request.setRetryConfiguration(retryConfiguration); + return request; + } + + /** + * Alternative setter for the body parameter. + * + * @param body the body parameter + * @return this builder instance + */ + @com.oracle.bmc.InternalSdk + public Builder body$(com.oracle.bmc.zpr.model.UpdateZprPolicyDetails body) { + updateZprPolicyDetails(body); + return this; + } + + /** + * Build the instance of UpdateZprPolicyRequest as configured by this builder + * + *

Note that this method does not take calls to {@link + * Builder#invocationCallback(com.oracle.bmc.http.client.RequestInterceptor)} into account, + * while the method {@link Builder#build} does + * + * @return instance of UpdateZprPolicyRequest + */ + public UpdateZprPolicyRequest buildWithoutInvocationCallback() { + UpdateZprPolicyRequest request = new UpdateZprPolicyRequest(); + request.zprPolicyId = zprPolicyId; + request.updateZprPolicyDetails = updateZprPolicyDetails; + request.opcRetryToken = opcRetryToken; + request.ifMatch = ifMatch; + request.opcRequestId = opcRequestId; + request.opcDryRun = opcDryRun; + return request; + // new UpdateZprPolicyRequest(zprPolicyId, updateZprPolicyDetails, opcRetryToken, + // ifMatch, opcRequestId, opcDryRun); + } + } + + /** + * Return an instance of {@link Builder} that allows you to modify request properties. + * + * @return instance of {@link Builder} that allows you to modify request properties. + */ + public Builder toBuilder() { + return new Builder() + .zprPolicyId(zprPolicyId) + .updateZprPolicyDetails(updateZprPolicyDetails) + .opcRetryToken(opcRetryToken) + .ifMatch(ifMatch) + .opcRequestId(opcRequestId) + .opcDryRun(opcDryRun); + } + + /** + * Return a new builder for this request object. + * + * @return builder for the request object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",zprPolicyId=").append(String.valueOf(this.zprPolicyId)); + sb.append(",updateZprPolicyDetails=").append(String.valueOf(this.updateZprPolicyDetails)); + sb.append(",opcRetryToken=").append(String.valueOf(this.opcRetryToken)); + sb.append(",ifMatch=").append(String.valueOf(this.ifMatch)); + sb.append(",opcRequestId=").append(String.valueOf(this.opcRequestId)); + sb.append(",opcDryRun=").append(String.valueOf(this.opcDryRun)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateZprPolicyRequest)) { + return false; + } + + UpdateZprPolicyRequest other = (UpdateZprPolicyRequest) o; + return super.equals(o) + && java.util.Objects.equals(this.zprPolicyId, other.zprPolicyId) + && java.util.Objects.equals( + this.updateZprPolicyDetails, other.updateZprPolicyDetails) + && java.util.Objects.equals(this.opcRetryToken, other.opcRetryToken) + && java.util.Objects.equals(this.ifMatch, other.ifMatch) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcDryRun, other.opcDryRun); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.zprPolicyId == null ? 43 : this.zprPolicyId.hashCode()); + result = + (result * PRIME) + + (this.updateZprPolicyDetails == null + ? 43 + : this.updateZprPolicyDetails.hashCode()); + result = + (result * PRIME) + + (this.opcRetryToken == null ? 43 : this.opcRetryToken.hashCode()); + result = (result * PRIME) + (this.ifMatch == null ? 43 : this.ifMatch.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcDryRun == null ? 43 : this.opcDryRun.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java new file mode 100644 index 00000000000..34a4fd97cf0 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateConfigurationResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private CreateConfigurationResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(CreateConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public CreateConfigurationResponse build() { + return new CreateConfigurationResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateConfigurationResponse)) { + return false; + } + + CreateConfigurationResponse other = (CreateConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java new file mode 100644 index 00000000000..1c866031558 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/CreateZprPolicyResponse.java @@ -0,0 +1,298 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class CreateZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is sent. + */ + private String location; + + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is sent. + * + * @return the value + */ + public String getLocation() { + return location; + } + + /** Same as location. */ + private String contentLocation; + + /** + * Same as location. + * + * @return the value + */ + public String getContentLocation() { + return contentLocation; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + /** The returned {@code ZprPolicy} instance. */ + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; + + /** + * The returned {@code ZprPolicy} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.ZprPolicy getZprPolicy() { + return zprPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "location", + "contentLocation", + "opcRequestId", + "opcWorkRequestId", + "zprPolicy" + }) + private CreateZprPolicyResponse( + int __httpStatusCode__, + java.util.Map> headers, + String location, + String contentLocation, + String opcRequestId, + String opcWorkRequestId, + com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + super(__httpStatusCode__, headers); + this.location = location; + this.contentLocation = contentLocation; + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + this.zprPolicy = zprPolicy; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is + * sent. + */ + private String location; + + /** + * URL of the ZprPolicy resource. The zprPolicy OCID is generated after this request is + * sent. + * + * @param location the value to set + * @return this builder + */ + public Builder location(String location) { + this.location = location; + return this; + } + + /** Same as location. */ + private String contentLocation; + + /** + * Same as location. + * + * @param contentLocation the value to set + * @return this builder + */ + public Builder contentLocation(String contentLocation) { + this.contentLocation = contentLocation; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** The returned {@code ZprPolicy} instance. */ + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; + + /** + * The returned {@code ZprPolicy} instance. + * + * @param zprPolicy the value to set + * @return this builder + */ + public Builder zprPolicy(com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + this.zprPolicy = zprPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(CreateZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + location(o.getLocation()); + contentLocation(o.getContentLocation()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + zprPolicy(o.getZprPolicy()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public CreateZprPolicyResponse build() { + return new CreateZprPolicyResponse( + __httpStatusCode__, + headers, + location, + contentLocation, + opcRequestId, + opcWorkRequestId, + zprPolicy); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",location=").append(String.valueOf(location)); + sb.append(",contentLocation=").append(String.valueOf(contentLocation)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(",zprPolicy=").append(String.valueOf(zprPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof CreateZprPolicyResponse)) { + return false; + } + + CreateZprPolicyResponse other = (CreateZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.location, other.location) + && java.util.Objects.equals(this.contentLocation, other.contentLocation) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId) + && java.util.Objects.equals(this.zprPolicy, other.zprPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.location == null ? 43 : this.location.hashCode()); + result = + (result * PRIME) + + (this.contentLocation == null ? 43 : this.contentLocation.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + result = (result * PRIME) + (this.zprPolicy == null ? 43 : this.zprPolicy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java new file mode 100644 index 00000000000..56ed0af7b85 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/DeleteZprPolicyResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class DeleteZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private DeleteZprPolicyResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(DeleteZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public DeleteZprPolicyResponse build() { + return new DeleteZprPolicyResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof DeleteZprPolicyResponse)) { + return false; + } + + DeleteZprPolicyResponse other = (DeleteZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java new file mode 100644 index 00000000000..1c2667aae2d --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetConfigurationResponse.java @@ -0,0 +1,210 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetConfigurationResponse extends com.oracle.bmc.responses.BmcResponse { + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The returned {@code Configuration} instance. */ + private com.oracle.bmc.zpr.model.Configuration configuration; + + /** + * The returned {@code Configuration} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.Configuration getConfiguration() { + return configuration; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "configuration" + }) + private GetConfigurationResponse( + int __httpStatusCode__, + java.util.Map> headers, + String etag, + String opcRequestId, + com.oracle.bmc.zpr.model.Configuration configuration) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.configuration = configuration; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The returned {@code Configuration} instance. */ + private com.oracle.bmc.zpr.model.Configuration configuration; + + /** + * The returned {@code Configuration} instance. + * + * @param configuration the value to set + * @return this builder + */ + public Builder configuration(com.oracle.bmc.zpr.model.Configuration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetConfigurationResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + configuration(o.getConfiguration()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetConfigurationResponse build() { + return new GetConfigurationResponse( + __httpStatusCode__, headers, etag, opcRequestId, configuration); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",configuration=").append(String.valueOf(configuration)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetConfigurationResponse)) { + return false; + } + + GetConfigurationResponse other = (GetConfigurationResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.configuration, other.configuration); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.configuration == null ? 43 : this.configuration.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java new file mode 100644 index 00000000000..b1cb13b8321 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprConfigurationWorkRequestResponse.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprConfigurationWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + * + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** The returned {@code WorkRequest} instance. */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned {@code WorkRequest} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetZprConfigurationWorkRequestResponse( + int __httpStatusCode__, + java.util.Map> headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.zpr.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + GetZprConfigurationWorkRequestResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** The returned {@code WorkRequest} instance. */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned {@code WorkRequest} instance. + * + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.zpr.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetZprConfigurationWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetZprConfigurationWorkRequestResponse build() { + return new GetZprConfigurationWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprConfigurationWorkRequestResponse)) { + return false; + } + + GetZprConfigurationWorkRequestResponse other = (GetZprConfigurationWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java new file mode 100644 index 00000000000..c5a6be7b20e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyResponse.java @@ -0,0 +1,208 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The returned {@code ZprPolicy} instance. */ + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; + + /** + * The returned {@code ZprPolicy} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.ZprPolicy getZprPolicy() { + return zprPolicy; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "zprPolicy" + }) + private GetZprPolicyResponse( + int __httpStatusCode__, + java.util.Map> headers, + String etag, + String opcRequestId, + com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.zprPolicy = zprPolicy; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The returned {@code ZprPolicy} instance. */ + private com.oracle.bmc.zpr.model.ZprPolicy zprPolicy; + + /** + * The returned {@code ZprPolicy} instance. + * + * @param zprPolicy the value to set + * @return this builder + */ + public Builder zprPolicy(com.oracle.bmc.zpr.model.ZprPolicy zprPolicy) { + this.zprPolicy = zprPolicy; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + zprPolicy(o.getZprPolicy()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetZprPolicyResponse build() { + return new GetZprPolicyResponse( + __httpStatusCode__, headers, etag, opcRequestId, zprPolicy); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",zprPolicy=").append(String.valueOf(zprPolicy)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyResponse)) { + return false; + } + + GetZprPolicyResponse other = (GetZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.zprPolicy, other.zprPolicy); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.zprPolicy == null ? 43 : this.zprPolicy.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java new file mode 100644 index 00000000000..4ff6adff0b5 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/GetZprPolicyWorkRequestResponse.java @@ -0,0 +1,250 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class GetZprPolicyWorkRequestResponse extends com.oracle.bmc.responses.BmcResponse { + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @return the value + */ + public String getEtag() { + return etag; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + * + * @return the value + */ + public Integer getRetryAfter() { + return retryAfter; + } + + /** The returned {@code WorkRequest} instance. */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned {@code WorkRequest} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequest getWorkRequest() { + return workRequest; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "etag", + "opcRequestId", + "retryAfter", + "workRequest" + }) + private GetZprPolicyWorkRequestResponse( + int __httpStatusCode__, + java.util.Map> headers, + String etag, + String opcRequestId, + Integer retryAfter, + com.oracle.bmc.zpr.model.WorkRequest workRequest) { + super(__httpStatusCode__, headers); + this.etag = etag; + this.opcRequestId = opcRequestId; + this.retryAfter = retryAfter; + this.workRequest = workRequest; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + GetZprPolicyWorkRequestResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** For optimistic concurrency control. See {@code if-match}. */ + private String etag; + + /** + * For optimistic concurrency control. See {@code if-match}. + * + * @param etag the value to set + * @return this builder + */ + public Builder etag(String etag) { + this.etag = etag; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + */ + private Integer retryAfter; + + /** + * A decimal number representing the number of seconds the client should wait before polling + * this endpoint again. + * + * @param retryAfter the value to set + * @return this builder + */ + public Builder retryAfter(Integer retryAfter) { + this.retryAfter = retryAfter; + return this; + } + + /** The returned {@code WorkRequest} instance. */ + private com.oracle.bmc.zpr.model.WorkRequest workRequest; + + /** + * The returned {@code WorkRequest} instance. + * + * @param workRequest the value to set + * @return this builder + */ + public Builder workRequest(com.oracle.bmc.zpr.model.WorkRequest workRequest) { + this.workRequest = workRequest; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(GetZprPolicyWorkRequestResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + etag(o.getEtag()); + opcRequestId(o.getOpcRequestId()); + retryAfter(o.getRetryAfter()); + workRequest(o.getWorkRequest()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public GetZprPolicyWorkRequestResponse build() { + return new GetZprPolicyWorkRequestResponse( + __httpStatusCode__, headers, etag, opcRequestId, retryAfter, workRequest); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",etag=").append(String.valueOf(etag)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",retryAfter=").append(String.valueOf(retryAfter)); + sb.append(",workRequest=").append(String.valueOf(workRequest)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof GetZprPolicyWorkRequestResponse)) { + return false; + } + + GetZprPolicyWorkRequestResponse other = (GetZprPolicyWorkRequestResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.etag, other.etag) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.retryAfter, other.retryAfter) + && java.util.Objects.equals(this.workRequest, other.workRequest); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.etag == null ? 43 : this.etag.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.retryAfter == null ? 43 : this.retryAfter.hashCode()); + result = (result * PRIME) + (this.workRequest == null ? 43 : this.workRequest.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..eb55f47c5f5 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestErrorsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestErrorsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The returned {@code WorkRequestErrorCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned {@code WorkRequestErrorCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestErrorCollection getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListZprConfigurationWorkRequestErrorsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListZprConfigurationWorkRequestErrorsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The returned {@code WorkRequestErrorCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned {@code WorkRequestErrorCollection} instance. + * + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprConfigurationWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprConfigurationWorkRequestErrorsResponse build() { + return new ListZprConfigurationWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestErrorsResponse)) { + return false; + } + + ListZprConfigurationWorkRequestErrorsResponse other = + (ListZprConfigurationWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java new file mode 100644 index 00000000000..01977814115 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestLogsResponse.java @@ -0,0 +1,237 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestLogsResponse + extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The returned {@code WorkRequestLogEntryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection; + + /** + * The returned {@code WorkRequestLogEntryCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListZprConfigurationWorkRequestLogsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListZprConfigurationWorkRequestLogsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The returned {@code WorkRequestLogEntryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned {@code WorkRequestLogEntryCollection} instance. + * + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprConfigurationWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprConfigurationWorkRequestLogsResponse build() { + return new ListZprConfigurationWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestLogsResponse)) { + return false; + } + + ListZprConfigurationWorkRequestLogsResponse other = + (ListZprConfigurationWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java new file mode 100644 index 00000000000..c9575c1609e --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprConfigurationWorkRequestsResponse.java @@ -0,0 +1,234 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprConfigurationWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** The returned {@code WorkRequestSummaryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned {@code WorkRequestSummaryCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestSummaryCollection getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListZprConfigurationWorkRequestsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListZprConfigurationWorkRequestsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** The returned {@code WorkRequestSummaryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned {@code WorkRequestSummaryCollection} instance. + * + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprConfigurationWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprConfigurationWorkRequestsResponse build() { + return new ListZprConfigurationWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprConfigurationWorkRequestsResponse)) { + return false; + } + + ListZprConfigurationWorkRequestsResponse other = + (ListZprConfigurationWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java new file mode 100644 index 00000000000..00f5047a0a1 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPoliciesResponse.java @@ -0,0 +1,225 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPoliciesResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** The returned {@code ZprPolicyCollection} instance. */ + private com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection; + + /** + * The returned {@code ZprPolicyCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.ZprPolicyCollection getZprPolicyCollection() { + return zprPolicyCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "zprPolicyCollection" + }) + private ListZprPoliciesResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.zprPolicyCollection = zprPolicyCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** The returned {@code ZprPolicyCollection} instance. */ + private com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection; + + /** + * The returned {@code ZprPolicyCollection} instance. + * + * @param zprPolicyCollection the value to set + * @return this builder + */ + public Builder zprPolicyCollection( + com.oracle.bmc.zpr.model.ZprPolicyCollection zprPolicyCollection) { + this.zprPolicyCollection = zprPolicyCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprPoliciesResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + zprPolicyCollection(o.getZprPolicyCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprPoliciesResponse build() { + return new ListZprPoliciesResponse( + __httpStatusCode__, headers, opcRequestId, opcNextPage, zprPolicyCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",zprPolicyCollection=").append(String.valueOf(zprPolicyCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPoliciesResponse)) { + return false; + } + + ListZprPoliciesResponse other = (ListZprPoliciesResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.zprPolicyCollection, other.zprPolicyCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.zprPolicyCollection == null + ? 43 + : this.zprPolicyCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java new file mode 100644 index 00000000000..388fb481593 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestErrorsResponse.java @@ -0,0 +1,232 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestErrorsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The returned {@code WorkRequestErrorCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned {@code WorkRequestErrorCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestErrorCollection getWorkRequestErrorCollection() { + return workRequestErrorCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestErrorCollection" + }) + private ListZprPolicyWorkRequestErrorsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestErrorCollection = workRequestErrorCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListZprPolicyWorkRequestErrorsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The returned {@code WorkRequestErrorCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection; + + /** + * The returned {@code WorkRequestErrorCollection} instance. + * + * @param workRequestErrorCollection the value to set + * @return this builder + */ + public Builder workRequestErrorCollection( + com.oracle.bmc.zpr.model.WorkRequestErrorCollection workRequestErrorCollection) { + this.workRequestErrorCollection = workRequestErrorCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprPolicyWorkRequestErrorsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestErrorCollection(o.getWorkRequestErrorCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprPolicyWorkRequestErrorsResponse build() { + return new ListZprPolicyWorkRequestErrorsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestErrorCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestErrorCollection=") + .append(String.valueOf(workRequestErrorCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestErrorsResponse)) { + return false; + } + + ListZprPolicyWorkRequestErrorsResponse other = (ListZprPolicyWorkRequestErrorsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestErrorCollection, other.workRequestErrorCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestErrorCollection == null + ? 43 + : this.workRequestErrorCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java new file mode 100644 index 00000000000..a9b5627cda7 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestLogsResponse.java @@ -0,0 +1,235 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestLogsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** The returned {@code WorkRequestLogEntryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection; + + /** + * The returned {@code WorkRequestLogEntryCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + getWorkRequestLogEntryCollection() { + return workRequestLogEntryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcNextPage", + "opcRequestId", + "workRequestLogEntryCollection" + }) + private ListZprPolicyWorkRequestLogsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcNextPage, + String opcRequestId, + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection workRequestLogEntryCollection) { + super(__httpStatusCode__, headers); + this.opcNextPage = opcNextPage; + this.opcRequestId = opcRequestId; + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListZprPolicyWorkRequestLogsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** The returned {@code WorkRequestLogEntryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection; + + /** + * The returned {@code WorkRequestLogEntryCollection} instance. + * + * @param workRequestLogEntryCollection the value to set + * @return this builder + */ + public Builder workRequestLogEntryCollection( + com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection + workRequestLogEntryCollection) { + this.workRequestLogEntryCollection = workRequestLogEntryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprPolicyWorkRequestLogsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcNextPage(o.getOpcNextPage()); + opcRequestId(o.getOpcRequestId()); + workRequestLogEntryCollection(o.getWorkRequestLogEntryCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprPolicyWorkRequestLogsResponse build() { + return new ListZprPolicyWorkRequestLogsResponse( + __httpStatusCode__, + headers, + opcNextPage, + opcRequestId, + workRequestLogEntryCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",workRequestLogEntryCollection=") + .append(String.valueOf(workRequestLogEntryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestLogsResponse)) { + return false; + } + + ListZprPolicyWorkRequestLogsResponse other = (ListZprPolicyWorkRequestLogsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals( + this.workRequestLogEntryCollection, other.workRequestLogEntryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.workRequestLogEntryCollection == null + ? 43 + : this.workRequestLogEntryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java new file mode 100644 index 00000000000..008621ef047 --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/ListZprPolicyWorkRequestsResponse.java @@ -0,0 +1,233 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class ListZprPolicyWorkRequestsResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of results + * remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @return the value + */ + public String getOpcNextPage() { + return opcNextPage; + } + + /** The returned {@code WorkRequestSummaryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned {@code WorkRequestSummaryCollection} instance. + * + * @return the value + */ + public com.oracle.bmc.zpr.model.WorkRequestSummaryCollection getWorkRequestSummaryCollection() { + return workRequestSummaryCollection; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcNextPage", + "workRequestSummaryCollection" + }) + private ListZprPolicyWorkRequestsResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcNextPage, + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcNextPage = opcNextPage; + this.workRequestSummaryCollection = workRequestSummaryCollection; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder< + ListZprPolicyWorkRequestsResponse> { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + */ + private String opcNextPage; + + /** + * For list pagination. When this header appears in the response, additional pages of + * results remain. For important details about how pagination works, see [List + * Pagination](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/usingapi.htm#nine). + * + * @param opcNextPage the value to set + * @return this builder + */ + public Builder opcNextPage(String opcNextPage) { + this.opcNextPage = opcNextPage; + return this; + } + + /** The returned {@code WorkRequestSummaryCollection} instance. */ + private com.oracle.bmc.zpr.model.WorkRequestSummaryCollection workRequestSummaryCollection; + + /** + * The returned {@code WorkRequestSummaryCollection} instance. + * + * @param workRequestSummaryCollection the value to set + * @return this builder + */ + public Builder workRequestSummaryCollection( + com.oracle.bmc.zpr.model.WorkRequestSummaryCollection + workRequestSummaryCollection) { + this.workRequestSummaryCollection = workRequestSummaryCollection; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(ListZprPolicyWorkRequestsResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcNextPage(o.getOpcNextPage()); + workRequestSummaryCollection(o.getWorkRequestSummaryCollection()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public ListZprPolicyWorkRequestsResponse build() { + return new ListZprPolicyWorkRequestsResponse( + __httpStatusCode__, + headers, + opcRequestId, + opcNextPage, + workRequestSummaryCollection); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcNextPage=").append(String.valueOf(opcNextPage)); + sb.append(",workRequestSummaryCollection=") + .append(String.valueOf(workRequestSummaryCollection)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof ListZprPolicyWorkRequestsResponse)) { + return false; + } + + ListZprPolicyWorkRequestsResponse other = (ListZprPolicyWorkRequestsResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcNextPage, other.opcNextPage) + && java.util.Objects.equals( + this.workRequestSummaryCollection, other.workRequestSummaryCollection); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = (result * PRIME) + (this.opcNextPage == null ? 43 : this.opcNextPage.hashCode()); + result = + (result * PRIME) + + (this.workRequestSummaryCollection == null + ? 43 + : this.workRequestSummaryCollection.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java new file mode 100644 index 00000000000..a2c1be13b8b --- /dev/null +++ b/bmc-zpr/src/main/java/com/oracle/bmc/zpr/responses/UpdateZprPolicyResponse.java @@ -0,0 +1,185 @@ +/** + * Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. + * This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. + */ +package com.oracle.bmc.zpr.responses; + +import com.oracle.bmc.zpr.model.*; + +@jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") +public class UpdateZprPolicyResponse extends com.oracle.bmc.responses.BmcResponse { + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @return the value + */ + public String getOpcRequestId() { + return opcRequestId; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @return the value + */ + public String getOpcWorkRequestId() { + return opcWorkRequestId; + } + + @java.beans.ConstructorProperties({ + "__httpStatusCode__", + "headers", + "opcRequestId", + "opcWorkRequestId" + }) + private UpdateZprPolicyResponse( + int __httpStatusCode__, + java.util.Map> headers, + String opcRequestId, + String opcWorkRequestId) { + super(__httpStatusCode__, headers); + this.opcRequestId = opcRequestId; + this.opcWorkRequestId = opcWorkRequestId; + } + + public static class Builder + implements com.oracle.bmc.responses.BmcResponse.Builder { + private int __httpStatusCode__; + + @Override + public Builder __httpStatusCode__(int __httpStatusCode__) { + this.__httpStatusCode__ = __httpStatusCode__; + return this; + } + + private java.util.Map> headers; + + @Override + public Builder headers(java.util.Map> headers) { + this.headers = headers; + return this; + } + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + */ + private String opcRequestId; + + /** + * Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a + * particular request, please provide the request ID. + * + * @param opcRequestId the value to set + * @return this builder + */ + public Builder opcRequestId(String opcRequestId) { + this.opcRequestId = opcRequestId; + return this; + } + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + */ + private String opcWorkRequestId; + + /** + * Unique Oracle-assigned identifier for the asynchronous request. You can use this to query + * status of the asynchronous operation. + * + * @param opcWorkRequestId the value to set + * @return this builder + */ + public Builder opcWorkRequestId(String opcWorkRequestId) { + this.opcWorkRequestId = opcWorkRequestId; + return this; + } + + /** + * Copy method to populate the builder with values from the given instance. + * + * @return this builder instance + */ + @Override + public Builder copy(UpdateZprPolicyResponse o) { + __httpStatusCode__(o.get__httpStatusCode__()); + headers(o.getHeaders()); + opcRequestId(o.getOpcRequestId()); + opcWorkRequestId(o.getOpcWorkRequestId()); + + return this; + } + + /** + * Build the response object. + * + * @return the response object + */ + @Override + public UpdateZprPolicyResponse build() { + return new UpdateZprPolicyResponse( + __httpStatusCode__, headers, opcRequestId, opcWorkRequestId); + } + } + + /** + * Return a new builder for this response object. + * + * @return builder for the response object + */ + public static Builder builder() { + return new Builder(); + } + + @Override + public String toString() { + java.lang.StringBuilder sb = new java.lang.StringBuilder(); + sb.append("("); + sb.append("super=").append(super.toString()); + sb.append(",opcRequestId=").append(String.valueOf(opcRequestId)); + sb.append(",opcWorkRequestId=").append(String.valueOf(opcWorkRequestId)); + sb.append(")"); + return sb.toString(); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (!(o instanceof UpdateZprPolicyResponse)) { + return false; + } + + UpdateZprPolicyResponse other = (UpdateZprPolicyResponse) o; + return super.equals(o) + && java.util.Objects.equals(this.opcRequestId, other.opcRequestId) + && java.util.Objects.equals(this.opcWorkRequestId, other.opcWorkRequestId); + } + + @Override + public int hashCode() { + final int PRIME = 59; + int result = super.hashCode(); + result = (result * PRIME) + (this.opcRequestId == null ? 43 : this.opcRequestId.hashCode()); + result = + (result * PRIME) + + (this.opcWorkRequestId == null ? 43 : this.opcWorkRequestId.hashCode()); + return result; + } +} diff --git a/bmc-zpr/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-zpr/reflect-config.json b/bmc-zpr/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-zpr/reflect-config.json new file mode 100644 index 00000000000..fb69888e7b7 --- /dev/null +++ b/bmc-zpr/src/main/resources/META-INF/native-image/com.oracle.oci.sdk/oci-java-sdk-zpr/reflect-config.json @@ -0,0 +1,260 @@ +[ + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ActionType", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.Configuration", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.Configuration$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.Configuration$ZprStatus", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.Configuration$LifecycleState", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.CreateConfigurationDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.CreateConfigurationDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.CreateZprPolicyDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.CreateZprPolicyDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.OperationType", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.SortOrder", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.UpdateZprPolicyDetails", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.UpdateZprPolicyDetails$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequest", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequest$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestError", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestError$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestErrorCollection", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestErrorCollection$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestLogEntry", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestLogEntry$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestLogEntryCollection$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestResource", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestResource$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestResourceMetadataKey", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestStatus", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestSummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestSummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestSummaryCollection", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.WorkRequestSummaryCollection$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicy", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicy$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicy$LifecycleState", + "allDeclaredFields": true, + "allDeclaredMethods": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicyCollection", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicyCollection$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicySummary", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "queryAllDeclaredConstructors": true + }, + { + "condition" : { "typeReachable" : "com.fasterxml.jackson.databind.ObjectMapper" }, + "name": "com.oracle.bmc.zpr.model.ZprPolicySummary$Builder", + "allDeclaredFields": true, + "allDeclaredMethods": true, + "allDeclaredConstructors": true + } +] \ No newline at end of file diff --git a/bmc-zpr/src/main/resources/com/oracle/bmc/zpr/client.properties b/bmc-zpr/src/main/resources/com/oracle/bmc/zpr/client.properties new file mode 100644 index 00000000000..f0a68e64d4c --- /dev/null +++ b/bmc-zpr/src/main/resources/com/oracle/bmc/zpr/client.properties @@ -0,0 +1,9 @@ +# +# Copyright (c) 2016, 2024, Oracle and/or its affiliates. All rights reserved. +# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. +# + +java.client.codegen.version = 2.104 +java.minimum.client.codegen.version.from.client = 2.100 + +# @jakarta.annotation.Generated(value = "OracleSDKGenerator", comments = "API Version: 20240301") \ No newline at end of file diff --git a/pom.xml b/pom.xml index 699132de414..8a7fd5218f9 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.oracle.oci.sdk oci-java-sdk - 3.50.0 + 3.50.1 pom Oracle Cloud Infrastructure SDK This project contains the SDK used for Oracle Cloud Infrastructure @@ -49,14 +49,13 @@ 1.7.1 0.10.4 3.5.0 - 1.78.1 2.18.0 2.0.2 2.6.1 0.9.2 1.3 2.0.0.0 - 0.9.28 + 0.10.2 **/*IntegrationAutoTest.java true true @@ -511,16 +510,6 @@ httpcore ${apache-httpcomponents.httpcore.version} - - org.bouncycastle - bcpkix-jdk15to18 - ${bouncycastle.version} - - - org.bouncycastle - bcprov-jdk15to18 - ${bouncycastle.version} - org.hamcrest hamcrest-core @@ -799,5 +788,7 @@ bmc-delegateaccesscontrol bmc-generativeaiagent bmc-generativeaiagentruntime + bmc-securityattribute + bmc-zpr \ No newline at end of file